Add categories template and ok to add one category in db, next modify and delete.
This commit is contained in:
parent
4448a9bde1
commit
2f9b57a842
7 changed files with 97 additions and 0 deletions
35
src/templates/categories.tpl
Normal file
35
src/templates/categories.tpl
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
{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>
|
||||
<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"}
|
||||
Loading…
Add table
Add a link
Reference in a new issue