tri automatique en cliquant sur l'entete de colonne des table editor : bug #484
[platal.git] / templates / table-editor.tpl
index dd6704c..cfa08e9 100644 (file)
@@ -27,8 +27,8 @@
 
 <table class="bicol">
 <tr>
-  {foreach from=$t->vars item=myval}{if $myval.display}
-    <th>{$myval.desc}</th>
+  {foreach from=$t->vars item=myval key=myvar}{if $myval.display}
+    <th><a href='{$t->pl}/sort{if $t->sortfield eq $myvar}desc{/if}/{$myvar}'>{$myval.desc}</a></th>
   {/if}{/foreach}
   {if !$hideactions}
   <th>action</th>
         {else}
           <input type="text" name="{$myfield}" value="{$entry.$myfield}" {if $myval.Size}size="{$myval.Size}" maxlength="{$myval.Maxlength}"{/if}/>
           {if $myval.Type eq 'timestamp'}<em>jj/mm/aaaa hh:mm:ss</em>{/if}
+          {if $myval.Type eq 'date'}<em>jj/mm/aaaa</em>{/if}
           {if $myval.Type eq 'time'}<em>hh:mm:ss</em>{/if}
         {/if}
       </td>