Amélioration navigation inventaire prop/non

This commit is contained in:
Jean-Christophe Engel 2024-11-18 12:22:23 +01:00
parent c20be00ea4
commit 6757757f63
5 changed files with 29 additions and 23 deletions

View File

@ -6,14 +6,14 @@
{{/if}} {{/if}}
<ul> <ul>
<li {{if $current == 'inventaire'}} class="current"{{/if}}><a href="{{$module.url}}index.html">Inventaire</a></li> <li {{if $current == 'inventaire'}} class="current"{{/if}}><a href="{{$module.url}}index.html?prop=1">Inventaire</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}}categories/index.html">Configuration</a></li>
</ul> </ul>
{{if $current == 'inventaire'}} {{if $current == 'inventaire'}}
<ul class="sub"> <ul class="sub">
<li {{if $subcurrent == 'proprio'}} class="current"{{/if}}><a href="{{$module.url}}index.html">Matériels permanents</a></li> <li {{if $subcurrent == 'proprio'}} class="current"{{/if}}><a href="{{$module.url}}index.html?prop=1">Matériels permanents</a></li>
<li {{if $subcurrent == 'nonproprio'}} class="current"{{/if}}><a href="{{$module.url}}inventaire_nonprop.html">Matériels temporaires</a></li> <li {{if $subcurrent == 'nonproprio'}} class="current"{{/if}}><a href="{{$module.url}}index.html?prop=0">Matériels temporaires</a></li>
</ul> </ul>
{{if $subsubcurrent == 'mouvements'}} {{if $subsubcurrent == 'mouvements'}}
<ul class="sub"> <ul class="sub">
@ -22,6 +22,12 @@
</ul> </ul>
{{/if}} {{/if}}
{{elseif $current == 'config'}} {{elseif $current == 'config'}}
{{if $subcurrent == 'typesES'}}
<aside>
{{:linkbutton label="Ajouter un type d'entrée" shape="plus" href="config/ajouter_type_mouvement.html?dir=input" target="_dialog"}}
{{:linkbutton label="Ajouter un type de sortie" shape="plus" href="config/ajouter_type_mouvement.html?dir=output" target="_dialog"}}
</aside>
{{/if}}
<ul class="sub" > <ul class="sub" >
<li {{if $subcurrent == 'categories'}} class="current"{{/if}}><a href="{{$module.url}}categories/index.html">Catégories</a></li> <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> <li {{if $subcurrent == 'typesES'}} class="current"{{/if}}><a href="{{$module.url}}config.html">Types ES</a></li>

View File

@ -3,7 +3,12 @@
{{: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="inventaire" subcurrent="proprio"}} {{if $_GET.prop == null || $_GET.prop}}
{{:assign proprio="proprio"}}
{{else}}
{{:assign proprio="nonproprio"}}
{{/if}}
{{:include file="_nav.html" current="inventaire" subcurrent="%s"|args:$proprio}}
{{if $_GET.ok}} {{if $_GET.ok}}
{{if $_GET.msg == "ajout" }} {{if $_GET.msg == "ajout" }}
@ -24,12 +29,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}}
{{* {{if $_GET.prop == null || $_GET.prop}}
<fieldset> {{:include file="./inventaire.html"}}
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="mouvements/ajouter_entree.html" target="_dialog"}} {{else}}
</fieldset> {{:include file="./inventaire_nonprop.html"}}
*}} {{/if}}
{{:include file="./inventaire.html" print_cat_name=true}}
{{/if}} {{/if}}
{{:admin_footer}} {{:admin_footer}}

View File

@ -26,10 +26,10 @@
<nav class="dropdown"> <nav class="dropdown">
<ul> <ul>
<li><a></a></li> <li><a></a></li>
<li{{if $_GET.cat_key == null}} class="selected"{{/if}}><a href="?">Toutes les catégories</a></li> <li{{if $_GET.cat_key == null}} class="selected"{{/if}}><a href="?prop=1">Toutes les catégories</a></li>
{{#load type="category" assign="category"}} {{#load type="category" assign="category" order="$$.name"}}
<li {{if $_GET.cat_key == $key}}class="selected"{{/if}}> <li {{if $_GET.cat_key == $key}}class="selected"{{/if}}>
<a href="?cat_key={{$key}}"> <a href="?cat_key={{$key}}&prop=1">
<strong>{{$category.name}}</strong> <strong>{{$category.name}}</strong>
</a> </a>
</li> </li>

View File

@ -6,11 +6,6 @@
- category_keys : catégories dont on veut faire l'inventaire - 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="inventaire" subcurrent="nonproprio"}}
{{* 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"}}
@ -31,10 +26,10 @@
<nav class="dropdown"> <nav class="dropdown">
<ul> <ul>
<li><a></a></li> <li><a></a></li>
<li{{if $_GET.cat_key == null}} class="selected"{{/if}}><a href="?">Toutes les catégories</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"}} {{#load type="category" assign="category" order="$$.name"}}
<li {{if $_GET.cat_key == $key}}class="selected"{{/if}}> <li {{if $_GET.cat_key == $key}}class="selected"{{/if}}>
<a href="?cat_key={{$key}}"> <a href="?cat_key={{$key}}&prop=0">
<strong>{{$category.name}}</strong> <strong>{{$category.name}}</strong>
</a> </a>
</li> </li>

View File

@ -83,10 +83,11 @@
{{:assign msg="Ajout de l'entrée « %s (%d) en date du %s » effectué"|args:$post_mat:$_POST.quantite:$_POST.date}} {{:assign msg="Ajout de l'entrée « %s (%d) en date du %s » effectué"|args:$post_mat:$_POST.quantite:$_POST.date}}
{{:assign var=type_entree from="config.input_nature.%s"|args:$operation}} {{:assign var=type_entree from="config.input_nature.%s"|args:$operation}}
{{if $type_entree == "temporaire"}} {{if $type_entree == "temporaire"}}
{{:redirect force="../inventaire_nonprop.html?ok=1&msg=%s"|args:$msg}} {{:assign prop=0}}
{{else}} {{else}}
{{:redirect force="../index.html?ok=1&msg=%s"|args:$msg}} {{:assign prop=1}}
{{/if}} {{/if}}
{{:redirect force="../index.html?prop=%s&ok=1&msg=%s"|args:$prop:$msg}}
{{else}} {{else}}
{{:form_errors}} {{:form_errors}}
{{/form}} {{/form}}