The generation chapter of the symfony book has just been updated to reflect the latest additions of symfony 0.6 in one crucial feature: The admin generator.
It describes in detail the differences between a scaffolding and an administration, why you should initiate instead of generate, and all the settings that you can change to control the administration functionnalities.
We made a few changes to the generator.yml syntax, to make it easier to use. The example given in the What's new in 0.6 has to be slightly modified to work with the latest symfony beta release (higher than 0.7.872):
generator:
class: sfPropelAdminGenerator
param:
model_class: Question
theme: default
fields:
user: { name: Author }
user_id: { name: Question author }
body: { name: Question }
interested_users: { name: Interested users }
created_at: { name: Creation date }
list:
title: question list
layout: stacked
display: [=title, user, interested_users, created_at]
params: %%title%% by %%user%% on %%created_at%%
actions:
_edit: -
_delete: -
export: { name: export, action: ListExport }
max_per_page: 5
filters: [title, created_at, interested_users, user_id]
edit:
fields:
title: { type: input_tag, params: size=10 }
created_at: { type: input_date_tag, params: rich=on }
actions:
export: { name: export, action: ListExport }
_create: -
The first project tutorial has also been updated to reflect these changes.
Now that you can create your own back-end applications in minutes, feel free to submit your configs in the wiki, together with the printscreen showing what it does.
And for those who prefer to watch instead of reading, a tutorial dedicated to the generator will soon be published, so stay tuned...
Nice!
Excellent! i really like the admin generator and love the configuration of it. I couldnt work out how to get the rich date editors to work with time as well as date though. how do i let users edit the time part of the timestamp in the interface?