[ Index ]
 

Code source de LifeType 1.2.4

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/templates/admin/ -> editpost.template (source)

   1  {include file="$admintemplatepath/header.template"}
   2  {include file="$admintemplatepath/navigation.template" showOpt=editPosts title=$locale->tr("editPost")}
   3  <link rel="stylesheet" type="text/css" media="all" href="js/jscalendar/calendar-win2k-cold-1.css" title="win2k-cold-1" />
   4  <script type="text/javascript" src="js/jscalendar/calendar_stripped.js"></script>
   5  <script type="text/javascript" src="js/jscalendar/lang/calendar-en.js"></script>
   6  <script type="text/javascript" src="js/jscalendar/calendar-setup_stripped.js"></script>
   7  <script type="text/javascript" src="js/ui/plogui.js"></script>
   8  {assign var=htmlarea value=$blogsettings->getValue("htmlarea_enabled")}
   9   {if $htmlarea}
  10    <script type="text/javascript" src="js/tinymce/tiny_mce_gzip.php"></script>
  11    <script type="text/javascript" src="js/tinymce/tiny_mce-plog.js"></script>
  12   {else}
  13    <script type="text/javascript" src="js/editor/lifetypeeditor.js"></script>
  14   {/if} 
  15  
  16   <script type="text/javascript">
  17    
  18    // some messages that we are going to need in the functions above 
  19    var htmlAreaEnabled = {if $htmlarea==0 || !$htmlarea}false{else}true{/if};
  20    var msgSaving = "{$locale->tr("saving_message")}";  
  21    var preview = false;
  22  
  23  {literal} 
  24  function selectOperation( t )
  25  {
  26      if( preview ) {    
  27          document.newPost.op.value="previewPost";
  28          window.open("", t, "scrollbars=yes,resizable=yes,toolbar=no" );
  29          return true;
  30      }
  31      else {
  32          document.newPost.op.value="updatePost";
  33          document.newPost.target="";
  34          document.newPost.action="admin.php";
  35          return true;
  36      }
  37  }
  38  {/literal}
  39   </script>
  40    <form name="newPost" id="newPost" action="admin.php" method="post" onSubmit="return selectOperation(this.target);" target="admin">   
  41     <fieldset class="inputField">
  42     <legend>{$locale->tr("editPost")}</legend>
  43     <div id="mainPanel" style="float:left; width: 73%; border-right: 1px solid #DEDEDE;">  
  44       {include file="$admintemplatepath/formvalidate.template"}    
  45       
  46         <div class="field">
  47           <label for="postTopic">{$locale->tr("topic")}</label>
  48           <span class="required">*</span>
  49           <div class="formHelp">{$locale->tr("topic_help")}</div>
  50           <input type="text" id="postTopic" name="postTopic" style="width:100%" value="{$postTopic|escape:"html"}" />
  51           {include file="$admintemplatepath/validate.template" field=postTopic message=$locale->tr("error_missing_post_topic")}
  52         </div>
  53         
  54         <!-- text field custom fields -->
  55         {include file="$admintemplatepath/newpost_customfields.template" type=1 fields=$customfields}       
  56         
  57         
  58         <div class="field">
  59           <label for="postText">{$locale->tr("text")}</label>
  60           <span class="required">*</span>
  61           <div class="formHelp">{$locale->tr("text_help")}</div>
  62           {if !$htmlarea}<script type="text/javascript">var ed1 = new Lifetype.UI.Editor('postText','ed1');</script>{/if}
  63           <textarea {if $htmlarea==1}rows="20"{else}rows="15"{/if} id="postText" name="postText" style="width:100%">{$postText}</textarea>
  64           <a href="{if $htmlarea}javascript:tinyMCE.execInstanceCommand('mce_editor_0','mceinsertresource',true);{else}javascript:ed1.execute('postText','7_but_res',''){/if}">{$locale->tr("insert_media")}</a> |
  65               <a href="{if $htmlarea}javascript:tinyMCE.execInstanceCommand('mce_editor_0','mcemoremore');{else}javascript:ed1.execute('postText','8_but_more',''){/if}">{$locale->tr("insert_more")}</a>
  66           {include file="$admintemplatepath/validate.template" field=postText message=$locale->tr("error_missing_post_text")}   
  67         </div>
  68         
  69         <!-- text area custom fields -->
  70        {include file="$admintemplatepath/newpost_customfields.template" type=2 fields=$customfields}
  71     </div>       
  72     
  73     <div id="optionPanel" style="float:left; width: 23%; margin-left: 8px;">   
  74       
  75         <div class="field">
  76           <label for="postSlug">{$locale->tr("post_slug")}</label>
  77           <div class="formHelp">{$locale->tr("post_slug_help")}</div>
  78           <input type="text" name="postSlug" id="postSlug" style="width:100%" value="{$postSlug|escape:"html"}" />
  79         </div>
  80         
  81         <div class="field">
  82              <label for="postDateTime">{$locale->tr("date")}</label>
  83           <span class="required">*</span>
  84           <div class="formHelp">{$locale->tr("post_date_help")}</div>
  85           <input name="postDateTime" id="postDateTime" class="dateTime" readonly="true" type="text" size="16" value="{$postDay}/{$postMonth}/{$postYear} {$postHour}:{$postMinutes}" style="margin-bottom: 4px;" />
  86           <img src="imgs/admin/cal.jpg" id="postDateTimeSelector" alt="{$locale->tr("date")}" style="cursor: pointer; border: 0px; width: 16px; height: 14px; padding: 0;" />
  87         </div>
  88  
  89         <script type="text/javascript">
  90         var MondayFirstDay = ( {$locale->firstDayOfWeek()} == 1);
  91         {literal}
  92             Calendar.setup({
  93                 inputField  : "postDateTime",
  94                 ifFormat    : "%d/%m/%Y %H:%M",
  95                 button      : "postDateTimeSelector",
  96                 showsTime   : true,
  97                 timeFormat  : "24",
  98                 electric    : false,
  99                 align       : "Bl",
 100                 firstDay    : MondayFirstDay,
 101                 singleClick : true
 102             });
 103         {/literal}
 104         </script>
 105         
 106         <!-- date custom fields -->
 107         {include file="$admintemplatepath/newpost_customfields.template" type=4 fields=$customfields}       
 108  
 109         <div class="field">
 110           <label for="postStatus">{$locale->tr("status")}</label>
 111           <span class="required">*</span>         
 112           <div class="formHelp">{$locale->tr("post_status_help")}</div>
 113           <select name="postStatus" id="postStatus">
 114             {foreach from=$poststatus key=name item=status}
 115             <option value="{$status}" {if $postStatus == $status} selected="selected"{/if}>{$locale->tr($name)}</option>
 116             {/foreach}
 117           </select>       
 118         </div>
 119      
 120        <!-- user field -->
 121        {check_perms perm=update_all_user_articles}
 122         <div class="field">
 123          <label for="postUser">{$locale->tr("posted_by")}</label>
 124           <span class="required">*</span>         
 125           <div class="formHelp">{$locale->tr("posted_by_help")}</div>
 126           <select name="postUser" id="postUser">
 127             {foreach from=$blog->getUsersInfo() item=bloguser}
 128              <option value="{$bloguser->getId()}" {if $postUser==$bloguser->getId()}selected="selected"{/if}>{$bloguser->getUserName()}</option>
 129             {/foreach}
 130          </select>       
 131         </div>
 132         {/check_perms}    
 133         
 134         <div class="field">
 135           <label for="postCategories[]">{$locale->tr("categories")}</label>
 136           <span class="required">*</span>
 137           <div class="formHelp">{$locale->tr("post_categories_help")}</div>
 138           <select name="postCategories[]" id="postCategories" size="5" multiple="multiple" style="width:100%">
 139             {foreach from=$categories item=category}
 140             <option value="{$category->getId()}" {foreach from=$postCategories item=categoryId}{if $category->getId() == $categoryId} selected="selected" {/if}{/foreach}>{$category->getName()}</option>
 141             {/foreach}
 142           </select>
 143           <input type="text" name="newArticleCategory" id="newArticleCategory" style="width:100px; margin-top:3px;" size="16" value="" />
 144           <input type="button" name="addArticleCategory" id="addArticleCategory" style="width:auto;margin-top:3px;" value="{$locale->tr("add")}" onclick="javascript:addArticleCategoryAjax()" />
 145          {include file="$admintemplatepath/validate.template" field=postCategories message=$locale->tr("error_no_categories")}       
 146         </div>
 147         
 148        <div class="field">
 149           <label for="globalArticleCategoryId">{$locale->tr("global_category")}</label>
 150           <span class="required">*</span>
 151           <div class="formHelp">{$locale->tr("global_article_category_help")}</div>
 152          <select name="globalArticleCategoryId" id="globalArticleCategoryId" size="1" style="width:100%">
 153             <option value="0" {if 0 == $globalArticleCategoryId} selected="selected" {/if}>{$locale->tr("none")}</option>
 154             {foreach from=$globalcategories item=globalcategory}
 155             <option value="{$globalcategory->getId()}" {if $globalcategory->getId() == $globalArticleCategoryId} selected="selected" {/if}>{$globalcategory->getName()}</option>
 156             {/foreach}
 157           </select>
 158          {include file="$admintemplatepath/validate.template" field=globalArticleCategoryId message=$locale->tr("error_no_global_article_category_selected")}       
 159         </div>   
 160  
 161         <!-- list custom fields -->
 162         {include file="$admintemplatepath/newpost_customfields.template" type=5 fields=$customfields}
 163            
 164         <div class="field_checkbox">
 165           <input class="checkbox" type="checkbox" id="commentsEnabled" name="commentsEnabled" value="1" {if $postCommentsEnabled} checked="checked" {/if}/>
 166           <label for="commentsEnabled">{$locale->tr("post_comments_enabled_help")}</label>
 167         </div>
 168         
 169         <div class="field_checkbox">
 170           <input class="checkbox" type="checkbox" id="sendNotification" name="sendNotification" value="1" {if $sendNotification} checked="checked" {/if}/>
 171           <label for="sendNotification">{$locale->tr("send_notification_help")}</label>
 172         </div>
 173         
 174         <div class="field_checkbox">
 175           <input class="checkbox" type="checkbox" id="sendTrackbacks" name="sendTrackbacks" value="1" {if $sendTrackbacks} checked="checked" {/if}/>  
 176           <label for="sendTrackbacks">{$locale->tr("send_trackback_pings_help")}</label>
 177         </div>
 178         
 179         {if $xmlRpcPingEnabled}
 180            <div class="field_checkbox">    
 181           <input class="checkbox" type="checkbox" name="sendPings" id="sendPings" value="1" {if $sendPings} checked="checked" {/if}/>
 182           <label for="sendPings">{$locale->tr("send_xmlrpc_pings_help")}</label>
 183          </div>
 184         {/if}
 185        
 186          <!-- checkbox custom fields -->
 187        {include file="$admintemplatepath/newpost_customfields.template" type=3 fields=$customfields}      
 188  
 189      </div>
 190      </fieldset>
 191      <div class="buttons">  
 192        <input type="submit" name="previewPost" value="{$locale->tr("preview")}" onClick="preview=true" />    
 193        <input type="submit" name="updatePost" value="{$locale->tr("update")}" onClick="preview=false"/>
 194        <input type="hidden" name="op" value="updatePost"/>
 195        <input type="hidden" name="postId" id="postId" value="{$postId}"/>
 196      </div>      
 197    </form>
 198  {include file="$admintemplatepath/footernavigation.template"}
 199  {include file="$admintemplatepath/footer.template"}


Généré le : Mon Nov 26 21:04:15 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics