I've been extending the admin code generator a bit and I thought I'd mention what I'm doing to this list in case it might be of value to someone else. And I'd love some feedback if I'm doing anything incorrectly or unnecessarily:
1. Set default settings for minimum and maximum char field lengths, textarea colsxrows, and numeric field lengths in app.yml:
adminfield:
charmin: 20
charmax: 60
textrows: 3
textcols: 60
intsize: 7
floatsize: 7
2. Support for some of the text helpers (I'm not passing any parameters at the moment):
fields:
my_content: { helper: auto_link_text }
3. Support for url filters (for selecting detail records in master/detail groups) # urlfilter construct is [field to filter on]: [value passed from routing.yml] # multiple filters can be set but they're currently mutually exclusive (any of the list can be used but only one per url)
urlfilters:
invoice_id: inv_id
Creates the proper selection criteria for a url like "my_site/invoicedetail/list/invoice_id/27"
4. All actions accept a query_string parameter:
_list:
query_string:
user_id: my_id
will output "invoice/list?user_id=my_id"
This would probably be better as a simple string:
query_string: "?concept_id=new_id"
...but I was young and foolish when I did it.
5. I found myself writing many partials for fields to implement different create vs. edit display type and security levels so the admin now generates a separate set of 'create' templates with a separate 'create' section in generator.yml from which I can control field-level display, type, and security.
6. I also very much missed having a display-only 'show' action, so the admin now creates a separate 'show' template, also with it's own section in generator.yml.
Like the list & edit actions, show and create allow the admin to override the generated header/footer templates for each action but the generator also creates acceptable defaults, and they work with the create & show actions, using the defaults for edit and list, even if there's no section in generator.yml.
I've only tested this against the field types I'm currently using so I haven't tested file upload.
This was built against revision 1218.