From 86443b9bb028340d7e225b03ba1e755b9add1450 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Tue, 29 Oct 2024 14:20:06 +0100 Subject: [PATCH] =?UTF-8?q?test=20pr=C3=A9sence=20mat=C3=A9riel=20dans=20c?= =?UTF-8?q?at=C3=A9gorie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- categories/index.html | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/categories/index.html b/categories/index.html index 5bab274..3540ad5 100644 --- a/categories/index.html +++ b/categories/index.html @@ -24,10 +24,19 @@ {{* afficher les catégories déjà enregistrées *}}
{{#list select="$$.name AS 'Catégorie'" order="1" where="$$.type = 'category'"}} + {{:assign category_key=$key}} + {{* voir s'il y a des matériels dans cette catégorie *}} + {{:assign materiel_present=true}} + {{#load type="equipment" where="$$.category = :category_key" :category_key=$category_key}} + {{else}} + {{:assign materiel_present=false}} + {{/load}} {{$name}} - {{:linkbutton label="Liste des matériels" href="list_equipment.html?key=%s&dialog"|args:$key shape="search" target="_dialog"}} + {{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="Supprimer" href="delete_category.html?key=%s"|args:$key shape="delete" target="_dialog"}}