From cb91f0a62400f6b1e86680478fa7bf3ff66582aa Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Thu, 20 Feb 2025 11:39:51 +0100 Subject: [PATCH] =?UTF-8?q?Ajout=20filtrage=20archives=20par=20cat=C3=A9go?= =?UTF-8?q?rie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- archives.html | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/archives.html b/archives.html index 704f24b..75ddcde 100644 --- a/archives.html +++ b/archives.html @@ -14,7 +14,7 @@ var="options." value=$key label=$name - href="?cat_key=%s&prop=1"|args:$key + href="?cat_key=%s"|args:$key }} {{/load}} @@ -31,6 +31,14 @@

Inventaire des matériels archivés

+{{* filtrer selon la catégorie *}} +{{if $_GET.cat_key == null}} + {{:assign condition="1"}} +{{else}} + {{:assign cat_key=$_GET.cat_key|quote_sql}} + {{:assign condition="$$.category == %s"|args:$cat_key}} +{{/if}} + {{* Liste des matériels archivés *}} {{#list select=" @@ -40,9 +48,10 @@ WHERE cat.key = @TABLE.$$.category) AS "Catégorie" " type="equipment" - where="$$.status='archived'" + where="$$.status='archived' AND %s"|args:$condition order=1 }} + {{$name}} {{$col2}} @@ -58,4 +67,6 @@ target="_dialog"}} +{{else}} +

Aucun matériel.

{{/list}}