[ 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/ -> editposts.template (source)

   1  {include file="$admintemplatepath/header.template"}
   2  {include file="$admintemplatepath/navigation.template" showOpt=editPosts title=$locale->tr("editPosts")}
   3      <script type="text/javascript" src="js/ui/plogui.js"></script>
   4      <script type="text/javascript">
   5          var errorPostStatusMsg = '{$locale->tr("error_post_status")}';
   6          var showMassiveChangeOption = '{$locale->tr("show_massive_change_option")}';
   7          var hideMassiveChangeOption = '{$locale->tr("hide_massive_change_option")}';
   8      </script>
   9      <script type="text/javascript">
  10      {literal}
  11      YAHOO.util.Event.addListener( window, "load", function() {
  12              var t = new Lifetype.UI.TableEffects( "list" );
  13              t.stripe();
  14              t.highlightRows();
  15          });
  16      {/literal}
  17      </script>    
  18            <div id="list_nav_bar">
  19              <div id="list_nav_select">
  20                  <form id="showBy" action="admin.php" method="post">
  21                  <fieldset>
  22                  <legend>{$locale->tr("show_by")}</legend>
  23  
  24                      <div class="list_nav_option">
  25                      <label for="showCategory">{$locale->tr("category")}</label>
  26                      <br />
  27                      <select name="showCategory" id="showCategory">
  28                       <option value="-1">{$locale->tr("category_all")}</option>
  29                       {foreach from=$categories item=category}
  30                       <option value="{$category->getId()}" {if $currentcategory == $category->getId()} selected="selected"{/if}>{$category->getName()}</option>
  31                       {/foreach}
  32                      </select>
  33                      </div>
  34  
  35                      <div class="list_nav_option">
  36                      <label for="showStatus">{$locale->tr("status")}</label>
  37                      <br />
  38                      <select name="showStatus" id="showStatus">
  39                       {foreach from=$poststatus key=name item=status}
  40                       <option value="{$status}" {if $currentstatus == $status} selected="selected"{/if}>{$locale->tr($name)}</option>
  41                       {/foreach}
  42                      </select>
  43                      </div>
  44  
  45                      <div class="list_nav_option">
  46                      <label for="showUser">{$locale->tr("author")}</label>
  47                      <br />
  48                      <select name="showUser" id="showUser">
  49                        <option value="0" {if $currentuser == 0} selected="selected" {/if}>{$locale->tr("author_all")}</option>
  50                        {foreach from=$users item=bloguser}
  51                         <option value="{$bloguser->getId()}" {if $currentuser == $bloguser->getId()} selected="selected" {/if}>{$bloguser->getUsername()}</option>
  52                        {/foreach}
  53                      </select>
  54                      </div>
  55  
  56                      <div class="list_nav_option">
  57                      <label for="time">{$locale->tr("date")}</label>
  58                      <br />
  59                      <select name="showMonth" id="time">
  60                       <option value="-1" {if $currentmonth == -1} selected="selected" {/if}>{$locale->tr("all")}</option>
  61                       {foreach from=$months item=month}
  62                       <option value="{$month.date}" {if $currentmonth == $month.date} selected="selected" {/if}>{$month.name}</option>
  63                       {/foreach}
  64                      </select>
  65                      </div>
  66  
  67                      <div class="list_nav_option">
  68                      <label for="search">{$locale->tr("search_terms")}</label>
  69                      <br />
  70                      <input type="text" name="searchTerms" value="{$searchTerms}" size="15" id="search" />
  71                      </div>
  72  
  73                      <div class="list_nav_option">
  74                      <br />
  75                      <input type="hidden" name="op" value="editPosts" />
  76                      <input type="submit" name="Show" value="{$locale->tr("show")}" class="submit" />
  77                      </div>
  78  
  79                  </fieldset>
  80                  </form>
  81              </div>
  82              <br style="clear:both;" />
  83          </div>
  84  
  85          <form id="postsList" action="admin.php" method="post">
  86          {check_perms perm=update_post}
  87          <div class="optionIcon">
  88              <a id="optionIconLink" href="#bulkEdit" title="{$locale->tr("show_massive_change_option")}" onclick="switchMassiveOption()">{$locale->tr("show_massive_change_option")}</a>
  89          </div>
  90          {/check_perms}
  91          <div id="list">
  92    {include file="$admintemplatepath/successmessage.template"}
  93    {include file="$admintemplatepath/errormessage.template"}
  94              <table id="list" class="info" summary="{$locale->tr("editPosts")}">
  95                  <thead>
  96                      <tr>
  97                          <th><input class="checkbox" type="checkbox" name="all" id="all" value="1" onclick="toggleAllChecks('postsList');" /></th>
  98                          <th style="width:40%;">{$locale->tr("topic")}</th>
  99                          <th style="width:10%;">{$locale->tr("date")}</th>
 100                          <th style="width:10%;">{$locale->tr("author")}</th>
 101                          <th style="width:10%;">{$locale->tr("status")}</th>
 102                          <th style="width:5%;text-align:center;">CM</th>
 103                          <th style="width:5%;text-align:center;">TB</th>
 104                          <th style="width:5%;text-align:center;">{$locale->tr("num_reads")}</th>
 105                          <th style="width:10%;">{$locale->tr("actions")}</th>
 106                      </tr>
 107                  </thead>
 108                  <tbody>
 109                   {foreach from=$posts item=post}
 110                      <tr>
 111                          <td>
 112                              <input class="checkbox" type="checkbox" name="postIds[{$post->getId()}]" id="checks_{$post->getId()}" value="{$post->getId()}" />
 113                          </td>
 114                          <td class="col_highlighted">
 115                              {check_perms perm=update_post}<a href="?op=editPost&amp;postId={$post->getId()}">{/check_perms}
 116                              {$post->getTopic()|strip_tags}
 117                              {check_perms perm=update_post}</a>{/check_perms}<br />
 118                              &nbsp;&raquo;
 119                              <span style="font-weight: normal;">
 120                              {foreach name=postCategories from=$post->getCategories() item=postCategory}
 121                                  <a href="?op=editPosts&amp;showCategory={$postCategory->getId()}&amp;showStatus=0">{$postCategory->getName()}</a>{if !$smarty.foreach.postCategories.last}, {/if}
 122                              {/foreach}
 123                              </span>
 124                          </td>
 125                          <td>
 126                              {assign var=date value=$post->getDateObject()}
 127                              {$locale->formatDate($date)}
 128                          </td>
 129                          <td>
 130                              {assign var=owner value=$post->getUserInfo()}
 131                              {$owner->getUsername()}
 132                          </td>
 133                          <td>
 134                            {foreach from=$poststatus key=name item=status}
 135                             {if $post->getStatus() == $status}
 136                              {if $status == 1}<span style="color:green">{$locale->tr($name)}</span>
 137                              {elseif $status == 2}<span style="color:blue">{$locale->tr($name)}</span>
 138                              {elseif $status == 3}<span style="color:red">{$locale->tr($name)}</span>
 139                              {else}{$locale->tr("$name")}{/if}
 140                             {/if}
 141                            {/foreach}
 142                          </td>
 143                          <td style="text-align: center;">
 144                              {if $post->getTotalComments(false) > 0}
 145                               <a href="?op=editComments&amp;articleId={$post->getId()}">({$post->getTotalComments(false)})</a>
 146                              {else}
 147                               0
 148                              {/if}
 149                          </td>
 150                          <td style="text-align: center;">
 151                              {if $post->getTotalTrackbacks() > 0}
 152                               <a href="?op=editTrackbacks&amp;articleId={$post->getId()}">({$post->getTotalTrackbacks(false)})</a>
 153                              {else}
 154                               0
 155                              {/if}
 156                          </td>
 157                          <td style="text-align: center;">
 158                              {$post->getNumReads()}
 159                          </td>
 160                          <td>
 161                              {check_perms perm=update_post}
 162                              <div class="list_action_button">
 163                              <a href="?op=editPost&amp;postId={$post->getId()}" title="{$locale->tr("edit")}">
 164                                  <img src="imgs/admin/icon_edit-16.png" alt="{$locale->tr("edit")}" />
 165                              </a>
 166                              <a href="?op=deletePost&amp;postId={$post->getId()}" title="{$locale->tr("delete")}">
 167                                  <img src="imgs/admin/icon_delete-16.png" alt="{$locale->tr("delete")}" />
 168                              </a>
 169                              {/check_perms}
 170                              <a href="{$url->postPermalink($post)}" title="{$locale->tr("permalink")}">
 171                                  <img src="imgs/admin/icon_url-16.png" alt="{$locale->tr("permalink")}" />
 172                              </a>
 173                              {check_perms perm=view_blog_stats}
 174                              <a href="?op=postStats&amp;postId={$post->getId()}" title="{$locale->tr("Stats")}">
 175                                  <img src="imgs/admin/icon_stats-16.png" alt="{$locale->tr("Stats")}" />
 176                              </a>
 177                              {/check_perms}
 178                              </div>
 179                          </td>
 180                      </tr>
 181                      {/foreach}
 182                  </tbody>
 183              </table>
 184          </div>
 185          <a name="bulkEdit"></a>
 186          <div id="list_action_bar">
 187              {adminpager style="list"}
 188              {check_perms perm=update_post}
 189              <input type="button" name="delete" value="{$locale->tr("delete")}" class="submit" onClick="javascript:submitPostsList('deletePosts');" />
 190              <input type="hidden" name="op" value="" />
 191              {/check_perms}
 192              {check_perms perm=update_post}
 193              <div id="massiveChangeOption" style="display: none">
 194                  <fieldset>
 195                  <legend>{$locale->tr("massive_change_option")}</legend>            
 196                      <label for="postStatus">{$locale->tr("status")}</label>
 197                      <select name="postStatus" id="postStatus">
 198                        <option value="-1">-{$locale->tr("select")}-</option>
 199                        {foreach from=$poststatusWithoutAll key=name item=status}
 200                          <option value="{$status}">{$locale->tr($name)}</option>
 201                        {/foreach}
 202                      </select>
 203                      <input type="button" name="changePostsStatus" value="{$locale->tr("change_status")}" class="submit" onClick="javascript:submitPostsList('changePostsStatus');" />
 204                      <label for="postCategories[]">{$locale->tr("categories")}</label>
 205                      <select name="postCategories[]" id="postCategories" size="5" multiple="multiple">
 206                        {foreach name=categories from=$categories item=category}
 207                          <option value="{$category->getId()}" {if $smarty.foreach.categories.first} selected="selected" {/if}>{$category->getName()}</option>
 208                        {/foreach}
 209                      </select>
 210                      <input type="button" name="changePostsCategory" value="{$locale->tr("change_category")}" class="submit" onClick="javascript:submitPostsList('changePostsCategory');" />
 211                  </fieldset>
 212              </div>
 213              {/check_perms}
 214          </div>
 215  
 216          </form>
 217  {include file="$admintemplatepath/footernavigation.template"}
 218  {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