Réorganisation module
This commit is contained in:
parent
84fb29c15d
commit
553cbdf978
21 changed files with 718 additions and 201 deletions
103
historique.html
103
historique.html
|
|
@ -1,5 +1,6 @@
|
|||
{{* -*- brindille -*- *}}
|
||||
|
||||
|
||||
{{:assign equipment_key=$_GET.key|trim}}
|
||||
{{#load key=$_GET.key assign="equipment"}}
|
||||
{{else}}
|
||||
|
|
@ -10,7 +11,28 @@
|
|||
{{else}}
|
||||
{{:error message="Le matériel %s n'appartient à aucune catégorie"|args:$equipment.designation}}
|
||||
{{/load}}
|
||||
{{:admin_header title="Historique des mouvements de %s (%s)"|args:$equipment.designation:$category.name current="module_equipment"}}
|
||||
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
|
||||
|
||||
{{if $_GET.ok}}
|
||||
{{if $_GET.msg == "modification"}}
|
||||
<p class="block confirm">Modification enregistrée</p>
|
||||
{{elseif $_GET.msg == "suppression"}}
|
||||
<p class="block confirm">Mouvement supprimé</p>
|
||||
{{else}}
|
||||
<p class="block confirm">{{$_GET.msg}}</p>
|
||||
{{/if}}
|
||||
{{elseif $_GET.err}}
|
||||
{{if $_GET.msg == "suppression"}}
|
||||
<p class="block error">Ce mouvement ne peut être supprimé</p>
|
||||
{{else}}
|
||||
<p class="block error">{{$_GET.msg}}</p>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
{{* barre de navigation *}}
|
||||
{{if ! $dialog}}
|
||||
{{:include file="./_nav.html" current="mouvements"}}
|
||||
{{/if}}
|
||||
|
||||
{{* récupérer la config des entrées/sorties *}}
|
||||
{{:include file="./_get_config.html" keep="config"}}
|
||||
|
|
@ -29,6 +51,7 @@
|
|||
{{/if}}
|
||||
{{/if}}
|
||||
{{/foreach}}
|
||||
|
||||
{{#foreach from=$config.output_nature key=mvt item=type_mvt}}
|
||||
{{if $_GET.prop}}
|
||||
{{* matériel propriété de l'asso *}}
|
||||
|
|
@ -44,6 +67,8 @@
|
|||
{{/foreach}}
|
||||
|
||||
{{* lister tous les mouvements du matériel passé en paramètre *}}
|
||||
<h2>Mouvements de {{$equipment.designation}} ({{$category.name}})</h2>
|
||||
|
||||
{{#list
|
||||
type="movement"
|
||||
select="$$.date AS 'Date';
|
||||
|
|
@ -55,6 +80,11 @@
|
|||
order=1
|
||||
}}
|
||||
{{:assign var="type_mvt" from="config.%s_nature.%s"|args:$direction:$col3}}
|
||||
{{if $direction == 'input'}}
|
||||
{{:assign sens="entree"}}
|
||||
{{else}}
|
||||
{{:assign sens="sortie"}}
|
||||
{{/if}}
|
||||
|
||||
{{if $direction === "input" && $input_nature|in:$input_types ||
|
||||
$direction === "output"&& $output_nature|in:$output_types
|
||||
|
|
@ -66,61 +96,40 @@
|
|||
<td>{{$amount}}</td>
|
||||
<td>{{$comment}}</td>
|
||||
<td class="actions">
|
||||
{{if $direction === "input"}}
|
||||
{{* entrée *}}
|
||||
{{if $type_mvt == 'temporaire'}}
|
||||
{{:linkbutton
|
||||
{{if $direction === "input" && $type_mvt == 'temporaire'}}
|
||||
{{:linkbutton
|
||||
label="Retour"
|
||||
href="mouvements/sorties/emprunte.html?key=%s"|args:$key
|
||||
href="mouvements/sorties/emprunte.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
||||
shape="history"
|
||||
target="_dialog"}}
|
||||
{{elseif $type_mvt == 'définitif'}}
|
||||
{{:linkbutton
|
||||
{{elseif $direction === "input" && $type_mvt == 'définitif'}}
|
||||
{{:linkbutton
|
||||
label="Sortir"
|
||||
href="mouvements/sorties/stock_disponible.html?key=%s"|args:$key
|
||||
href="mouvements/sorties/stock_disponible.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
||||
shape="minus"
|
||||
target="_dialog"}}
|
||||
{{/if}}
|
||||
{{elseif $direction === "output" && $type_mvt == 'temporaire'}}
|
||||
{{:linkbutton
|
||||
label="Dupliquer"
|
||||
href="mouvements/dupliquer_mouvement.html?mvt_key=%s&direction=input"|args:$key
|
||||
shape="plus"
|
||||
target="_dialog"}}
|
||||
{{:linkbutton
|
||||
label="Modifier"
|
||||
href="mouvements/modifier_mouvement.html?key=%s&direction=input"|args:$key
|
||||
shape="edit"
|
||||
target="_dialog"}}
|
||||
{{:linkbutton
|
||||
label="Supprimer"
|
||||
href="mouvements/entrees/delete_entree.html?key=%s"|args:$key
|
||||
shape="delete"
|
||||
target="_dialog"}}
|
||||
{{else}}
|
||||
{{* sortie *}}
|
||||
{{if $type_mvt == 'temporaire'}}
|
||||
{{:linkbutton
|
||||
label="Retour"
|
||||
href="mouvements/entrees/retour.html?key=%s"|args:key
|
||||
shape="history"
|
||||
target="_dialog"}}
|
||||
{{/if}}
|
||||
{{:linkbutton
|
||||
label="Dupliquer"
|
||||
href="mouvements/dupliquer_mouvement.html?mvt_key=%s&direction=output"|args:$key
|
||||
shape="plus"
|
||||
target="_dialog"}}
|
||||
{{:linkbutton
|
||||
label="Modifier"
|
||||
href="mouvements/modifier_mouvement.html?key=%s&direction=output"|args:$key
|
||||
shape="edit"
|
||||
target="_dialog"}}
|
||||
{{:linkbutton
|
||||
label="Supprimer"
|
||||
href="mouvements/sorties/delete_sortie.html?key=%s"|args:$key
|
||||
shape="delete"
|
||||
label="Retour"
|
||||
href="mouvements/entrees/retour.html?key=%s&prop=%s"|args:$key:$_GET.prop
|
||||
shape="history"
|
||||
target="_dialog"}}
|
||||
{{/if}}
|
||||
{{:linkbutton
|
||||
label="Dupliquer"
|
||||
href="mouvements/dupliquer_mouvement.html?key=%s&direction=%s&prop=%s"|args:$key:$direction:$_GET.prop
|
||||
shape="plus"
|
||||
target="_dialog"}}
|
||||
{{:linkbutton
|
||||
label="Modifier"
|
||||
href="mouvements/modifier_mouvement.html?key=%s&direction=%s&prop=%s"|args:$key:$direction:$_GET.prop
|
||||
shape="edit"
|
||||
target="_dialog"}}
|
||||
{{:linkbutton
|
||||
label="Supprimer"
|
||||
href="mouvements/supprimer_mouvement.html?key=%s&direction=%s&prop=%s"|args:$key:$direction:$_GET.prop
|
||||
shape="delete"
|
||||
target="_dialog"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{/if}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue