From 3bbdfd919b5bc37c89aa39ae3fbe6b5b363f1a67 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Fri, 27 Mar 2026 14:38:38 +0100 Subject: [PATCH 1/7] Fix the rounds dropdown menu search on the all view. --- .../templates/submissions/submenu/rounds.html | 137 ++++++++---------- 1 file changed, 57 insertions(+), 80 deletions(-) diff --git a/hypha/apply/funds/templates/submissions/submenu/rounds.html b/hypha/apply/funds/templates/submissions/submenu/rounds.html index ed55d9a8b5..ba4a238216 100644 --- a/hypha/apply/funds/templates/submissions/submenu/rounds.html +++ b/hypha/apply/funds/templates/submissions/submenu/rounds.html @@ -1,8 +1,7 @@ {% load i18n %} {% load querystrings heroicons %} -
- +
{% if open_rounds or closed_rounds %} {% if selected_rounds %} @@ -10,96 +9,74 @@ href="{% url "apply:submissions:list" %}{% remove_from_query "only_query_string" "page" "round" %}" hx-get="{% url "apply:submissions:list" %}{% remove_from_query "only_query_string" "page" "round" %}" hx-push-url="true" - class="flex px-3 py-2 text-base-content/80 border-b items-center hover:bg-base-200 focus:bg-base-200{% if s.selected %}bg-base-200{% endif %}"> + class="flex items-center py-2 px-3 border-b text-base-content/80 hover:bg-base-200 focus:bg-base-200"> {% trans "All Rounds" %} {% endif %} -
+ {% if open_rounds %} - x-data="{tab: 'open_rounds'}" - {% else %} - x-data="{tab: 'closed_rounds'}" + {# Section heading — hidden during search because data-filter-item-text is empty #} + + {% for f in open_rounds %} +
  • + + {% if f.selected %} + {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} + {% endif %} + {{ f.title }} + +
  • + {% endfor %} {% endif %} - > - -
    - {% if closed_rounds %} - - {% endif %} + {% if closed_rounds %} + {# Section heading — hidden during search because data-filter-item-text is empty #} + + {% for f in closed_rounds %} +
  • + + {% if f.selected %} + {% heroicon_mini "check" aria_hidden="true" size=16 class="stroke-2 me-1" %} + {% endif %} + {{ f.title }} + +
  • + {% endfor %} + {% endif %} - {% if open_rounds %} - - {% endif %} -
    {% else %}
    {% trans "No rounds available" %}
    {% endif %}
    -
    From df05f051e86bf3f8496b059e397eca064f07ca48 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Fri, 27 Mar 2026 16:05:14 +0100 Subject: [PATCH 2/7] Add unpublished to wagtail admin rounds view filter. --- hypha/apply/funds/admin_helpers.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/hypha/apply/funds/admin_helpers.py b/hypha/apply/funds/admin_helpers.py index 77da19afcb..4af8613631 100644 --- a/hypha/apply/funds/admin_helpers.py +++ b/hypha/apply/funds/admin_helpers.py @@ -89,6 +89,7 @@ def lookups(self, request, model_admin): return ( ("open", _("Open")), ("closed", _("Closed")), + ("unpublished", _("Unpublished")), ) def queryset(self, request, queryset): @@ -97,6 +98,8 @@ def queryset(self, request, queryset): return queryset.open() elif value == "closed": return queryset.closed() + elif value == "unpublished": + return queryset.not_live() return queryset From eb8254edcb72229541b7a4688759305d6d1dca44 Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Fri, 27 Mar 2026 16:15:26 +0100 Subject: [PATCH 3/7] Add Not started to wagtail admin rounds view filter. --- hypha/apply/funds/admin_helpers.py | 3 +++ hypha/apply/funds/models/applications.py | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/hypha/apply/funds/admin_helpers.py b/hypha/apply/funds/admin_helpers.py index 4af8613631..9f474180c0 100644 --- a/hypha/apply/funds/admin_helpers.py +++ b/hypha/apply/funds/admin_helpers.py @@ -89,6 +89,7 @@ def lookups(self, request, model_admin): return ( ("open", _("Open")), ("closed", _("Closed")), + ("new", _("Not started")), ("unpublished", _("Unpublished")), ) @@ -98,6 +99,8 @@ def queryset(self, request, queryset): return queryset.open() elif value == "closed": return queryset.closed() + elif value == "new": + return queryset.new() elif value == "unpublished": return queryset.not_live() return queryset diff --git a/hypha/apply/funds/models/applications.py b/hypha/apply/funds/models/applications.py index f7600e516b..b37cde45eb 100644 --- a/hypha/apply/funds/models/applications.py +++ b/hypha/apply/funds/models/applications.py @@ -220,6 +220,11 @@ def serve(self, request): class RoundBaseManager(PageQuerySet): + def new(self): + rounds = self.live().public().specific() + rounds = rounds.filter(start_date__gt=date.today()) + return rounds + def open(self): rounds = self.live().public().specific() rounds = rounds.filter( From 3a9ec51acaa881c3abdfa3693b959ac66073d20f Mon Sep 17 00:00:00 2001 From: Fredrik Jonsson Date: Fri, 27 Mar 2026 16:36:21 +0100 Subject: [PATCH 4/7] Fix bug in filter dropdown headers for rounds view. --- .../templates/funds/includes/table_filter_and_search.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hypha/apply/funds/templates/funds/includes/table_filter_and_search.html b/hypha/apply/funds/templates/funds/includes/table_filter_and_search.html index 7dd6a7bef9..67ae531722 100644 --- a/hypha/apply/funds/templates/funds/includes/table_filter_and_search.html +++ b/hypha/apply/funds/templates/funds/includes/table_filter_and_search.html @@ -77,7 +77,7 @@

    {{ heading }}

    {% if filter.form %}