Rationalisation navigation et ajout export
This commit is contained in:
parent
ae67b9098c
commit
f5c9548fba
3 changed files with 38 additions and 36 deletions
66
_nav.html
66
_nav.html
|
|
@ -3,31 +3,23 @@
|
|||
<nav class="tabs">
|
||||
{{if $current == 'inventaire'}}
|
||||
<aside>
|
||||
{{if $subcurrent == 'stock'}}
|
||||
{{if $cat == 0}}
|
||||
{{:linkbutton label="Ajouter une catégorie" shape="plus" href="categories/add_category.html" target="_dialog"}}
|
||||
{{else}}
|
||||
{{:exportmenu right=true}}
|
||||
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="movements/add_new_equipment.html" target="_dialog"}}
|
||||
{{/if}}
|
||||
{{elseif $subcurrent == "mouvements"}}
|
||||
{{if $sortie != null}}
|
||||
{{:linkbutton label="Sortie" shape="minus" href="movements/output_equipment.html?key=%s"|args:$key target="_dialog"}}
|
||||
{{/if}}
|
||||
{{:linkbutton label="Entrée" shape="plus" href="movements/input_equipment.html?key=%s"|args:$key target="_dialog"}}
|
||||
{{if $cat == 0}}
|
||||
{{:linkbutton label="Ajouter une catégorie" shape="plus" href="categories/add_category.html" target="_dialog"}}
|
||||
{{else}}
|
||||
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="movements/add_new_equipment.html" target="_dialog"}}
|
||||
{{:exportmenu right=true}}
|
||||
{{/if}}
|
||||
</aside>
|
||||
{{elseif $current == 'historique' || $current == 'archives'}}
|
||||
<aside>
|
||||
{{:exportmenu right=true}}
|
||||
</aside>
|
||||
{{elseif $current == 'config'}}
|
||||
<aside>
|
||||
{{if $subcurrent == 'categories'}}
|
||||
{{: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>
|
||||
{{if $subcurrent == "categories" || $subcurrent == "storage"}}
|
||||
<aside>
|
||||
{{:exportmenu right=true}}
|
||||
</aside>
|
||||
{{/if}}
|
||||
{{/if}}
|
||||
|
||||
<ul>
|
||||
|
|
@ -40,35 +32,49 @@
|
|||
</ul>
|
||||
|
||||
{{if $current == 'inventaire'}}
|
||||
{{if $subcurrent == 'mouvements'}}
|
||||
{{if $subcurrent == 'historique'}}
|
||||
<ul class="sub">
|
||||
<li class="title"><strong>Mouvements — {{$eqpmt}} ({{$category}})</strong></li>
|
||||
<li class="title"><strong>Historique — {{$eqpmt}} ({{$category}})</strong></li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
{{elseif $current == 'prêt'}}
|
||||
<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 == '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>
|
||||
{{elseif $current == 'location'}}
|
||||
<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 == '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>
|
||||
{{elseif $current == 'archives'}}
|
||||
{{if $subcurrent == 'mouvements'}}
|
||||
{{if $subsubcurrent == 'historique'}}
|
||||
<ul class="sub">
|
||||
<li class="title"><strong>Historique — {{$eqpmt}} ({{$category}})</strong></li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
{{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">
|
||||
<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 == 'typesES'}} class="current"{{/if}}><a href="{{$module.url}}config.html">Types d'entrées/sorties</a></li>
|
||||
<li {{if $subcurrent == 'divers'}} class="current"{{/if}}><a href="{{$module.url}}config/misc.html">Divers</a></li>
|
||||
<li {{if $subcurrent == 'storage'}} class="current"{{/if}}><a href="{{$module.url}}storage/index.html">Lieux de stockage</a></li>
|
||||
<li {{if $subcurrent == 'typesES'}} class="current"{{/if}}><a href="{{$module.url}}config.html">Types d'entrées/sorties</a></li>
|
||||
<li {{if $subcurrent == 'divers'}} class="current"{{/if}}><a href="{{$module.url}}config/misc.html">Divers</a></li>
|
||||
</ul>
|
||||
{{/if}}
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -26,11 +26,7 @@
|
|||
{{:admin_header title="Gestion des matériels" custom_css="./style.css" current="module_equipment"}}
|
||||
|
||||
{{* barre de navigation *}}
|
||||
{{if $_GET.current != null}}
|
||||
{{:assign current=$_GET.current}}
|
||||
{{else}}
|
||||
{{:assign current="inventaire"}}
|
||||
{{/if}}
|
||||
{{:assign current=$_GET.current|or:"inventaire"}}
|
||||
|
||||
{{* récupérer la config des entrées/sorties *}}
|
||||
{{:include file="./_get_config.html" keep="config"}}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
{{#restrict block=true section="accounting" level="write"}}{{/restrict}}
|
||||
|
||||
{{#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.msg == "ajout" }}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue