[pLog-svn] r3190 - plog/trunk/templates/admin

mark at devel.lifetype.net mark at devel.lifetype.net
Wed Apr 5 09:24:25 GMT 2006


Author: mark
Date: 2006-04-05 09:24:25 +0000 (Wed, 05 Apr 2006)
New Revision: 3190

Modified:
   plog/trunk/templates/admin/newpost.template
Log:
Now, the newPost will preselect the frist global article category. So, we don't need to bother the user have to select one global article category.

Modified: plog/trunk/templates/admin/newpost.template
===================================================================
--- plog/trunk/templates/admin/newpost.template	2006-04-05 08:58:19 UTC (rev 3189)
+++ plog/trunk/templates/admin/newpost.template	2006-04-05 09:24:25 UTC (rev 3190)
@@ -132,9 +132,15 @@
 		 <div class="formHelp">{$locale->tr("global_article_category_help")}</div>
 	    <select name="globalArticleCategoryId" id="globalArticleCategoryId" size="1" style="width:100%">
 	       <option value="0">{$locale->tr("none")}</option>
-           {foreach from=$globalcategories item=globalcategory}
-           <option value="{$globalcategory->getId()}" {if $globalcategory->getId() == $globalArticleCategoryId} selected="selected" {/if}>{$globalcategory->getName()}</option>
-           {/foreach}
+           {if $globalArticleCategoryId}
+	           {foreach from=$globalcategories item=globalcategory}
+	           <option value="{$globalcategory->getId()}" {if $globalcategory->getId() == $globalArticleCategoryId} selected="selected" {/if}>{$globalcategory->getName()}</option>
+	           {/foreach}
+           {else}
+	           {foreach name=globalcategories from=$globalcategories item=globalcategory}
+	           <option value="{$globalcategory->getId()}" {if $smarty.foreach.globalcategories.first} selected="selected" {/if}>{$globalcategory->getName()}</option>
+	           {/foreach}
+	       {/if}
          </select>
         {include file="$admintemplatepath/validate.template" field=globalArticleCategoryId message=$locale->tr("error_no_global_article_category_selected")}	   
        </div>	   



More information about the pLog-svn mailing list