Rationalisation navigation et ajout export

This commit is contained in:
Jean-Christophe Engel 2026-07-03 09:54:19 +02:00
parent ae67b9098c
commit f5c9548fba
3 changed files with 38 additions and 36 deletions

View file

@ -3,32 +3,24 @@
<nav class="tabs"> <nav class="tabs">
{{if $current == 'inventaire'}} {{if $current == 'inventaire'}}
<aside> <aside>
{{if $subcurrent == 'stock'}}
{{if $cat == 0}} {{if $cat == 0}}
{{:linkbutton label="Ajouter une catégorie" shape="plus" href="categories/add_category.html" target="_dialog"}} {{:linkbutton label="Ajouter une catégorie" shape="plus" href="categories/add_category.html" target="_dialog"}}
{{else}} {{else}}
{{:exportmenu right=true}}
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="movements/add_new_equipment.html" target="_dialog"}} {{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="movements/add_new_equipment.html" target="_dialog"}}
{{:exportmenu right=true}}
{{/if}} {{/if}}
{{elseif $subcurrent == "mouvements"}} </aside>
{{if $sortie != null}} {{elseif $current == 'historique' || $current == 'archives'}}
{{:linkbutton label="Sortie" shape="minus" href="movements/output_equipment.html?key=%s"|args:$key target="_dialog"}} <aside>
{{/if}} {{:exportmenu right=true}}
{{:linkbutton label="Entrée" shape="plus" href="movements/input_equipment.html?key=%s"|args:$key target="_dialog"}}
{{/if}}
</aside> </aside>
{{elseif $current == 'config'}} {{elseif $current == 'config'}}
{{if $subcurrent == "categories" || $subcurrent == "storage"}}
<aside> <aside>
{{if $subcurrent == 'categories'}} {{:exportmenu right=true}}
{{:linkbutton label="Ajouter une catégorie" shape="plus" href="add_category.html" target="_dialog"}}
{{elseif $subcurrent == 'storage'}}
{{:linkbutton label="Ajouter un lieu de stockage" shape="plus" href="add_storage.html" target="_dialog"}}
{{elseif $subcurrent == 'typesES'}}
{{:linkbutton label="Ajouter un type d'entrée" shape="plus" href="config/add_movement_type.html?dir=input" target="_dialog"}}
{{:linkbutton label="Ajouter un type de sortie" shape="plus" href="config/add_movement_type.html?dir=output" target="_dialog"}}
{{/if}}
</aside> </aside>
{{/if}} {{/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">Inventaire</a></li>
@ -40,30 +32,44 @@
</ul> </ul>
{{if $current == 'inventaire'}} {{if $current == 'inventaire'}}
{{if $subcurrent == 'mouvements'}} {{if $subcurrent == 'historique'}}
<ul class="sub"> <ul class="sub">
<li class="title"><strong>Mouvements — {{$eqpmt}} ({{$category}})</strong></li> <li class="title"><strong>Historique — {{$eqpmt}} ({{$category}})</strong></li>
</ul> </ul>
{{/if}} {{/if}}
{{elseif $current == 'prêt'}} {{elseif $current == 'prêt'}}
<ul class="sub"> <ul class="sub">
<li {{if $subcurrent == 'encours'}} class="current"{{/if}}><a href="{{$module.url}}loan_history.html?output_type=loan">En cours</a></li> <li {{if $subcurrent == 'encours'}} class="current"{{/if}}><a href="{{$module.url}}loan_history.html?output_type=loan">En cours</a></li>
<li {{if $subcurrent == 'historique'}} class="current"{{/if}}><a href="{{$module.url}}loan_movements.html?output_type=loan">Historique</a></li> <li {{if $subcurrent == 'historique'}} class="current"{{/if}}><a href="{{$module.url}}loan_movements.html?output_type=loan">Historique</a></li>
<li {{if $subcurrent == 'membres'}} class="current"{{/if}}><a href="{{$module.url}}member_loan.html?output_type=loan">Prêts en cours aux membres</a></li> <li {{if $subcurrent == 'membres'}} class="current"{{/if}}><a href="{{$module.url}}member_loan.html?output_type=loan">Membres</a></li>
</ul> </ul>
{{elseif $current == 'location'}} {{elseif $current == 'location'}}
<ul class="sub"> <ul class="sub">
<li {{if $subcurrent == 'encours'}} class="current"{{/if}}><a href="{{$module.url}}loan_history.html?output_type=rent">En cours</a></li> <li {{if $subcurrent == 'encours'}} class="current"{{/if}}><a href="{{$module.url}}loan_history.html?output_type=rent">En cours</a></li>
<li {{if $subcurrent == 'historique'}} class="current"{{/if}}><a href="{{$module.url}}loan_movements.html?output_type=rent">Historique</a></li> <li {{if $subcurrent == 'historique'}} class="current"{{/if}}><a href="{{$module.url}}loan_movements.html?output_type=rent">Historique</a></li>
<li {{if $subcurrent == 'membres'}} class="current"{{/if}}><a href="{{$module.url}}member_loan.html?output_type=rent">Locations en cours aux membres</a></li> <li {{if $subcurrent == 'membres'}} class="current"{{/if}}><a href="{{$module.url}}member_loan.html?output_type=rent">Membres</a></li>
</ul> </ul>
{{elseif $current == 'archives'}} {{elseif $current == 'archives'}}
{{if $subcurrent == 'mouvements'}} {{if $subsubcurrent == 'historique'}}
<ul class="sub"> <ul class="sub">
<li class="title"><strong>Historique — {{$eqpmt}} ({{$category}})</strong></li> <li class="title"><strong>Historique — {{$eqpmt}} ({{$category}})</strong></li>
</ul> </ul>
{{/if}} {{/if}}
{{elseif $current == 'config'}} {{elseif $current == 'config'}}
{{if $subcurrent == 'categories'}}
<aside>
{{:linkbutton label="Ajouter une catégorie" shape="plus" href="add_category.html" target="_dialog"}}
</aside>
{{elseif $subcurrent == 'storage'}}
<aside>
{{:linkbutton label="Ajouter un lieu de stockage" shape="plus" href="add_storage.html" target="_dialog"}}
</aside>
{{elseif $subcurrent == 'typesES'}}
<aside>
{{:linkbutton label="Ajouter un type d'entrée" shape="plus" href="config/add_movement_type.html?dir=input" target="_dialog"}}
{{:linkbutton label="Ajouter un type de sortie" shape="plus" href="config/add_movement_type.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 == 'storage'}} class="current"{{/if}}><a href="{{$module.url}}storage/index.html">Lieux de stockage</a></li> <li {{if $subcurrent == 'storage'}} class="current"{{/if}}><a href="{{$module.url}}storage/index.html">Lieux de stockage</a></li>

View file

@ -26,11 +26,7 @@
{{:admin_header title="Gestion des matériels" custom_css="./style.css" current="module_equipment"}} {{:admin_header title="Gestion des matériels" custom_css="./style.css" current="module_equipment"}}
{{* barre de navigation *}} {{* barre de navigation *}}
{{if $_GET.current != null}} {{:assign current=$_GET.current|or:"inventaire"}}
{{:assign current=$_GET.current}}
{{else}}
{{:assign current="inventaire"}}
{{/if}}
{{* récupérer la config des entrées/sorties *}} {{* récupérer la config des entrées/sorties *}}
{{:include file="./_get_config.html" keep="config"}} {{:include file="./_get_config.html" keep="config"}}

View file

@ -15,7 +15,7 @@
{{#restrict block=true section="accounting" level="write"}}{{/restrict}} {{#restrict block=true section="accounting" level="write"}}{{/restrict}}
{{#load type="category" count=true limit=1 assign="result"}}{{/load}} {{#load type="category" count=true limit=1 assign="result"}}{{/load}}
{{:include file="_nav.html" current="inventaire" cat="%d"|args:$result.count subcurrent="stock"}} {{:include file="_nav.html" current="inventaire" cat="%d"|args:$result.count}}
{{if $_GET.ok}} {{if $_GET.ok}}
{{if $_GET.msg == "ajout" }} {{if $_GET.msg == "ajout" }}