@@ -105,29 +105,32 @@ <h1 class="mb-0"><i class="bi bi-inbox"></i> Approvals</h1>
105105
106106 {# ── Category filter bar ── #}
107107 {% if category_counts %}
108- < div class ="mb-3 d-flex flex-wrap gap-2 align-items-center " role ="toolbar " aria-label ="Filter by category ">
109- < span class ="text-muted small fw-semibold me-1 "> Filter:</ span >
108+ < div class ="mb-3 d-flex align-items-center justify-content-between " role ="toolbar " aria-label ="Filter by category ">
109+ < div class ="d-flex flex-wrap gap-2 align-items-center ">
110+ < span class ="text-muted small fw-semibold me-1 "> Filter:</ span >
110111
111- < a href ="? "
112- class ="btn btn-sm {% if not category_slug %}btn-primary{% else %}btn-outline-secondary{% endif %} "
113- {% if not category_slug %}aria-current ="true "{% endif %} >
114- All
115- < span class ="badge {% if not category_slug %}bg-light text-dark{% else %}bg-secondary{% endif %} ms-1 ">
116- {{ total_tasks_count }}
117- </ span >
118- </ a >
112+ < a href ="? "
113+ class ="btn btn-sm {% if not category_slug %}btn-primary{% else %}btn-outline-secondary{% endif %} "
114+ {% if not category_slug %}aria-current ="true "{% endif %} >
115+ All
116+ < span class ="badge {% if not category_slug %}bg-light text-dark{% else %}bg-secondary{% endif %} ms-1 ">
117+ {{ total_tasks_count }}
118+ </ span >
119+ </ a >
119120
120- {% for cat in category_counts %}
121- < a href ="?category={{ cat.slug }} "
122- class ="btn btn-sm {% if category_slug == cat.slug %}btn-primary{% else %}btn-outline-secondary{% endif %} "
123- {% if category_slug == cat.slug %}aria-current ="true "{% endif %} >
124- {% if cat.icon %}< i class ="bi {{ cat.icon }} me-1 "> </ i > {% endif %}
125- {{ cat.name }}
126- < span class ="badge {% if category_slug == cat.slug %}bg-light text-dark{% else %}bg-secondary{% endif %} ms-1 ">
127- {{ cat.count }}
128- </ span >
129- </ a >
130- {% endfor %}
121+ {% for cat in category_counts %}
122+ < a href ="?category={{ cat.slug }} "
123+ class ="btn btn-sm {% if category_slug == cat.slug %}btn-primary{% else %}btn-outline-secondary{% endif %} "
124+ {% if category_slug == cat.slug %}aria-current ="true "{% endif %} >
125+ {% if cat.icon %}< i class ="bi {{ cat.icon }} me-1 "> </ i > {% endif %}
126+ {{ cat.name }}
127+ < span class ="badge {% if category_slug == cat.slug %}bg-light text-dark{% else %}bg-secondary{% endif %} ms-1 ">
128+ {{ cat.count }}
129+ </ span >
130+ </ a >
131+ {% endfor %}
132+ </ div >
133+ {% if not form_counts %}< div id ="searchContainer "> </ div > {% endif %}
131134 </ div >
132135 {% endif %}
133136
@@ -157,8 +160,8 @@ <h1 class="mb-0"><i class="bi bi-inbox"></i> Approvals</h1>
157160 </ div >
158161 < div id ="searchContainer "> </ div >
159162 </ div >
160- {% else %}
161- {# ── Search bar when no form filter ── #}
163+ {% elif not category_counts %}
164+ {# ── Search bar when no filters exist at all ── #}
162165 < div class ="mb-3 d-flex justify-content-end ">
163166 < div id ="searchContainer "> </ div >
164167 </ div >
0 commit comments