Ok for Add Modify Delete categories, next location
This commit is contained in:
parent
5f226732ad
commit
a3c7a67660
11 changed files with 134 additions and 28 deletions
|
|
@ -26,6 +26,8 @@
|
|||
<tr>
|
||||
<th>{$cat.name}</th>
|
||||
<td class="actions">
|
||||
{linkbutton shape="upload" label="Liste des materiels" href="materiels_par_categorie.php?id=%d"|args:$cat.id}
|
||||
{linkbutton shape="edit" label="Modifier" href="modifier_categorie.php?id=%d"|args:$cat.id}
|
||||
{linkbutton shape="delete" label="Supprimer" href="supprimer_categorie.php?id=%d"|args:$cat.id}
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
5
src/templates/categories/materiels_par_categorie.tpl
Normal file
5
src/templates/categories/materiels_par_categorie.tpl
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
{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"}
|
||||
|
||||
{include file="admin/_foot.tpl"}
|
||||
20
src/templates/categories/modifier_categorie.tpl
Normal file
20
src/templates/categories/modifier_categorie.tpl
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{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}" data-focus="1">
|
||||
{form_errors}
|
||||
<fieldset>
|
||||
<legend>Modifier cette catégorie</legend>
|
||||
<dl>
|
||||
{input type="text" name="name" label="Nom" required=true source=$c}
|
||||
</dl>
|
||||
</fieldset>
|
||||
<p class="submit">
|
||||
{csrf_field key=$csrf_key}
|
||||
{button type="submit" name="save" label="Enregistrer" shape="right" class="main"}
|
||||
{linkbutton label="Annuler" shape="export" href=$cancel_link}
|
||||
</p>
|
||||
</form>
|
||||
|
||||
{include file="admin/_foot.tpl"}
|
||||
|
|
@ -4,7 +4,7 @@
|
|||
|
||||
{include file="%scommon/delete_form.tpl"|args:$plugin_tpl
|
||||
legend="Supprimer cette catégorie de matériels ?"
|
||||
warning="Êtes-vous sûr de vouloir supprimer la catégorie « %s » ?"|args:$cat.name
|
||||
warning="Êtes-vous sûr de vouloir supprimer la catégorie « %s » ?"|args:$c.name
|
||||
alert="Attention, la catégorie ne doit plus contenir de matériels pour pouvoir être supprimée."
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
{form_errors}
|
||||
|
||||
<form method="post" action="{$self_url}" data-focus="1">
|
||||
{form_errors}
|
||||
<fieldset>
|
||||
<legend>{$legend}</legend>
|
||||
<h3 class="warning">{$warning}</h3>
|
||||
|
|
@ -9,5 +8,6 @@
|
|||
<p class="submit">
|
||||
{csrf_field key=$csrf_key}
|
||||
{button type="submit" name="delete" label="Supprimer" shape="delete" class="main"}
|
||||
{linkbutton label="Annuler" shape="export" href=$cancel_link}
|
||||
</p>
|
||||
</form>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue