25 Aug
Posted by gestadieu as OSS & Tech, Symfony, Web 2.0
It’s been a while since I wanted to work on my own admin generator theme. In symfony 1.0 the default admin generator was not really nice, it became a little bit better in 1.2 but still not to my taste (purely subjective I must admit
. For example, one thing get me mad is the css for the table list and the filter, I believe that the table list should be maximized and filters available only when we need them.
I spent quite some time to modify some admin generator in some projects but you always end up doing the same thing over and over (see this screenshot of what I have done with the list view based on a standard admin generator)…it was time to make things more to my taste. I now have a pretty clear idea of things that I would like out of the box from my new admin generator. Let me be more specific with the complete list of things I would like:
The first 3 items are easy to do just by modifying existing admin generator templates and are indeed already packaged in the plugin. The rest need more work (still learning how admin generator are working deeply).
I am also trying as much as possible to keep all actions accessible without javascript and make sure that I do not break any default admin generator css classes and ids in case you need them.
“Stop talking and show us the code“…here you go! It is published as a symfony plugin at http://www.symfony-project.com/plugins/sfAdminThemejRollerPlugin, meanwhile here are some screenshots:



./symfony plugin:install sfAdminThemejRollerPlugin --stability=beta
When I say beta, it is beta
I am not fully satisfied with the code and still thinking about the best approach for some features (not mentioning it’s my first play with admin generator). Feel free to give me feedback.
I will publish the code on github later to ease collaboration if any of you are interested. Anyway, it’s php right? so you can play with the code right now!
./symfony --theme=jroller doctrine:generate-admin
or if you have an existing admin generator, simply modify your generator.yml file with
theme: jroller
instead of theme: admin.
I currently package jQuery 1.3.2 and jQuery UI 1.7.2 to make sure it can work out-of-the-box, but it is also easy to specify in your app.yml file that you do not want to use those versions (or because you already include those libraries in your project) and include your own jquery and UI.
jQuery UI is using at the minimum: Tabs, Dialog (Drag and drop and resizable recommended).
# inside your app.yml file
sf_admin_theme_jroller_plugin:
web_dir: /sfAdminThemejRollerPlugin # specify specific folder where to pick your jquery stuff, ui and themes.
use_jquery: true # default. use the packaged jquery/UI
theme: redmond # default.
css_reset: true # default. reset default css (from Blueprint CSS)
I will try to implement the rest in the coming months (I just found out that sfDoctrineAdminGeneratorWithShowPlugin start to implement some of my ideas), again feel free to contribute to speed up the process.
You will probably find bugs, please report them.
One Response
Fabien Amiaud
February 24th, 2010 at 9:21 pm
1Hello,
I use the sfAdminThemejRollerPlugin with symfony 1.2.9. It’s a great
plugin but i can’t edit a line in my admin generator. If i click on
the edit button, i have:
“Fatal error: Call to undefined method
courrierGeneratorConfiguration::getForm() in D:\developpement
\sfprojects\appliCourrierReserve\cache\backend\dev\modules\autoCourrier
\actions\actions.class.php on line 97″
If I use the default theme for the backend, it’s ok.
Can you help me?
RSS feed for comments on this post · TrackBack URI
Leave a reply