Skip to content

Commit de20c08

Browse files
committed
fix: place approval inbox search bar inline with last visible filter row
1 parent b1313a9 commit de20c08

2 files changed

Lines changed: 27 additions & 24 deletions

File tree

django_forms_workflows/templates/django_forms_workflows/approval_inbox.html

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -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>

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "django-forms-workflows"
3-
version = "0.13.5"
3+
version = "0.13.6"
44
description = "Enterprise-grade, database-driven form builder with approval workflows and external data integration"
55
license = "LGPL-3.0-only"
66
readme = "README.md"

0 commit comments

Comments
 (0)