Bouton Ajouter catégorie sur page inventaire si aucune catégorie
This commit is contained in:
parent
f2a9cb6af6
commit
42d85fb528
@ -1,7 +1,13 @@
|
||||
{{* -*- brindille -*- *}}
|
||||
|
||||
<nav class="tabs">
|
||||
{{if $current == 'inventaire'}}
|
||||
<aside>
|
||||
{{:linkbutton label="Ajouter un nouveau matériel" shape="plus" href="mouvements/ajouter_entree.html" target="_dialog"}}
|
||||
{{if $cat == null || $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="mouvements/ajouter_entree.html" target="_dialog"}}
|
||||
{{/if}}
|
||||
</aside>
|
||||
{{/if}}
|
||||
|
||||
|
@ -8,7 +8,9 @@
|
||||
{{else}}
|
||||
{{:assign proprio="nonproprio"}}
|
||||
{{/if}}
|
||||
{{:include file="_nav.html" current="inventaire" subcurrent="%s"|args:$proprio}}
|
||||
|
||||
{{#load type="category" count=true assign="result"}}{{/load}}
|
||||
{{:include file="_nav.html" current="inventaire" cat="%d"|args:$result.count subcurrent="%s"|args:$proprio}}
|
||||
|
||||
{{if $_GET.ok}}
|
||||
{{if $_GET.msg == "ajout" }}
|
||||
@ -22,8 +24,6 @@
|
||||
<p class="block error">Modification refusée</p>
|
||||
{{/if}}
|
||||
|
||||
{{#load type="category" count=true assign="result"}}{{/load}}
|
||||
|
||||
{{if $result.count == 0}}
|
||||
<p class="block alert">Il n'y a aucune catégorie : vous devez en ajouter.</p>
|
||||
{{else}}
|
||||
|
Loading…
Reference in New Issue
Block a user