<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>blog.barros.ws &#187; admin generator</title>
	<atom:link href="http://blog.barros.ws/tag/admin-generator/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.barros.ws</link>
	<description>web development tips</description>
	<lastBuildDate>Sun, 06 Jun 2010 00:34:52 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Joomla like theme for symfony admin generator</title>
		<link>http://blog.barros.ws/2008/10/29/joomla-like-theme-for-symfony-admin-generator/</link>
		<comments>http://blog.barros.ws/2008/10/29/joomla-like-theme-for-symfony-admin-generator/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 21:52:43 +0000</pubDate>
		<dc:creator>Carlos Barros</dc:creator>
				<category><![CDATA[symfony]]></category>
		<category><![CDATA[admin generator]]></category>
		<category><![CDATA[joomla]]></category>
		<category><![CDATA[theme]]></category>

		<guid isPermaLink="false">http://blog.barros.ws/?p=39</guid>
		<description><![CDATA[When I first started working with symfony admin generator, I searched for some nice themes that I could use in my project, and for my surprise, I didn&#8217;t find anything. Searching a bit more I came across a blog post on SymfonyLab (http://www.symfonylab.com/backend-generator-theme/) asking about themes. In the post the author pointed an joomla like [...]]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">When I first started working with symfony admin generator, I searched for some nice themes that I could use in my project, and for my surprise, I didn&#8217;t find anything. Searching a bit more I came across a blog post on SymfonyLab (<a title="http://www.symfonylab.com/backend-generator-theme/" href="http://www.symfonylab.com/backend-generator-theme/" target="_blank">http://www.symfonylab.com/backend-generator-theme/</a>) asking about themes. In the post the author pointed an joomla like theme (<a title="http://www.symfony-project.org/forum/index.php/m/16515" href="http://www.symfony-project.org/forum/index.php/m/16515" target="_blank">http://www.symfony-project.org/forum/index.php/m/16515</a>), created by a user called Draven, that I really liked, but it&#8217;s outdated. I&#8217;m not really a joomla fan, but I must admin I like their backend design, so I decided to do a new implementation of this theme. It&#8217;s based on Draven&#8217;s implementation, in fact the css is almost the same, with some changes here there, and some small layout changes as well (specially in the edit page). Just one note that&#8217;s worth saying, it&#8217;s not really a THEME, but just a css, some layout templates and a collection of images, that changes the look of generated admin module. Here are some screenshots:</p>

<a href='http://blog.barros.ws/2008/10/29/joomla-like-theme-for-symfony-admin-generator/picture-1/' title='Login screen'><img width="150" height="150" src="http://blog.barros.ws/wp-content/uploads/2008/10/picture-1-150x150.png" class="attachment-thumbnail" alt="" title="Login screen" /></a>
<a href='http://blog.barros.ws/2008/10/29/joomla-like-theme-for-symfony-admin-generator/picture-2/' title='Dashboard screen'><img width="150" height="150" src="http://blog.barros.ws/wp-content/uploads/2008/10/picture-2-150x150.png" class="attachment-thumbnail" alt="" title="Dashboard screen" /></a>
<a href='http://blog.barros.ws/2008/10/29/joomla-like-theme-for-symfony-admin-generator/picture-3/' title='List screen'><img width="150" height="150" src="http://blog.barros.ws/wp-content/uploads/2008/10/picture-3-150x150.png" class="attachment-thumbnail" alt="" title="List screen" /></a>
<a href='http://blog.barros.ws/2008/10/29/joomla-like-theme-for-symfony-admin-generator/picture-4/' title='Edit screen'><img width="150" height="150" src="http://blog.barros.ws/wp-content/uploads/2008/10/picture-4-150x150.png" class="attachment-thumbnail" alt="" title="Edit screen" /></a>

<p>Also you can see it in action <a href="http://blog.barros.ws/symfony/admin.php" target="_blank">here</a> (use anything as username/password).</p>
<p><span id="more-39"></span></p>
<p>It&#8217;s pretty simple to install and use this theme, just download the files <a href="http://blog.barros.ws/wp-content/uploads/2008/10/symfony-joomla.zip">here</a>. This package contains a web directory with a set of images, javascripts and css, all stored in a dir called sf_admin. Also, it contains a set of layout templates that you must add to your backend application. Note that along with the layout templates, there are two files that are NOT layout templates, but templates that you should moved to the appropriated action, loginSuccess.php and dashboardSuccess.php. loginSuccess.php is the login screen and should be moved to your login module, and dashboard is the main admin screen and should be moved to your main module.</p>
<p>First file that needs to be changed is the main view.yml file for the backend app, in order to add the custom javascripts, css and set the layout.</p>
<p>app/backend/config.view.yml:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">  stylesheets:    [sf_admin/main,sf_admin/theme]
  javascripts:    [sf_admin/JSCookMenu_mini,sf_admin/theme]
&nbsp;
  has_layout:     on
  layout:         layout</pre></div></div>

<p>Note that loginSuccess.php template must NOT have a layout because it has a different look, so, don&#8217;t forget to set has_layout: off to the correct view.yml when using it. Now, for each module, you must set a new css in the generator.yml config file:</p>
<p>app/backend/modules/some_module/config/generator.yml:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">generator:
  class:              sfPropelAdminGenerator
  param:
    model_class:      SomeModel
    theme:            default
    css:              sf_admin/main</pre></div></div>

<p>Also in generators, I suggest to ALWAYS add a fieldset caption to the edit page, otherwise it will not look as expected. You can do something like:</p>
<p>app/backend/modules/some_module/config/generator.yml:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">    edit:
      title:          User manager: edit
      display:
        &quot;Details&quot;:             [id,name]
      fields:
        name:           { name: Name, help: &quot;Enter name here&quot; }
      actions:
        _delete:        { name: Delete }
        _list:          { name: Close }
        _save_and_list: { name: Save }</pre></div></div>

<p>One drawback this theme has is the fact that all &#8220;actions&#8221; have absolute positioning, in order to place it at top right. This means that each action as a static location, thus, you cannot add an save action as the first button in one view, and then add as the second button in another view, they will ALWAYS be placed in the same position (btw, to change actions location/order/etc, just edit css/sf_admin/main.css file and search for .sf_admin_action_create &#8211; or any other action name &#8211; and change the <b><i>right</i></b> value). I tried to move it&#8217;s container and then set contents to float:right, but it didn&#8217;t work as expected. Actually it worked just fine, but the problem was with the delete button. Delete button is in a different container, because it needs to live in a new &lt;form&gt; tag, so it was not possible to make it float. But as original author (Draven) said, it&#8217;s not a real theme. One can create a complete new theme to address these small details, but for me, this works like a charm <img src='http://blog.barros.ws/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.barros.ws/2008/10/29/joomla-like-theme-for-symfony-admin-generator/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
		</item>
	</channel>
</rss>
