From 28abe5ce9edd66a0b699d624533087597c2384a7 Mon Sep 17 00:00:00 2001 From: Jean-Christophe Engel Date: Wed, 26 Feb 2025 12:25:39 +0100 Subject: [PATCH] =?UTF-8?q?Filtrage=20historique=20global=20par=20cat?= =?UTF-8?q?=C3=A9gorie?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- global_history.html | 31 ++++++++++++++++++++++++++++++- 1 file changed, 30 insertions(+), 1 deletion(-) diff --git a/global_history.html b/global_history.html index aa71664..0059012 100644 --- a/global_history.html +++ b/global_history.html @@ -4,7 +4,6 @@ Afficher l'historique de tous les mouvements *}} - {{:admin_header title="Historique des mouvements" custom_css="./style.css" current="module_equipment"}} {{:include file="./_nav.html" current="historique"}} @@ -12,6 +11,27 @@ {{* récupérer la config des entrées/sorties *}} {{:include file="./_get_config.html" keep="config"}} +{{* Sélecteur catégories *}} +{{:assign var="options." value="" label="Toutes les catégories" href="?prop=1"}} +{{#load type="category" order="$$.name"}} + {{:assign var="categories.%s"|args:$key value=$name}} + {{:assign + var="options." + value=$key + label=$name + href="?cat_key=%s&prop=1"|args:$key + }} +{{/load}} + +
+ Filtrer par catégorie + {{:dropdown + title="Filtrer par catégorie" + options=$options + value="%s"|args:$_GET.cat_key + }} +
+

Historique des mouvements

@@ -30,6 +50,15 @@ order=1 desc=true }} + + {{* filtrer selon la catégorie *}} + {{#load key=$equipment}} + {{:assign cat_key=$category}} + {{/load}} + {{if $_GET.cat_key != null && $cat_key != $_GET.cat_key}} + {{:continue}} + {{/if}} + {{:assign var="op_label" from="config.%s_nature.%s.label"|args:$direction:$operation}} {{$date|date_short}}