sfAdvancedAdminGenerator plug-in
The sfAdvancedAdminGenerator extends the functionality of the admin generator.
- It differentiates between the create and the edit action; they can now be different.
- It adds a 'show' action that provides a view for the object; none of the fields are editable.
- On the list page, it allows you to change the action for hyperlinks on cells; the default is edit but you can choose show instead.
- Now you can sort on multiple columns in the list page. (With foreign-tables too)
Installation
- Install the plug-in
symfony plugin-install http://plugins.symfony-project.com/sfAdvancedAdminGeneratorPlugin
- change the generator class in your generator.yml
generator:
class: sfAdvancedAdminGenerator
param:
model_class: Book
theme: default
list:
click_action: show ## Change the default hyperlink
multisort: true ## Enabling the multisort
sort: [[authorname, desc], [title, asc], [authorlastname, asc]] #Default sort
object_actions:
_edit:
_show: ## Show the object (no edit)
fields:
authorname:
name: 'Author Name'
join_fields: [BookPeer::AUTHOR_ID, AuthorPeer::ID]
sort_column: [AuthorPeer::NAME]
authorlastname:
name: 'Author Last Name'
sort_column: [AuthorPeer::LAST_NAME]
edit:
title: Edit a book
display: [author_id, title]
fields:
author_id: {params: disabled=true} ## Can't edit the author of an existing book
actions:
_list:
_save:
create:
title: Create a new book
actions:
_list:
_save:
_save_and_add: ## allow to add an other book after a creatio
show:
title: View a book
display: [author_id, title]
- Clear the cache
symfony cc
- You're done.
Compatibility with default symfony generator
If no 'create' section is present in your configuration, the generator acts exactly like the default generator (the create action uses edit configuration).
If no 'click_action' option is present in 'list' section, the hyperlink links to the edit action.
Configuration
The configuration for the 'create' and 'show' sections are the same as for the symfony (default) admin generator.
Bugs or features requests
Please, submit any bugs or features requests on the forum
Changelog
2007-10-16 | 0.1.0
- romain: plug-in added to symfony
2007-10-23 | 0.1.1
- romain: add 'show' action
- romain: add 'click_action' in the 'list' section
2007-10-29 | 0.1.2
- romain: BugFix : Missing ShowSuccess.php file in the package
2007-11-16 | 0.1.3
- romain: BugFix : Handle failed form validation with create
- romain: Feature : Add flash notice on list action
2008-03-03 | 0.1.4
- shouze: BugFix : minor typo correction in _list_td_tabular.php
- shouze: Feature : object_input_auto_complete_tag() added, input auto completion for objects
- shouze: Feature : object_select_map_tag() added, sort of mapping of enum type fields
2008-03-06 | 0.1.5
- Dannyrulez: Feature : multi-sort list added, http://trac.symfony-project.com/ticket/2092 (Credits to Leon.van.der.Ree)
2008-05-03 | 0.1.6
- h0nIg: BugFix : <?php if ($actionName == '_delete') continue ?> not needed in _show_actions.php
- h0nIg: BugFix : fixed tgz format (1.5 is not .tgz!)
- h0nIg: BugFix : fixed broken package.xml
2008-05-04 | 0.1.7
- see 0.2.1
2008-05-03 | 0.2.0
- h0nIg: BugFix : <?php if ($actionName == '_delete') continue ?> not needed in _show_actions.php
- h0nIg: Feature : added 1.1.0 support
2008-05-04 | 0.2.1
- h0nIg: BugFix : removed delete action in create
- h0nIg: BugFix : fixed remove multisort column
Attachments
- sfAdvancedAdminGeneratorPlugin-0.1.0.tgz (10.5 kB) - added by sorac on 10/16/07 16:50:10.
- sfAdvancedAdminGeneratorPlugin-0.1.1.tgz (11.9 kB) - added by sorac on 10/23/07 18:20:10.
- sfAdvancedAdminGeneratorPlugin-0.1.2.tgz (12.0 kB) - added by sorac on 10/29/07 11:19:20.
- sfAdvancedAdminGeneratorPlugin-0.1.3.tgz (12.4 kB) - added by sorac on 11/16/07 12:45:35.
- sfAdvancedAdminGeneratorPlugin-0.1.4.tgz (13.4 kB) - added by shouze on 03/03/08 16:11:39.
- sfAdvancedAdminGeneratorPlugin-0.1.5.tgz (25.0 kB) - added by Dannyrulez on 03/06/08 19:13:55.
- sfAdvancedAdminGeneratorPlugin-0.2.0.tgz (14.8 kB) -
1.1.0-BETA4
, added by h0nIg on 05/03/08 12:52:03. - sfAdvancedAdminGeneratorPlugin-0.1.6.tgz (14.0 kB) - added by h0nIg on 05/03/08 12:53:52.
- sfAdvancedAdminGeneratorPlugin-0.2.1.tgz (14.7 kB) -
1.1.0-BETA4
, added by h0nIg on 05/04/08 01:16:11. - sfAdvancedAdminGeneratorPlugin-0.1.7.tgz (14.0 kB) - added by h0nIg on 05/04/08 10:26:32.