materiels/src/templates/categories/index.tpl
2021-06-03 19:30:07 +02:00

37 lines
886 B
Smarty

{include file="admin/_head.tpl" title="%s"|args:$plugin.nom current="plugin_%s"|args:$plugin.id}
{include file="%s_nav.tpl"|args:$plugin_tpl current="categories"}
<form method="post" action="{$self_url}">
<fieldset>
<legend>Ajouter une catégorie</legend>
{form_errors}
<dl>
{input type="text" name="name" label="Nom" required=true}
</dl>
<p class="submit">
{csrf_field key=$csrf_key}
{button type="submit" name="save" label="Ajouter" shape="right" class="main"}
</p>
</fieldset>
</form>
<table class="list">
<thead>
<th>Nom</th>
<td></td>
</thead>
<tbody>
{foreach from=$list item="cat"}
<tr>
<th>{$cat.name}</th>
<td class="actions">
{linkbutton shape="delete" label="Supprimer" href="supprimer_categorie.php?id=%d"|args:$cat.id}
</td>
</tr>
{/foreach}
</tbody>
</table>
{include file="admin/_foot.tpl"}