From 0830585ff5632484ca095d3a882ddb6fcf9be4a1 Mon Sep 17 00:00:00 2001 From: NguyenND Date: Wed, 5 Aug 2026 19:57:28 -0400 Subject: [PATCH] Aug 5 - Update (new design) 3 --- app/templates/modern/inspections/list.html | 22 +++++++++++++++------- app/templates/modern/issues/list.html | 22 +++++++++++++++------- 2 files changed, 30 insertions(+), 14 deletions(-) diff --git a/app/templates/modern/inspections/list.html b/app/templates/modern/inspections/list.html index a1a9a05..5d47bcb 100644 --- a/app/templates/modern/inspections/list.html +++ b/app/templates/modern/inspections/list.html @@ -13,17 +13,17 @@ {% block content %} +{# Any non-empty query param other than the page number means the user has + actually filtered — used to show the match count only when it is meaningful. #} +{% set active_filters = [] %} +{% for _k, _v in request.args.items() %} + {% if _k != 'page' and _v %}{% set _ = active_filters.append(_k) %}{% endif %} +{% endfor %} + {# ── Header ───────────────────────────────────────────────────────────── #}
Inspections
-
- {% if inspections.total %} - {{ inspections.total }} inspection{{ 's' if inspections.total != 1 }} matching your filters - {% else %} - No inspections match your filters - {% endif %} -
{% if current_user.role != 'customer' %}
@@ -125,6 +125,14 @@ {# ── Results ──────────────────────────────────────────────────────────── #}
+ {% if active_filters %} +
+ + {{ inspections.total }} inspection{{ 's' if inspections.total != 1 }} match + {{ 'es' if inspections.total == 1 }} your filters +
+ {% endif %} + {% if inspections.items %}
diff --git a/app/templates/modern/issues/list.html b/app/templates/modern/issues/list.html index a856f0a..d5c52ef 100644 --- a/app/templates/modern/issues/list.html +++ b/app/templates/modern/issues/list.html @@ -12,17 +12,17 @@ {% block content %} +{# Any non-empty query param other than the page number means the user has + actually filtered — used to show the match count only when it is meaningful. #} +{% set active_filters = [] %} +{% for _k, _v in request.args.items() %} + {% if _k != 'page' and _v %}{% set _ = active_filters.append(_k) %}{% endif %} +{% endfor %} + {# ── Header ───────────────────────────────────────────────────────────── #}