From 13c53b074c014b91358d26a98fc8ee39f207f25c Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Sun, 2 Oct 2022 10:35:43 +0200 Subject: [PATCH] show search-text on listings with link to remove set filter Signed-off-by: Michael Kaufmann --- lib/init.php | 2 ++ templates/Froxlor/table/table.html.twig | 3 +++ 2 files changed, 5 insertions(+) diff --git a/lib/init.php b/lib/init.php index 5db591fe..a65a9e67 100644 --- a/lib/init.php +++ b/lib/init.php @@ -296,6 +296,7 @@ unset($css); $action = Request::get('action'); $page = Request::get('page', 'overview'); +$gSearchText = Request::get('searchtext'); // clear request data if (!$action && isset($_SESSION)) { @@ -305,6 +306,7 @@ if (!$action && isset($_SESSION)) { UI::twig()->addGlobal('action', $action); UI::twig()->addGlobal('page', $page); UI::twig()->addGlobal('area', AREA); +UI::twig()->addGlobal('gSearchText', $gSearchText); /** * Initialize the mailingsystem diff --git a/templates/Froxlor/table/table.html.twig b/templates/Froxlor/table/table.html.twig index 11207e85..8fc19de9 100644 --- a/templates/Froxlor/table/table.html.twig +++ b/templates/Froxlor/table/table.html.twig @@ -12,6 +12,9 @@ {% else %}
+ {% if gSearchText is not empty %} + Filter: {{ gSearchText }} + {% endif %}