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}}
|
||||||
|
|
||||||
|
123
inventaire.html
123
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,24 +13,30 @@
|
|||||||
{{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}}
|
||||||
|
|
||||||
{{if $mat_prop}}
|
{{* TODO Sélecteur catégories *}}
|
||||||
<details class="inventaire" open="open">
|
<fieldset class="shortFormRight">
|
||||||
<summary>
|
<legend>Filtrer par catégorie</legend>
|
||||||
<h2>Matériels dont l'association est propriétaire</h2>
|
<nav class="dropdown">
|
||||||
</summary>
|
<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}}
|
||||||
|
<h2>Matériels dont l'association est propriétaire</h2>
|
||||||
<fieldset>
|
<fieldset>
|
||||||
{{* itérer sur les catégories *}}
|
{{* itérer sur les catégories *}}
|
||||||
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
{{#foreach from=$cumul_mvt key="cat_key" item="cat_elem"}}
|
||||||
@ -43,12 +53,7 @@
|
|||||||
{{/if}}
|
{{/if}}
|
||||||
|
|
||||||
{{if $present}}
|
{{if $present}}
|
||||||
{{*if $print_cat_name*}}
|
|
||||||
<details class="inventaire" open="open">
|
|
||||||
<summary>
|
|
||||||
<h3>{{$cat_elem.name}}</h3>
|
<h3>{{$cat_elem.name}}</h3>
|
||||||
{{*/if*}}
|
|
||||||
</summary>
|
|
||||||
|
|
||||||
<table class="list">
|
<table class="list">
|
||||||
<thead>
|
<thead>
|
||||||
@ -115,94 +120,8 @@
|
|||||||
{{/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