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 }} +Aucun matériel.
{{/list}}