Désactivation boutons entrées/sorties
This commit is contained in:
parent
cb79af5157
commit
e52a4e6329
6 changed files with 175 additions and 119 deletions
|
|
@ -21,57 +21,83 @@
|
|||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<form method="post" action="">
|
||||
<fieldset class="entree">
|
||||
<legend>Ajouter une entrée</legend>
|
||||
<dl>
|
||||
{{:linkbutton label="Matériel répertorié" shape="plus" href="repertorie.html" target="_dialog"}}
|
||||
{{:linkbutton label="Matériel non répertorié" shape="plus" href="non_repertorie.html" target="_dialog"}}
|
||||
{{:linkbutton label="Retour de sortie temporaire" shape="plus" href="retour.html" target="_dialog"}}
|
||||
</dl>
|
||||
</fieldset>
|
||||
</form>
|
||||
{{* vérifier s'il existe des catégories *}}
|
||||
{{#load type="category"}}
|
||||
{{:assign categories_exist=true}}
|
||||
{{else}}
|
||||
<p class="block alert">Il n'y a aucune catégorie : vous devez en ajouter.</p>
|
||||
{{/load}}
|
||||
|
||||
{{* lister les entrées *}}
|
||||
<section class="liste_entrees">
|
||||
<h2>Liste des entrées</h2>
|
||||
{{if $categories_exist}}
|
||||
|
||||
{{#list
|
||||
select="
|
||||
$$.date AS 'Date' ;
|
||||
$$.input_nature AS 'Type' ;
|
||||
$$.amount AS 'Nombre' ;
|
||||
(SELECT $$.designation
|
||||
FROM @TABLE AS b
|
||||
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
||||
$$.comment AS 'Remarques'"
|
||||
type="movement"
|
||||
direction="input"
|
||||
order=1}}
|
||||
|
||||
{{:assign var='mvt_key' value=$key}}
|
||||
<tr>
|
||||
<td>{{$date|date_short}}</td>
|
||||
<td>{{$input_nature}}</td>
|
||||
<td>{{$amount}}</td>
|
||||
<td>{{$col4}}</td>
|
||||
<td>{{$comment}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton
|
||||
label="Supprimer"
|
||||
href="delete_entree.html?key=%s"|args:$mvt_key
|
||||
shape="delete"
|
||||
target="_dialog"}}
|
||||
{{:linkbutton
|
||||
label="Modifier"
|
||||
href="../modifier_mouvement.html?key=%s&direction=input"|args:$mvt_key
|
||||
shape="edit"
|
||||
target="_dialog"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{#load type="equipment"}}
|
||||
{{:assign disabled=false}}
|
||||
{{else}}
|
||||
<p class="block alert">Il n'y a aucune entrée.</p>
|
||||
{{/list}}
|
||||
</section>
|
||||
{{:assign disabled=true}}
|
||||
{{/load}}
|
||||
|
||||
{{* vérifier s'il y a des sorties temporaires *}}
|
||||
{{if ! $disabled}}
|
||||
{{:include file="../../_calcul_dispo.html" keep="cumul_mvt"}}
|
||||
{{:include file="_temporaire.html" keep="temporaire"}}
|
||||
{{/if}}
|
||||
|
||||
<form method="post" action="">
|
||||
<fieldset class="entree">
|
||||
<legend>Ajouter une entrée</legend>
|
||||
<dl>
|
||||
{{if ! $disabled}}
|
||||
{{:linkbutton label="Matériel répertorié" shape="plus" href="repertorie.html" target="_dialog"}}
|
||||
{{/if}}
|
||||
{{:linkbutton label="Matériel non répertorié" shape="plus" href="non_repertorie.html" target="_dialog"}}
|
||||
{{if ! $disabled && $temporaire != null}}
|
||||
{{:linkbutton label="Retour de sortie temporaire" shape="plus" href="retour.html" target="_dialog"}}
|
||||
{{/if}}
|
||||
</dl>
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{{* lister les entrées *}}
|
||||
<section class="liste_entrees">
|
||||
<h2>Liste des entrées</h2>
|
||||
|
||||
{{#list
|
||||
select="
|
||||
$$.date AS 'Date' ;
|
||||
$$.input_nature AS 'Type' ;
|
||||
$$.amount AS 'Nombre' ;
|
||||
(SELECT $$.designation
|
||||
FROM @TABLE AS b
|
||||
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
||||
$$.comment AS 'Remarques'"
|
||||
type="movement"
|
||||
direction="input"
|
||||
order=1}}
|
||||
|
||||
{{:assign var='mvt_key' value=$key}}
|
||||
<tr>
|
||||
<td>{{$date|date_short}}</td>
|
||||
<td>{{$input_nature}}</td>
|
||||
<td>{{$amount}}</td>
|
||||
<td>{{$col4}}</td>
|
||||
<td>{{$comment}}</td>
|
||||
<td class="actions">
|
||||
{{:linkbutton
|
||||
label="Supprimer"
|
||||
href="delete_entree.html?key=%s"|args:$mvt_key
|
||||
shape="delete"
|
||||
target="_dialog"}}
|
||||
{{:linkbutton
|
||||
label="Modifier"
|
||||
href="../modifier_mouvement.html?key=%s&direction=input"|args:$mvt_key
|
||||
shape="edit"
|
||||
target="_dialog"}}
|
||||
</td>
|
||||
</tr>
|
||||
{{else}}
|
||||
<p class="block alert">Il n'y a aucune entrée.</p>
|
||||
{{/list}}
|
||||
</section>
|
||||
{{/if}}
|
||||
|
||||
{{:admin_footer}}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue