projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix issues with logger instantiation.
[platal.git]
/
templates
/
table-editor.tpl
diff --git
a/templates/table-editor.tpl
b/templates/table-editor.tpl
index
df4100f
..
bcdb6db
100644
(file)
--- a/
templates/table-editor.tpl
+++ b/
templates/table-editor.tpl
@@
-1,6
+1,6
@@
{**************************************************************************}
{* *}
{**************************************************************************}
{* *}
-{* Copyright (C) 2003-20
06
Polytechnique.org *}
+{* Copyright (C) 2003-20
10
Polytechnique.org *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
{* http://opensource.polytechnique.org/ *}
{* *}
{* This program is free software; you can redistribute it and/or modify *}
@@
-34,17
+34,21
@@
<table class="bicol">
<tr>
{foreach from=$t->vars item=myval key=myvar}{if $myval.display}
<table class="bicol">
<tr>
{foreach from=$t->vars item=myval key=myvar}{if $myval.display}
- <th style="cursor:pointer" onclick="redirect('{$t->pl}/sort{if $t->sortfield eq $myvar
}desc{/if}/{$myvar}')">{$myval.desc
}</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>
{/if}
</tr>
{/if}{/foreach}
{if !$hideactions}
<th>action</th>
{/if}
</tr>
-{if !$readonly}
+{if !$readonly
and !$deleteonly
}
<tr class="impair">
<tr class="impair">
- <td colspan="{$t->nbfields}"><strong>nouvelle entrée</strong></td>
- <td class="action">
- <a href="{$t->pl}/new">créer{icon name=add title='nouvelle entrée'}</a>
+ <td colspan="{$t->nbfields}">
+ <strong>
+ Nouvelles entrées : <a href="{$t->pl}/new">Manuellement</a> • <a href="{$t->pl}/massadd">Depuis un CSV</a>
+ </strong>
+ </td>
+ <td class="right">
+ <a href="{$t->pl}/new">{icon name=add title='nouvelle entrée'}</a>
</td>
</tr>
{/if}
</td>
</tr>
{/if}
@@
-58,6
+62,10
@@
{/if}
{if $myval.Type eq 'timestamp'}
<span class="smaller">{$myrow.$myfield|date_format:"%x %X"}</span>
{/if}
{if $myval.Type eq 'timestamp'}
<span class="smaller">{$myrow.$myfield|date_format:"%x %X"}</span>
+ {elseif $myval.Type eq 'checkbox'}
+ <input type="checkbox" disabled="disabled"{if $myrow.$myfield} checked="checked"{/if}/>
+ {elseif $myval.Type eq 'ip_address'}
+ {$myrow.$myfield|uint_to_ip}
{else}
{$myrow.$myfield}
{/if}
{else}
{$myrow.$myfield}
{/if}
@@
-65,9
+73,11
@@
{/if}{/foreach}
{if !$hideactions}
<td class="action">
{/if}{/foreach}
{if !$hideactions}
<td class="action">
+ {if !$readonly and !$deleteonly}
+ <a href="{$t->pl}/edit/{$idval}">{icon name=page_edit title='éditer'}</a>
+ {/if}
{if !$readonly}
{if !$readonly}
- <a href="{$t->pl}/edit/{$idval}">{icon name=page_edit title='éditer'}</a>
- <a href="{$t->pl}/delete/{$idval}">{icon name=delete title='supprimer'}</a>
+ <a href="{$t->pl}/delete/{$idval}?token={xsrf_token}">{icon name=delete title='supprimer'}</a>
{/if}
</td>
{/if}
{/if}
</td>
{/if}
@@
-82,16
+92,24
@@
</p>
{/if}
</p>
{/if}
+{elseif $massadd}
+{include core=csv-importer.tpl}
+
+<p>
+<a href="{$t->pl}">back</a>
+</p>
+
{else}
<form method="post" action="{$t->pl}/update/{$id}">
{else}
<form method="post" action="{$t->pl}/update/{$id}">
+ {xsrf_token_field}
<table class="bicol">
<tr class="impair">
<th colspan="2">
{if $id}
<table class="bicol">
<tr class="impair">
<th colspan="2">
{if $id}
- modification de l'entr
é
e
+ modification de l'entr
é
e
{else}
{else}
- nouvelle entr
é
e
+ nouvelle entr
é
e
{/if}
</th>
</tr>
{/if}
</th>
</tr>
@@
-115,6
+133,8
@@
</select>
{elseif ($myval.Type eq 'textarea') or ($myval.Type eq 'varchar200')}
<textarea name="{$myfield}" rows="{if $myval.Type eq 'varchar200'}3{else}10{/if}" cols="70">{$entry.$myfield}</textarea>
</select>
{elseif ($myval.Type eq 'textarea') or ($myval.Type eq 'varchar200')}
<textarea name="{$myfield}" rows="{if $myval.Type eq 'varchar200'}3{else}10{/if}" cols="70">{$entry.$myfield}</textarea>
+ {elseif ($myval.Type eq 'checkbox')}
+ <input type="checkbox" name="{$myfield}" value="{$myval.Value}"{if $entry.$myfield} checked="checked"{/if}/>
{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}
{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}
@@
-139,4
+159,4
@@
{/if}
{/if}
-{* vim:set et sw=2 sts=2 sws=2: *}
+{* vim:set et sw=2 sts=2 sws=2
enc=utf-8
: *}