ok Add Modify Delete for location, next entry
This commit is contained in:
parent
a3c7a67660
commit
5b47a9d0ba
14 changed files with 260 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
|||
<ul>
|
||||
<li class="{if $current == 'index'}current{/if}"><a href="{plugin_url}">Matériels en stock</a></li>
|
||||
<li class="{if $current == 'categories'}current{/if}"><a href="{plugin_url file="categories/index.php"}">Catégories</a></li>
|
||||
<li class="{if $current == 'localisations'}current{/if}"><a href="{plugin_url file="localisations/index.php"}">Localisations</a></li>
|
||||
<li class="{if $current == 'entrees_definitives'}current{/if}"><a href="{plugin_url file="entrees_definitives.php"}"><b>Entrées définitives</b></a></li>
|
||||
<li class="{if $current == 'entrees_provisoires'}current{/if}"><a href="{plugin_url file="entrees_provisoires.php"}">Entrées provisoires</a></li>
|
||||
<li class="{if $current == 'sorties_definitives'}current{/if}"><a href="{plugin_url file="sorties_definitives.php"}">Sorties définitives</a></li>
|
||||
|
|
|
|||
38
src/templates/localisations/index.tpl
Normal file
38
src/templates/localisations/index.tpl
Normal file
|
|
@ -0,0 +1,38 @@
|
|||
{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="localisations"}
|
||||
|
||||
<form method="post" action="{$self_url}">
|
||||
<fieldset>
|
||||
<legend>Ajouter une localisation</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="loc"}
|
||||
<tr>
|
||||
<th>{$loc.name}</th>
|
||||
<td class="actions">
|
||||
{linkbutton shape="upload" label="Liste des materiels" href="materiels_par_localisation.php?id=%d"|args:$loc.id}
|
||||
{linkbutton shape="edit" label="Modifier" href="modifier_localisation.php?id=%d"|args:$loc.id}
|
||||
{linkbutton shape="delete" label="Supprimer" href="supprimer_localisation.php?id=%d"|args:$loc.id}
|
||||
</td>
|
||||
</tr>
|
||||
{/foreach}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{include file="admin/_foot.tpl"}
|
||||
|
|
@ -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="localisations"}
|
||||
|
||||
{include file="admin/_foot.tpl"}
|
||||
20
src/templates/localisations/modifier_localisation.tpl
Normal file
20
src/templates/localisations/modifier_localisation.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="localisations"}
|
||||
|
||||
<form method="post" action="{$self_url}" data-focus="1">
|
||||
{form_errors}
|
||||
<fieldset>
|
||||
<legend>Modifier cette localisation</legend>
|
||||
<dl>
|
||||
{input type="text" name="name" label="Nom" required=true source=$l}
|
||||
</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"}
|
||||
11
src/templates/localisations/supprimer_localisation.tpl
Normal file
11
src/templates/localisations/supprimer_localisation.tpl
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
{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="localisations"}
|
||||
|
||||
{include file="%scommon/delete_form.tpl"|args:$plugin_tpl
|
||||
legend="Supprimer cette localisation de matériels ?"
|
||||
warning="Êtes-vous sûr de vouloir supprimer la localisation « %s » ?"|args:$l.name
|
||||
alert="Attention, la localisation ne doit plus contenir de matériels pour pouvoir être supprimée."
|
||||
}
|
||||
|
||||
{include file="admin/_foot.tpl"}
|
||||
Loading…
Add table
Add a link
Reference in a new issue