diff --git a/.github/workflows/hypha-ci.yml b/.github/workflows/hypha-ci.yml index 7a6605489f..1470e7ff70 100644 --- a/.github/workflows/hypha-ci.yml +++ b/.github/workflows/hypha-ci.yml @@ -26,6 +26,15 @@ jobs: - name: Run pre-commit uses: pre-commit/action@v3.0.1 + login: + runs-on: ubuntu-latest + steps: + - name: Login to Docker Hub + uses: docker/login-action@v4 + with: + username: ${{ vars.DOCKERHUB_USERNAME }} + password: ${{ secrets.DOCKERHUB_TOKEN }} + django-checks: runs-on: ubuntu-latest timeout-minutes: 5 diff --git a/hypha/apply/funds/admin_helpers.py b/hypha/apply/funds/admin_helpers.py index 77da19afcb..9f474180c0 100644 --- a/hypha/apply/funds/admin_helpers.py +++ b/hypha/apply/funds/admin_helpers.py @@ -89,6 +89,8 @@ def lookups(self, request, model_admin): return ( ("open", _("Open")), ("closed", _("Closed")), + ("new", _("Not started")), + ("unpublished", _("Unpublished")), ) def queryset(self, request, queryset): @@ -97,6 +99,10 @@ 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( diff --git a/hypha/apply/funds/tables.py b/hypha/apply/funds/tables.py index bef7d1a0c0..8ea375e922 100644 --- a/hypha/apply/funds/tables.py +++ b/hypha/apply/funds/tables.py @@ -400,6 +400,7 @@ def __init__(self, *args, **kwargs): class Meta: fields = ("title", "fund", "lead", "start_date", "end_date", "deterrmined") attrs = {"class": "table"} + template_name = "funds/tables/table.html" def render_lead(self, value): return format_html("{}", value) @@ -455,7 +456,12 @@ def __init__(self, *args, **kwargs): super().__init__( self, *args, - choices=[("open", "Open"), ("closed", "Closed"), ("new", "Not Started")], + choices=[ + ("open", _("Open")), + ("closed", _("Closed")), + ("new", _("Not Started")), + ("unpublished", _("Unpublished")), + ], **kwargs, ) @@ -468,6 +474,8 @@ def filter(self, qs, value): return qs.closed() if value == "new": return qs.new() + if value == "unpublished": + return qs.not_live() return qs.open() @@ -476,7 +484,7 @@ class RoundsFilter(filters.FilterSet): fund = ModelMultipleChoiceFilter(queryset=get_used_funds, label=_("Funds")) lead = ModelMultipleChoiceFilter(queryset=get_round_leads, label=_("Leads")) active = ActiveRoundFilter(label=_("Active")) - round_state = OpenRoundFilter(label=_("Open")) + round_state = OpenRoundFilter(label=_("State")) class ReviewerLeaderboardFilterForm(forms.ModelForm): 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 @@