Début réorganisation après consultation bohwaz
This commit is contained in:
parent
a99f263196
commit
ea0fd3b1a2
20
_nav.html
20
_nav.html
@ -1,8 +1,24 @@
|
|||||||
<nav class="tabs">
|
<nav class="tabs">
|
||||||
|
{{if $current == 'index'}}
|
||||||
|
<aside>
|
||||||
|
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="mouvements/ajouter_entree.html" target="_dialog"}}
|
||||||
|
</aside>
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
<li {{if $current == 'index'}} class="current"{{/if}}><a href="{{$module.url}}index.html">Inventaire</a></li>
|
<li {{if $current == 'index'}} class="current"{{/if}}><a href="{{$module.url}}index.html">Inventaire</a></li>
|
||||||
{{if $current == 'mouvements'}}<li class="current"><a>Mouvements</a></li>{{/if}}
|
{{if $current == 'mouvements'}}<li class="current"><a>Mouvements</a></li>{{/if}}
|
||||||
<li {{if $current == 'categories'}} class="current"{{/if}}><a href="{{$module.url}}categories/index.html">Catégories</a></li>
|
<li {{if $current == 'config'}} class="current"{{/if}}><a href="{{$module.url}}categories/index.html">Configuration</a></li>
|
||||||
<li {{if $current == 'config'}} class="current"{{/if}}><a href="{{$module.url}}config.html">Configuration</a></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
{{if $current == 'index'}}
|
||||||
|
<ul class="sub">
|
||||||
|
<li {{if $subcurrent == 'proprio'}} class="current"{{/if}}><a href="{{$module.url}}index.html">Matériel permanent</a></li>
|
||||||
|
<li {{if $subcurrent == 'nonproprio'}} class="current"{{/if}}><a href="{{$module.url}}inventaire_nonprop.html">Matériel temporaire</a></li>
|
||||||
|
</ul>
|
||||||
|
{{elseif $current == 'config'}}
|
||||||
|
<ul class="sub" >
|
||||||
|
<li {{if $subcurrent == 'categories'}} class="current"{{/if}}><a href="{{$module.url}}categories/index.html">Catégories</a></li>
|
||||||
|
<li {{if $subcurrent == 'typesES'}} class="current"{{/if}}><a href="{{$module.url}}config.html">Types ES</a></li>
|
||||||
|
</ul>
|
||||||
|
{{/if}}
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
|
{{:admin_header title="Gestion des matériels" current="module_equipment"}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{:include file="../_nav.html" current="categories"}}
|
{{:include file="../_nav.html" current="config" subcurrent="categories"}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
{{if $_GET.msg == "modification"}}
|
{{if $_GET.msg == "modification"}}
|
||||||
@ -34,9 +34,6 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>{{$name}}</th>
|
<th>{{$name}}</th>
|
||||||
<td class="actions">
|
<td class="actions">
|
||||||
{{if $materiel_present}}
|
|
||||||
{{:linkbutton label="Liste des matériels" href="list_equipment.html?key=%s&dialog"|args:$key shape="search" target="_dialog"}}
|
|
||||||
{{/if}}
|
|
||||||
{{:linkbutton label="Modifier" href="modify_category.html?key=%s"|args:$key shape="edit" target="_dialog"}}
|
{{:linkbutton label="Modifier" href="modify_category.html?key=%s"|args:$key shape="edit" target="_dialog"}}
|
||||||
{{:linkbutton label="Supprimer" href="delete_category.html?key=%s"|args:$key shape="delete" target="_dialog"}}
|
{{:linkbutton label="Supprimer" href="delete_category.html?key=%s"|args:$key shape="delete" target="_dialog"}}
|
||||||
</td>
|
</td>
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
{{:admin_header title="Configuration" current="module_equipment"}}
|
{{:admin_header title="Configuration" current="module_equipment"}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{:include file="_nav.html" current="config"}}
|
{{:include file="_nav.html" current="config" subcurrent="typesES"}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
<p class="block confirm">Configuration enregistrée.</p>
|
<p class="block confirm">Configuration enregistrée.</p>
|
||||||
|
@ -83,8 +83,8 @@
|
|||||||
type="movement"
|
type="movement"
|
||||||
select="$$.date AS 'Date';
|
select="$$.date AS 'Date';
|
||||||
CASE $$.direction WHEN 'input' THEN 'Entrée' WHEN 'output' THEN 'Sortie' END AS 'Mvt';
|
CASE $$.direction WHEN 'input' THEN 'Entrée' WHEN 'output' THEN 'Sortie' END AS 'Mvt';
|
||||||
CASE $$.direction WHEN 'input' THEN $$.input_nature WHEN 'output' THEN $$.output_nature END AS 'operation';
|
CASE $$.direction WHEN 'input' THEN $$.input_nature WHEN 'output' THEN $$.output_nature END AS 'Opération';
|
||||||
$$.amount AS 'Nombre';
|
$$.amount AS 'Quantité';
|
||||||
$$.comment AS 'Commentaire'"
|
$$.comment AS 'Commentaire'"
|
||||||
equipment=$equipment_key
|
equipment=$equipment_key
|
||||||
order=1
|
order=1
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
{{:admin_header title="Gestion des matériels" custom_css=$custom_css current="module_equipment"}}
|
{{:admin_header title="Gestion des matériels" custom_css=$custom_css current="module_equipment"}}
|
||||||
|
|
||||||
{{* barre de navigation *}}
|
{{* barre de navigation *}}
|
||||||
{{:include file="_nav.html" current="index"}}
|
{{:include file="_nav.html" current="index" subcurrent="proprio"}}
|
||||||
|
|
||||||
{{if $_GET.ok}}
|
{{if $_GET.ok}}
|
||||||
{{if $_GET.msg == "ajout" }}
|
{{if $_GET.msg == "ajout" }}
|
||||||
@ -24,9 +24,11 @@
|
|||||||
{{if $category_keys|count == 0}}
|
{{if $category_keys|count == 0}}
|
||||||
<p class="block alert">Il n'y a aucune catégorie : vous devez en ajouter.</p>
|
<p class="block alert">Il n'y a aucune catégorie : vous devez en ajouter.</p>
|
||||||
{{else}}
|
{{else}}
|
||||||
|
{{*
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="mouvements/ajouter_entree.html" target="_dialog"}}
|
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="mouvements/ajouter_entree.html" target="_dialog"}}
|
||||||
</fieldset>
|
</fieldset>
|
||||||
|
*}}
|
||||||
{{:include file="./inventaire.html" print_cat_name=true}}
|
{{:include file="./inventaire.html" print_cat_name=true}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
|
263
inventaire.html
263
inventaire.html
@ -1,6 +1,10 @@
|
|||||||
{{* -*- brindille -*- *}}
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
{{* inventaire des entrées/sorties des matériels des catégories de la variable category_keys *}}
|
{{*
|
||||||
|
inventaire des entrées/sorties des matériels permanants de l'association
|
||||||
|
paramètres
|
||||||
|
- category_keys
|
||||||
|
*}}
|
||||||
|
|
||||||
{{* Extraire et compiler les infos de la base *}}
|
{{* Extraire et compiler les infos de la base *}}
|
||||||
{{:include file="./_calcul_dispo.html" keep="cumul_mvt,category_keys,equipments"}}
|
{{:include file="./_calcul_dispo.html" keep="cumul_mvt,category_keys,equipments"}}
|
||||||
@ -9,200 +13,115 @@
|
|||||||
{{if $equipments === null}}
|
{{if $equipments === null}}
|
||||||
<p class="block alert">Aucun matériel.</p>
|
<p class="block alert">Aucun matériel.</p>
|
||||||
{{else}}
|
{{else}}
|
||||||
{{* Vérifier s'il y a au moins un matériel propriété ou non de l'asso *}}
|
{{* Vérifier s'il y a au moins un matériel propriété de l'asso *}}
|
||||||
{{:assign mat_prop=false}}
|
{{:assign mat_prop=false}}
|
||||||
{{:assign mat_non_prop=false}}
|
|
||||||
{{#foreach from=$equipments key=key item=eqpmt}}
|
{{#foreach from=$equipments key=key item=eqpmt}}
|
||||||
{{if $eqpmt|has_key:"stock"}}
|
{{if $eqpmt|has_key:"stock"}}
|
||||||
{{:assign mat_prop=true}}
|
{{:assign mat_prop=true}}
|
||||||
{{/if}}
|
{{:break}}
|
||||||
{{if $eqpmt|has_key:"nonproprio"}}
|
|
||||||
{{:assign mat_non_prop=true}}
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
|
|
||||||
|
{{* TODO Sélecteur catégories *}}
|
||||||
|
<fieldset class="shortFormRight">
|
||||||
|
<legend>Filtrer par catégorie</legend>
|
||||||
|
<nav class="dropdown">
|
||||||
|
<ul>
|
||||||
|
<li><a></a></li>
|
||||||
|
<li><a href=""><strong>Audiovisuel</strong></a></li>
|
||||||
|
<li><a href=""><strong>Informatique</strong></a></li>
|
||||||
|
<li><a href=""><strong>Mobilier</strong></a></li>
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</fieldset>
|
||||||
|
|
||||||
{{if $mat_prop}}
|
{{if $mat_prop}}
|
||||||
<details class="inventaire" open="open">
|
<h2>Matériels dont l'association est propriétaire</h2>
|
||||||
<summary>
|
<fieldset>
|
||||||
<h2>Matériels dont l'association est propriétaire</h2>
|
{{* itérer sur les catégories *}}
|
||||||
</summary>
|
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
||||||
|
|
||||||
<fieldset>
|
{{* vérifier s'il y a des matériels dans cette catégorie *}}
|
||||||
{{* itérer sur les catégories *}}
|
{{:assign present=false}}
|
||||||
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
{{if $cat_elem|keys|has:"eqpmt"}}
|
||||||
|
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
||||||
|
{{if $eqpmt.stock !== null && $eqpmt.stock !== 0}}
|
||||||
|
{{:assign present=true}}
|
||||||
|
{{:break}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
{{* vérifier s'il y a des matériels dans cette catégorie *}}
|
{{if $present}}
|
||||||
{{:assign present=false}}
|
<h3>{{$cat_elem.name}}</h3>
|
||||||
{{if $cat_elem|keys|has:"eqpmt"}}
|
|
||||||
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
|
||||||
{{if $eqpmt.stock !== null && $eqpmt.stock !== 0}}
|
|
||||||
{{:assign present=true}}
|
|
||||||
{{:break}}
|
|
||||||
{{/if}}
|
|
||||||
{{/foreach}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{if $present}}
|
<table class="list">
|
||||||
{{*if $print_cat_name*}}
|
<thead>
|
||||||
<details class="inventaire" open="open">
|
<tr>
|
||||||
<summary>
|
<th>Désignation</th>
|
||||||
<h3>{{$cat_elem.name}}</h3>
|
<th>Stock</th>
|
||||||
{{*/if*}}
|
<th>Sortie</th>
|
||||||
</summary>
|
<th>Disponible</th>
|
||||||
|
<th class="actions"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
<table class="list">
|
{{* itérer sur les matériels de la catégorie *}}
|
||||||
<thead>
|
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
||||||
<tr>
|
{{:assign keys=$eqpmt|keys}}
|
||||||
<th>Désignation</th>
|
{{if "stock"|in:$keys}} {{* && $eqpmt.stock !== 0}}*}}
|
||||||
<th>Stock</th>
|
{{if "exterieur"|in:$keys}}
|
||||||
<th>Sortie</th>
|
{{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}}
|
||||||
<th>Disponible</th>
|
{{:assign exterieur=$eqpmt.exterieur}}
|
||||||
<th class="actions"></th>
|
{{else}}
|
||||||
</tr>
|
{{:assign dispo=$eqpmt.stock}}
|
||||||
</thead>
|
{{:assign exterieur=0}}
|
||||||
<tbody>
|
{{/if}}
|
||||||
|
<tr>
|
||||||
{{* itérer sur les matériels de la catégorie *}}
|
<td>{{$eqpmt.designation}}</td>
|
||||||
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
<td>{{$eqpmt.stock}}</td>
|
||||||
{{:assign keys=$eqpmt|keys}}
|
<td>{{$exterieur}}</td>
|
||||||
{{if "stock"|in:$keys}} {{* && $eqpmt.stock !== 0}}*}}
|
<td>{{$dispo}}</td>
|
||||||
{{if "exterieur"|in:$keys}}
|
<td class="actions">
|
||||||
{{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}}
|
{{if $exterieur > 0}}
|
||||||
{{:assign exterieur=$eqpmt.exterieur}}
|
{{:linkbutton
|
||||||
{{else}}
|
label="Retour"
|
||||||
{{:assign dispo=$eqpmt.stock}}
|
href="mouvements/entrees/retour.html?key=%s&prop=1"|args:$eqpmt_key
|
||||||
{{:assign exterieur=0}}
|
shape="history"
|
||||||
{{/if}}
|
target="_dialog"}}
|
||||||
<tr>
|
{{/if}}
|
||||||
<td>{{$eqpmt.designation}}</td>
|
{{if $dispo > 0}}
|
||||||
<td>{{$eqpmt.stock}}</td>
|
{{:linkbutton
|
||||||
<td>{{$exterieur}}</td>
|
label="Sortie"
|
||||||
<td>{{$dispo}}</td>
|
shape="plus"
|
||||||
<td class="actions">
|
href="mouvements/sorties/stock_disponible.html?key=%s&prop=1"|args:$eqpmt_key
|
||||||
{{if $exterieur > 0}}
|
target="_dialog"}}
|
||||||
|
{{/if}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Retour"
|
|
||||||
href="mouvements/entrees/retour.html?key=%s&prop=1"|args:$eqpmt_key
|
|
||||||
shape="history"
|
|
||||||
target="_dialog"}}
|
|
||||||
{{/if}}
|
|
||||||
{{if $dispo > 0}}
|
|
||||||
{{:linkbutton
|
|
||||||
label="Sortie"
|
|
||||||
shape="plus"
|
|
||||||
href="mouvements/sorties/stock_disponible.html?key=%s&prop=1"|args:$eqpmt_key
|
|
||||||
target="_dialog"}}
|
|
||||||
{{/if}}
|
|
||||||
{{:linkbutton
|
|
||||||
label="Entrée"
|
label="Entrée"
|
||||||
shape="plus"
|
shape="plus"
|
||||||
href="mouvements/entrees/repertorie.html?key=%s&prop=1"|args:$eqpmt_key
|
href="mouvements/entrees/repertorie.html?key=%s&prop=1"|args:$eqpmt_key
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Mouvements"
|
label="Mouvements"
|
||||||
href="%shistorique.html?key=%s&prop=1"|args:$module.url:$eqpmt_key
|
href="%shistorique.html?key=%s&prop=1"|args:$module.url:$eqpmt_key
|
||||||
shape="table"}}
|
shape="table"}}
|
||||||
{{:linkbutton
|
{{:linkbutton
|
||||||
label="Modifier"
|
label="Modifier"
|
||||||
href="%smodifier_materiel.html?key=%s&prop=1"|args:$module.url:$eqpmt_key
|
href="%smodifier_materiel.html?key=%s&prop=1"|args:$module.url:$eqpmt_key
|
||||||
shape="edit"
|
shape="edit"
|
||||||
target="_dialog"}}
|
target="_dialog"}}
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{else}}
|
{{else}}
|
||||||
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
||||||
{{/foreach}}
|
{{/foreach}}
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
</details>
|
{{/if}}
|
||||||
{{/if}}
|
{{/foreach}}
|
||||||
{{/foreach}}
|
</fieldset>
|
||||||
</fieldset>
|
|
||||||
</details>
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{if $mat_non_prop}}
|
|
||||||
<details class="inventaire" open="open">
|
|
||||||
<summary>
|
|
||||||
<h2>Matériels dont l'association n'est pas propriétaire</h2>
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
<fieldset>
|
|
||||||
{{* itérer sur les catégories *}}
|
|
||||||
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
|
||||||
|
|
||||||
{{* vérifier s'il y a des matériels dans cette catégorie *}}
|
|
||||||
{{:assign present=false}}
|
|
||||||
{{if $cat_elem|keys|has:"eqpmt"}}
|
|
||||||
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
|
||||||
{{if $eqpmt.nonproprio !== null && $eqpmt.nonproprio !== 0}}
|
|
||||||
{{:assign present=true}}
|
|
||||||
{{:break}}
|
|
||||||
{{/if}}
|
|
||||||
{{/foreach}}
|
|
||||||
{{/if}}
|
|
||||||
|
|
||||||
{{if $present}}
|
|
||||||
{{*if $print_cat_name*}}
|
|
||||||
<details class="inventaire" open="open">
|
|
||||||
<summary>
|
|
||||||
<h3>{{$cat_elem.name}}</h3>
|
|
||||||
{{*/if*}}
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
<table class="list">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>Désignation</th>
|
|
||||||
<th>Quantité</th>
|
|
||||||
<th class="actions"></th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
|
|
||||||
{{* itérer sur les matériels de la catégorie *}}
|
|
||||||
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
|
||||||
{{:assign keys=$eqpmt|keys}}
|
|
||||||
{{if "nonproprio"|in:$keys && $eqpmt.nonproprio !== 0}}
|
|
||||||
{{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}}
|
|
||||||
<tr>
|
|
||||||
<td>{{$eqpmt.designation}}</td>
|
|
||||||
<td>{{$eqpmt.nonproprio}}</td>
|
|
||||||
<td class="actions">
|
|
||||||
{{if $eqpmt.nonproprio > 0}}
|
|
||||||
{{:linkbutton
|
|
||||||
label="Retour"
|
|
||||||
href="mouvements/sorties/emprunte.html?key=%s&prop=0"|args:$eqpmt_key
|
|
||||||
shape="history"
|
|
||||||
target="_dialog"}}
|
|
||||||
{{/if}}
|
|
||||||
{{:linkbutton
|
|
||||||
label="Entrée"
|
|
||||||
shape="plus"
|
|
||||||
href="mouvements/entrees/repertorie.html?key=%s&prop=0"|args:$eqpmt_key
|
|
||||||
target="_dialog"}}
|
|
||||||
{{:linkbutton
|
|
||||||
label="Mouvements"
|
|
||||||
href="%shistorique.html?key=%s&prop=0"|args:$module.url:$eqpmt_key
|
|
||||||
shape="table"}}
|
|
||||||
{{:linkbutton
|
|
||||||
label="Modifier"
|
|
||||||
href="modifier_materiel.html?key=%s&prop=0"|args:$eqpmt_key
|
|
||||||
shape="edit"
|
|
||||||
target="_dialog"}}
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{{/if}}
|
|
||||||
{{else}}
|
|
||||||
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
|
||||||
{{/foreach}}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</details>
|
|
||||||
{{/if}}
|
|
||||||
{{/foreach}}
|
|
||||||
</fieldset>
|
|
||||||
</details>
|
|
||||||
{{/if}}
|
{{/if}}
|
||||||
{{/if}}
|
{{/if}}
|
||||||
|
103
inventaire_nonprop.html
Normal file
103
inventaire_nonprop.html
Normal file
@ -0,0 +1,103 @@
|
|||||||
|
{{* -*- brindille -*- *}}
|
||||||
|
|
||||||
|
{{*
|
||||||
|
inventaire des entrées/sorties des matériels temporaires
|
||||||
|
paramètres
|
||||||
|
- category_keys : catégories dont on veut faire l'inventaire
|
||||||
|
*}}
|
||||||
|
|
||||||
|
{{:admin_header title="Gestion des matériels" custom_css=$custom_css current="module_equipment"}}
|
||||||
|
|
||||||
|
{{* barre de navigation *}}
|
||||||
|
{{:include file="_nav.html" current="index" subcurrent="nonproprio"}}
|
||||||
|
|
||||||
|
{{* Extraire et compiler les infos de la base *}}
|
||||||
|
{{:include file="./_calcul_dispo.html" keep="cumul_mvt,category_keys,equipments"}}
|
||||||
|
|
||||||
|
{{* Afficher les résultats *}}
|
||||||
|
{{if $equipments === null}}
|
||||||
|
<p class="block alert">Aucun matériel.</p>
|
||||||
|
{{else}}
|
||||||
|
{{* Vérifier s'il y a au moins un matériel non propriété de l'asso *}}
|
||||||
|
{{:assign mat_non_prop=false}}
|
||||||
|
{{#foreach from=$equipments key=key item=eqpmt}}
|
||||||
|
{{if $eqpmt|has_key:"nonproprio"}}
|
||||||
|
{{:assign mat_non_prop=true}}
|
||||||
|
{{:break}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
|
||||||
|
{{if $mat_non_prop}}
|
||||||
|
<h2>Matériels dont l'association n'est pas propriétaire</h2>
|
||||||
|
|
||||||
|
<fieldset>
|
||||||
|
{{* itérer sur les catégories *}}
|
||||||
|
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
||||||
|
|
||||||
|
{{* vérifier s'il y a des matériels dans cette catégorie *}}
|
||||||
|
{{:assign present=false}}
|
||||||
|
{{if $cat_elem|keys|has:"eqpmt"}}
|
||||||
|
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
||||||
|
{{if $eqpmt.nonproprio !== null && $eqpmt.nonproprio !== 0}}
|
||||||
|
{{:assign present=true}}
|
||||||
|
{{:break}}
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
{{/if}}
|
||||||
|
|
||||||
|
{{if $present}}
|
||||||
|
<h3>{{$cat_elem.name}}</h3>
|
||||||
|
|
||||||
|
<table class="list">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Désignation</th>
|
||||||
|
<th>Quantité</th>
|
||||||
|
<th class="actions"></th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
|
||||||
|
{{* itérer sur les matériels de la catégorie *}}
|
||||||
|
{{#foreach from=$cat_elem.eqpmt key="eqpmt_key" item="eqpmt"}}
|
||||||
|
{{:assign keys=$eqpmt|keys}}
|
||||||
|
{{if "nonproprio"|in:$keys && $eqpmt.nonproprio !== 0}}
|
||||||
|
{{:assign dispo="%d-%d"|math:$eqpmt.stock:$eqpmt.exterieur}}
|
||||||
|
<tr>
|
||||||
|
<td>{{$eqpmt.designation}}</td>
|
||||||
|
<td>{{$eqpmt.nonproprio}}</td>
|
||||||
|
<td class="actions">
|
||||||
|
{{if $eqpmt.nonproprio > 0}}
|
||||||
|
{{:linkbutton
|
||||||
|
label="Retour"
|
||||||
|
href="mouvements/sorties/emprunte.html?key=%s&prop=0"|args:$eqpmt_key
|
||||||
|
shape="history"
|
||||||
|
target="_dialog"}}
|
||||||
|
{{/if}}
|
||||||
|
{{:linkbutton
|
||||||
|
label="Entrée"
|
||||||
|
shape="plus"
|
||||||
|
href="mouvements/entrees/repertorie.html?key=%s&prop=0"|args:$eqpmt_key
|
||||||
|
target="_dialog"}}
|
||||||
|
{{:linkbutton
|
||||||
|
label="Mouvements"
|
||||||
|
href="%shistorique.html?key=%s&prop=0"|args:$module.url:$eqpmt_key
|
||||||
|
shape="table"}}
|
||||||
|
{{:linkbutton
|
||||||
|
label="Modifier"
|
||||||
|
href="modifier_materiel.html?key=%s&prop=0"|args:$eqpmt_key
|
||||||
|
shape="edit"
|
||||||
|
target="_dialog"}}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
{{/if}}
|
||||||
|
{{else}}
|
||||||
|
<p class="block alert">Il n'y a aucun matériel dans cette catégorie.</p>
|
||||||
|
{{/foreach}}
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
{{/if}}
|
||||||
|
{{/foreach}}
|
||||||
|
</fieldset>
|
||||||
|
{{/if}}
|
||||||
|
{{/if}}
|
Loading…
Reference in New Issue
Block a user