X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=templates%2Ftable-editor.tpl;h=7a0cbafdeb8bb685825d6cad049b96b9a58429e8;hb=d5494feb1293635770f81280baca242f69e85431;hp=dd6704c9acbe57ddb7674f90ce1e48abd6018d26;hpb=c4271d388f03a6c7a9e6437908e206f98ce1354a;p=platal.git diff --git a/templates/table-editor.tpl b/templates/table-editor.tpl index dd6704c..7a0cbaf 100644 --- a/templates/table-editor.tpl +++ b/templates/table-editor.tpl @@ -1,6 +1,6 @@ {**************************************************************************} {* *} -{* Copyright (C) 2003-2006 Polytechnique.org *} +{* Copyright (C) 2003-2011 Polytechnique.org *} {* http://opensource.polytechnique.org/ *} {* *} {* This program is free software; you can redistribute it and/or modify *} @@ -24,21 +24,31 @@

{$title}

{if $list} - + - {foreach from=$t->vars item=myval}{if $myval.display} - + {foreach from=$t->vars item=myval key=myvar}{if $myval.display} + {/if}{/foreach} {if !$hideactions} {/if} -{if !$readonly} +{if !$readonly and !$deleteonly} - - + {/if} @@ -50,8 +60,15 @@ {if $myfield eq $t->idfield} {assign var="idval" value=$myrow.$myfield} {/if} + {if $t->idfield2 && $myfield eq $t->idfield2} + {assign var="idval2" value=$myrow.$myfield} + {/if} {if $myval.Type eq 'timestamp'} {$myrow.$myfield|date_format:"%x %X"} + {elseif $myval.Type eq 'checkbox'} + + {elseif $myval.Type eq 'ip_address'} + {$myrow.$myfield|uint_to_ip} {else} {$myrow.$myfield} {/if} @@ -59,9 +76,11 @@ {/if}{/foreach} {if !$hideactions} {/if} @@ -76,16 +95,24 @@

{/if} +{elseif $massadd} +{include core=csv-importer.tpl} + +

+back +

+ {else} + {xsrf_token_field}
{$myval.desc}{$myval.desc}{if $t->sortfield eq $myvar}{if $t->sortdesc}{icon name="bullet_arrow_down"}{else}{icon name="bullet_arrow_up"}{/if}{/if}action
nouvelle entrée - créer{icon name=add title='nouvelle entrée'} + + + Nouvelles entrées : ManuellementDepuis un CSV + + + {icon name=add title='nouvelle entrée'}
+ {if !$readonly and !$deleteonly} + {icon name=page_edit title='éditer'} + {/if} {if !$readonly} - {icon name=page_edit title='éditer'} - {icon name=delete title='supprimer'} + {icon name=delete title='supprimer'} {/if}
@@ -109,9 +136,12 @@ {elseif ($myval.Type eq 'textarea') or ($myval.Type eq 'varchar200')} + {elseif ($myval.Type eq 'checkbox')} + {else} {if $myval.Type eq 'timestamp'}jj/mm/aaaa hh:mm:ss{/if} + {if $myval.Type eq 'date'}jj/mm/aaaa{/if} {if $myval.Type eq 'time'}hh:mm:ss{/if} {/if} @@ -132,4 +162,4 @@ {/if} -{* vim:set et sw=2 sts=2 sws=2: *} +{* vim:set et sw=2 sts=2 sws=2 enc=utf-8: *}
- {if $id} - modification de l'entrée + {if $id !== null} + modification de l'entrée {else} - nouvelle entrée + nouvelle entrée {/if}