deux titres pour la nl : un pour le mail, un pour le vrai titre
[platal.git] / templates / table-editor.tpl
index cfa08e9..c4b376d 100644 (file)
 <h1>{$title}</h1>
 
 {if $list}
-
+<script type="text/javascript">
+       {literal}
+       function redirect(a) {
+               document.location = a;
+       }
+       {/literal}
+</script>
 <table class="bicol">
 <tr>
   {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>
+    <th style="cursor:pointer" onclick="redirect('{$t->pl}/sort{if $t->sortfield eq $myvar && !$t->sortdesc}desc{/if}/{$myvar}')">{$myval.desc}{if $t->sortfield eq $myvar}{if $t->sortdesc}{icon name="bullet_arrow_down"}{else}{icon name="bullet_arrow_up"}{/if}{/if}</th>
   {/if}{/foreach}
   {if !$hideactions}
   <th>action</th>