100 lines
2.6 KiB
HTML
100 lines
2.6 KiB
HTML
{{* -*- brindille -*- *}}
|
|
|
|
{{*
|
|
inventaire des entrées/sorties des matériels temporaires
|
|
paramètres
|
|
- category_keys : catégories dont on veut faire l'inventaire
|
|
*}}
|
|
|
|
{{* Extraire et compiler les infos de la base *}}
|
|
{{:include file="./_calcul_dispo.html" keep="cumul_mvt,equipments"}}
|
|
|
|
{{* Vérifier s'il y a au moins un matériel non propriété de l'asso *}}
|
|
{{:assign mat_present=false}}
|
|
{{#foreach from=$equipments key=key item=eqpmt}}
|
|
{{if $eqpmt|has_key:"nonproprio"}}
|
|
{{:assign mat_present=true}}
|
|
{{:break}}
|
|
{{/if}}
|
|
{{/foreach}}
|
|
|
|
{{if $mat_present}}
|
|
|
|
{{* Sélecteur catégories *}}
|
|
<fieldset class="shortForm" style="width: 30%;">
|
|
<legend>Filtrer par catégorie</legend>
|
|
<nav class="dropdown">
|
|
<ul>
|
|
<li><a></a></li>
|
|
<li{{if $_GET.cat_key == null}} class="selected"{{/if}}><a href="?prop=0">Toutes les catégories</a></li>
|
|
{{#load type="category" assign="category" order="$$.name"}}
|
|
<li {{if $_GET.cat_key == $key}}class="selected"{{/if}}>
|
|
<a href="?cat_key={{$key}}&prop=0">
|
|
<strong>{{$category.name}}</strong>
|
|
</a>
|
|
</li>
|
|
{{/load}}
|
|
</ul>
|
|
</nav>
|
|
</fieldset>
|
|
|
|
<h2>Matériels temporairement dans l'association</h2>
|
|
|
|
{{#list
|
|
select="
|
|
(SELECT $$.designation
|
|
FROM @TABLE AS b
|
|
WHERE b.key = @TABLE.$$.equipment) AS 'Matériel' ;
|
|
"" as 'Catégorie' ;
|
|
"" AS 'Quantité'
|
|
"
|
|
type="movement"
|
|
group="$$.equipment"
|
|
direction="input"
|
|
order=1
|
|
}}
|
|
|
|
{{:assign var=cat_key from="equipments.%s.category"|args:$equipment}}
|
|
{{if $_GET.cat_key != null && $_GET.cat_key != $cat_key}}
|
|
{{:continue}}
|
|
{{/if}}
|
|
|
|
{{:assign var=cat_name from="cumul_mvt.%s.name"|args:$cat_key}}
|
|
{{:assign var=qte from="equipments.%s.nonproprio"|args:$equipment}}
|
|
|
|
{{if $qte == null}}
|
|
{{:continue}}
|
|
{{/if}}
|
|
<tr>
|
|
<td>{{$col1}}</td>
|
|
<td>{{$cat_name}}</td>
|
|
<td>{{$qte}}</td>
|
|
<td class="actions">
|
|
{{if $qte > 0}}
|
|
{{:linkbutton
|
|
label="Retour"
|
|
href="mouvements/sorties/emprunte.html?key=%s&prop=0"|args:$equipment
|
|
shape="history"
|
|
target="_dialog"}}
|
|
{{/if}}
|
|
{{:linkbutton
|
|
label="Entrée"
|
|
shape="plus"
|
|
href="mouvements/entrees/repertorie.html?key=%s&prop=0"|args:$equipment
|
|
target="_dialog"}}
|
|
{{:linkbutton
|
|
label="Mouvements"
|
|
href="%shistorique.html?key=%s&prop=0"|args:$module.url:$equipment
|
|
shape="table"}}
|
|
{{:linkbutton
|
|
label="Modifier"
|
|
href="%smodifier_materiel.html?key=%s&prop=0"|args:$module.url:$equipment
|
|
shape="edit"
|
|
target="_dialog"}}
|
|
</td>
|
|
</tr>
|
|
{{/list}}
|
|
{{else}}
|
|
<p class="block alert">Aucun matériel.</p>
|
|
{{/if}}
|