Add a 'deleteonly' flag to pltableeditor
authorAymeric Augustin <aymeric.augustin@m4x.org>
Sun, 9 Nov 2008 13:52:29 +0000 (14:52 +0100)
committerAymeric Augustin <aymeric.augustin@m4x.org>
Sun, 9 Nov 2008 13:52:53 +0000 (14:52 +0100)
templates/table-editor.tpl

index e16826e..3915794 100644 (file)
@@ -40,7 +40,7 @@
   <th>action</th>
   {/if}
 </tr>
-{if !$readonly}
+{if !$readonly and !$deleteonly}
 <tr class="impair">
   <td colspan="{$t->nbfields}">
     <strong>
 {/if}{/foreach}
   {if !$hideactions}
   <td class="action">
-    {if !$readonly}
+    {if !$readonly and !$deleteonly}
     <a href="{$t->pl}/edit/{$idval}">{icon name=page_edit title='éditer'}</a>
+    {/if}
+    {if !$readonly}
     <a href="{$t->pl}/delete/{$idval}?token={xsrf_token}">{icon name=delete title='supprimer'}</a>
     {/if}
   </td>