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

oscar at devel.plogworld.net oscar at devel.plogworld.net
Tue Dec 14 18:29:32 GMT 2004


Author: oscar
Date: 2004-12-14 18:29:32 +0000 (Tue, 14 Dec 2004)
New Revision: 498

Modified:
   plog/trunk/templates/admin/editpost.template
Log:
the "edit post" page is now also adapted to the new look, plus added some fixes from user 'donie' regarding the encoding of certain html entities and so on.

Modified: plog/trunk/templates/admin/editpost.template
===================================================================
--- plog/trunk/templates/admin/editpost.template	2004-12-14 17:51:37 UTC (rev 497)
+++ plog/trunk/templates/admin/editpost.template	2004-12-14 18:29:32 UTC (rev 498)
@@ -1,5 +1,5 @@
 {include file="$admintemplatepath/header.template"}
-{include file="$admintemplatepath/navigation.template" showOpt=editPosts title=FIXME}
+{include file="$admintemplatepath/navigation.template" showOpt=editPosts title=$locale->tr("editPost")}
 <script type="text/javascript" src="js/calendar/datetimepicker.js"></script>
 <script type="text/javascript" src="js/ui/plogui.js"></script>
 {assign var=htmlarea value=$blogsettings->getValue("htmlarea_enabled")}
@@ -19,88 +19,131 @@
   {include file="$admintemplatepath/calendarstuff.template"}
  </script>
   <form name="newPost" id="editPost" action="admin.php" method="post">
-   {include file="$admintemplatepath/formvalidate.template" message=$locale->tr("error_updating_post")}    
-   {$locale->tr("topic")}: <br/><input type="text" name="postTopic" style="width:100%" value="{$postTopic}"/><br/>
-   {include file="$admintemplatepath/validate.template" field=postTopic message=$locale->tr("error_missing_post_topic")}   
-   {$locale->tr("post_slug")}:<br/><input type="text" name="postSlug" style="width:100%" value="{$postSlug}"/><br/>      
-   <br/>{$locale->tr("text")}: <br/>
-   {if !$htmlarea}<script type="text/javascript">var ed1 = new pLogEditor('postText','ed1');</script>{/if}   
-   <textarea {if $htmlarea==1}rows="20"{else}rows="10"{/if} style="width:100%" id="postText" name="postText">{$postText}</textarea><br/>
-   {include file="$admintemplatepath/validate.template" field=postText message=$locale->tr("error_missing_post_text")}      
-   {if !$htmlarea}<a href="javascript:resource_list_window(1);">{$locale->tr("add_resource")}</a>{/if}
-   <br/>
-   <br/>{$locale->tr("extended_text")}: <br/>
-   {if !$htmlarea}<script type="text/javascript">var ed2 = new pLogEditor('postExtendedText','ed2');</script>{/if}   
-   <textarea {if $htmlarea==1}rows="25"{else}rows="15"{/if} id="postExtendedText" name="postExtendedText" style="width:100%">{$postExtendedText}</textarea><br/>
-   {if !$htmlarea}<a href="javascript:resource_list_window(2);">{$locale->tr("add_resource")}</a>{/if}
-   <br/><br/>
+   <fieldset class="inputField">
+   <legend>{$locale->tr("newPost")}</legend>
+   <div style="float:left; width: 75%; border-right: 1px solid #DEDEDE;">  
+     {include file="$admintemplatepath/formvalidate.template" message=$locale->tr("error_updating_post")}    
+	 
+	   <div class="field">
+	     <label for="postTopic">{$locale->tr("topic")}</label>
+		 <span class="required">*</span>
+		 <div class="formHelp">{$locale->tr("topic_help")}</div>
+	     <input type="text" name="postTopic" style="width:100%" value="{$postTopic}" />
+	     {include file="$admintemplatepath/validate.template" field=postTopic message=$locale->tr("error_missing_post_topic")}
+	   </div>
+	   
+	   <!-- text field custom fields -->
+	   {include file="$admintemplatepath/newpost_customfields.template" type=1 fields=$customfields}	   
+	   
+	   
+	   <div class="field">
+	     <label for="postText">{$locale->tr("text")}</label>
+		 <span class="required">*</span>
+		 <div class="formHelp">{$locale->tr("text_help")}</div>
+	     {if !$htmlarea}<script type="text/javascript">var ed1 = new pLogEditor('postText','ed1');</script>{/if}
+	     <textarea {if $htmlarea==1}rows="20"{else}rows="10"{/if} id="postText" name="postText" style="width:100%">{if $htmlarea}{$postText|replace:"&":"&amp;"}{else}{$postText}{/if}</textarea>
+	     {include file="$admintemplatepath/validate.template" field=postText message=$locale->tr("error_missing_post_text")}   
+  	     {if !$htmlarea}
+		   <a href="javascript:resource_list_window(1);">{$locale->tr("add_resource")}</a>
+	     {/if}
+	   </div>
+	   
+	   <div class="field">
+	     <label for="postExtendedText">{$locale->tr("extended_text")}</label>
+		 <div class="formHelp">{$locale->tr("extended_text_help")}</div>
+	     {if !$htmlarea}<script type="text/javascript">var ed2 = new pLogEditor('postExtendedText','ed2');</script>{/if}
+	     <textarea {if $htmlarea}rows="25"{else}rows="15"{/if} id="postExtendedText" name="postExtendedText" style="width:100%">{if $htmlarea}{$postExtendedText|replace:"&":"&amp;"}{else}{$postExtendedText}{/if}</textarea>
+	     {if !$htmlarea}
+		 <a href="javascript:resource_list_window(2);">{$locale->tr("add_resource")}</a>
+	     {/if}
+	   </div>
+	   
+	   <!-- text area custom fields -->
+      {include file="$admintemplatepath/newpost_customfields.template" type=2 fields=$customfields}
+   </div>	   
+   
+   <div style="float:left; width: 23%; margin-left: 8px;">   
+	 
+	   <div class="field">
+	     <label for="postSlug">{$locale->tr("post_slug")}</label>
+		 <div class="formHelp">{$locale->tr("post_slug_help")}</div>
+	     <input type="text" name="postSlug" style="width:100%" value="{$postSlug}" />
+	   </div>
+	   
+       <div class="field">
+   	     <label for="postDateTime">{$locale->tr("date")}</label>
+		 <span class="required">*</span>
+		 <div class="formHelp">{$locale->tr("date_help")}</div>
+	     <input name="postDateTime" id="postDateTime" class="dateTime" readonly="true" type="text" size="16" value="{$postDay}/{$postMonth}/{$postYear} {$postHour}:{$postMinutes}" style="margin-bottom: 4px;>
+	     <a href="javascript:NewCal('postDateTime','ddmmyyyy',true,24)"><img src="imgs/cal.jpg" alt="{$locale->tr("pick_date")}" style="width: 16px; height: 14px; padding: 0;" /></a>
+	   </div>
+	   
+	   <!-- date custom fields -->
+	   {include file="$admintemplatepath/newpost_customfields.template" type=4 fields=$customfields}	   
 
-   {$locale->tr("date")}:
-   <input name="postDateTime" id="postDateTime" readonly="true" type="text" size="16" value="{$postDay}/{$postMonth}/{$postYear} {$postHour}:{$postMinutes}">
-   <a href="javascript:NewCal('postDateTime','ddmmyyyy',true,24)">
-    <img src="imgs/cal.gif" alt="{$locale->tr("pick_date")}" border="0" />
-   </a>
+	   <div class="field">
+         <label for="postStatus">{$locale->tr("status")}</label>
+		 <span class="required">*</span>		 
+		 <div class="formHelp">{$locale->tr("post_status_help")}</div>
+		 <select name="postStatus">
+		   {foreach from=$poststatus key=name item=status}
+		   <option value="{$status}" {if $postStatus == $status} selected="selected"{/if}>{$locale->tr($name)}</option>
+		   {/foreach}
+         </select>	   
+	   </div>
+	   
+	   <div class="field">
+         <label for="postCategories[]">{$locale->tr("categories")}</label>
+		 <span class="required">*</span>
+		 <div class="formHelp">{$locale->tr("post_categories_help")}</div>
+         <select name="postCategories[]" id="postCategories" size="5" multiple="multiple" style="width:100%">
+           {foreach from=$categories item=category}
+           <option value="{$category->getId()}" {foreach from=$postCategories item=categoryId}{if $category->getId() == $categoryId} selected="selected" {/if}{/foreach}>{$category->getName()}</option>
+           {/foreach}
+         </select>
+        {include file="$admintemplatepath/validate.template" field=postCategories message=$locale->tr("error_no_categories")}	   
+	   </div>	   
+	      
+       <div class="field_checkbox">
+         <input class="checkbox" type="checkbox" name="commentsEnabled" value="1" {if $commentsEnabled} checked="checked" {/if}/>
+		 <label for="commentsEnabled">{$locale->tr("enable_comments_for_post")}</label>
+	   </div>
+	   
+       <div class="field_checkbox">
+	     <input class="checkbox" type="checkbox" name="sendNotification" value="1" {if $sendNotification} checked="checked" {/if}/>
+		 <label for="sendNotification">{$locale->tr("send_notification")}</label>
+	   </div>
+	   
+       <div class="field_checkbox">
+	     <input class="checkbox" type="checkbox" name="sendTrackbacks" value="1" {if $sendTrackbacks} checked="checked" {/if}/>  
+		 <label for="sendTrackbacks">{$locale->tr("send_trackback_pings")}</label>
+	   </div>
+	   
+	   <div class="field_checkbox">	
+         {if $xmlRpcPingEnabled}
+		 <input class="checkbox" type="checkbox" name="sendPings" value="1" {if $sendPings} checked="checked" {/if}/>
+		 <label for="sendPings">{$locale->tr("send_xmlrpc_pings")}</label>
+		 {/if}
+      </div>
+	  
+  	  <!-- checkbox custom fields -->
+      {include file="$admintemplatepath/newpost_customfields.template" type=3 fields=$customfields}	  
 
-   <br/>
-   <table cols="2" rows="1" width="100%">
-    <tr valign="top">
-     <td align="left" width="50%">
-       {$locale->tr("status")}: <select name="postStatus">
-		{foreach from=$poststatus key=name item=status}
-		 <option value="{$status}" {if $postStatus == $status} selected="selected"{/if}>{$locale->tr($name)}</option>
-		{/foreach}
-      </select><br/>	   
-       <input type="checkbox" name="commentsEnabled" value="1" {if $commentsEnabled} checked="checked" {/if}/>{$locale->tr("enable_comments_for_post")}<br/>   
-       <input type="checkbox" name="sendNotification" value="1" {if $notification == 1} checked="checked" {/if}/> {$locale->tr("send_notification")}<br/>
-       <input type="checkbox" name="sendTrackbacks" value="1" {if $sendTrackbacks} checked="checked" {/if}/> {$locale->tr("send_trackback_pings")}<br/>
-       {if $xmlRpcPingEnabled}
-	   <input type="checkbox" name="sendPings" value="1" {if $sendPings} checked="checked" {/if}/> {$locale->tr("send_xmlrpc_pings")}<br/>		
-	   {/if}
-     </td>
-     <td>   
-        {$locale->tr("category")}:<br/>
-        <select name="postCategories[]" id="postCategories" size="5" multiple="multiple" style="width:50%">     
-         {foreach from=$categories item=category}
-          <option value="{$category->getId()}" {foreach from=$postCategories item=postcategory}{if $postcategory == $category->getId()} selected="selected" {/if}{/foreach}>{$category->getName()}</option>
-         {/foreach}
-        </select>&nbsp;
-        {include file="$admintemplatepath/validate.template" field=postCategories message=$locale->tr("error_no_categories")}        
-      </td>
-     </tr>
-    </table>
-    <input type="submit" name="updatePost" value="{$locale->tr("update")}"/>
-    <input type="button" name="previewPost" value="{$locale->tr("preview")}" onclick="previewUpdatedPost()" />
-    <input type="hidden" name="op" value="updatePost"/>
-    <input type="hidden" name="postId" value="{$postId}"/>
-	
-	<p>
-	<!-- custom fields, if any -->
-	 {foreach from=$customfields item=field}
-	  {assign var=fieldId value=$field->getId()}
-	  {$field->getDescription()}:
-	  {if $field->getType() == 1} 
-	   <br/><input type="text" name="customField[{$fieldId}]" value="{$customField[$fieldId]}" style="width:100%" />
-	  {elseif $field->getType() == 2}
-	   <br/><textarea name="customField[{$fieldId}]" rows="10" style="width:100%">{$customField[$fieldId]}</textarea>
-	  {elseif $field->getType() == 3}
-	   <input type="checkbox" name="customField[{$fieldId}]" value="1" {if $customField[$fieldId] == "1"}checked="checked"{/if} /> 
-	  {elseif $field->getType() == 4}
-       <input name="customField[{$fieldId}]" id="customField[{$fieldId}]" readonly="true" type="text" size="16" value="{$customField[$fieldId]}" />
-       <a href="javascript:NewCal('customField[{$fieldId}]','ddmmyyyy',true,24)">
-        <img src="imgs/cal.gif" alt="{$locale->tr("pick_date")}" border="0" />
-       </a>
-	  {/if}
-	  <br/>
-	 {/foreach}	
-	<!-- end of custom fields -->
-	</p>	
-	
+	</div>
+	</fieldset>
+	<div class="buttons">  
+      <input type="button" name="previewPost" value="{$locale->tr("preview")}" onclick="javascript:previewUpdatedPost()" />	
+      <input type="submit" name="updatePost" value="{$locale->tr("update")}"/>
+      <input type="hidden" name="op" value="updatePost"/>
+      <input type="hidden" name="postId" value="{$postId}"/>
+	</div>  	
   </form>
- </div>
 {if $htmlarea}
 <script type="text/javascript">
-  HTMLArea.replace('postText', config);
-  HTMLArea.replace('postExtendedText', config);
+  var postTextEditor = new HTMLArea('postText', config);
+  postTextEditor.generate();
+  var postExtendedTextEditor = new HTMLArea('postExtendedText', config);
+  postExtendedTextEditor.generate();
 </script>  
 {/if}  
 {include file="$admintemplatepath/footer.template"}
\ No newline at end of file




More information about the pLog-svn mailing list