Forgotten commits
[platal.git] / templates / admin / valider.tpl
index 7dbd1eb..a05d898 100644 (file)
@@ -33,7 +33,7 @@
 <br />
 <table class="bicol">
   <tr>
-    <th colspan="2">{$valid->type}</th>
+    <th colspan="2"><a id="valid{$valid->id()}"></a>{$valid->type}</th>
   </tr>
   <tr>
     <td class="titre" style="width: 20%">Demandeur&nbsp;:</td>
     </td>
   </tr>
   {include file=$valid->formu()}
+  {if $valid->editor()}
+  <tr>
+    <td colspan="2" class="center">
+      {if $preview_id == $valid->id()}
+      <form enctype="multipart/form-data" action="{$platal->pl_self()}#valid{$valid->id()}" method="post">
+        <div>
+          {include file=$valid->editor()}
+          <input type="hidden" name="uid"    value="{$valid->uid}" />
+          <input type="hidden" name="type"   value="{$valid->type}" />
+          <input type="hidden" name="stamp"  value="{$valid->stamp}" />
+          <br />
+          <input type="submit" name="edit"   value="Editer" />
+        </div>
+      </form>
+      {else}
+      <span class="smaller">
+        <a href="admin/validate/edit/{$valid->id()}#valid{$valid->id()}">{icon name=page_edit}Editer cette demande avant validation</a>
+      </span>
+      {/if}
+    </td>
+  </tr>
+  {/if}
   <tr><th colspan='2'>Commentaires</th></tr>
   {foreach from=$valid->comments item=c}
   <tr class="{cycle values="impair,pair"}">
 
 <p>
   Afficher seulement les validation suivantes :
-  <form action="admin/validate" method="post">
-    {foreach from=$categories item=type}
-      <div style="float:left;width:33%"><input type="checkbox" name="{$type}" id="hide_{$type}"{if !$hide_requests[$type]} checked="checked"{/if}/>
-      <label for="hide_{$type}">{$type}</label></div>
-    {/foreach}
-    <div class="center" style="clear:left"><input type="submit" name="hide"/></div>
-  </form>
 </p>
 
+<form action="admin/validate" method="post">
+  {foreach from=$categories item=type}
+    <div style="float:left;width:33%"><input type="checkbox" name="{$type}" id="hide_{$type}"{if !$hide_requests[$type]} checked="checked"{/if}/>
+    <label for="hide_{$type}">{$type}</label></div>
+  {/foreach}
+  <div class="center" style="clear:left"><input type="submit" name="hide" value="Valider" /></div>
+</form>
+
 {* vim:set et sw=2 sts=2 sws=2: *}