Skip to content

Commit ff4201c

Browse files
committedMar 21, 2025·
New category groupings for the nofo_index
Instead of: - all - unpublished - published Now it is: - in progress - published - paused - cancelled
1 parent 9e2bc3a commit ff4201c

File tree

4 files changed

+33
-12
lines changed

4 files changed

+33
-12
lines changed
 

‎CHANGELOG.md

+16-2
Original file line numberDiff line numberDiff line change
@@ -5,15 +5,29 @@ All notable changes to this project will be documented in this file.
55
The format is based on Keep a Changelog, and this project adheres to Semantic
66
Versioning since version 1.0.0.
77

8-
## Unreleased
8+
## Unversioned
99

1010
### Added
1111

1212
### Changed
1313

14+
### Migrations
15+
16+
## [2.11.0] - 2025-03-21
17+
18+
### Added
19+
20+
- Add 2 new statuses: Paused and Cancelled
21+
22+
### Changed
23+
24+
- Change index page to show 4 groupings: in progress, published, paused, cancelled
25+
- Remove "all", since probably nobody uses this
1426
- "Add modifications" now finds all instances of "Announcement type: New" and changes them to say "Announcement type: Modified"
1527

16-
### Fixed
28+
### Migrations
29+
30+
- Add migration for new statues
1731

1832
## [2.10.0] - 2025-03-19
1933

‎bloom_nofos/nofos/templates/nofos/nofo_index.html

+11-6
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
<h1 class="font-heading-xl margin-y-0">{{ nofo_group|title }}{% if nofo_status and nofo_status != 'all' %} {{ nofo_status }}{% endif %} NOFOs</h1>
1414

1515
<p class="nofo_index--filter">
16-
<a href="{% url 'nofos:nofo_index' %}?status=all&group={{ nofo_group }}" {% if nofo_status == 'all' %}aria-current="page"{% endif %}>{{ nofo_group|title }} NOFOs</a> |
17-
<a href="{% url 'nofos:nofo_index' %}?group={{ nofo_group }}" {% if not nofo_status or nofo_status == 'unpublished' %}aria-current="page"{% endif %}>{{ nofo_group|title }} unpublished NOFOs</a> |
18-
<a href="{% url 'nofos:nofo_index' %}?status=published&group={{ nofo_group }}" {% if nofo_status == 'published' %}aria-current="page"{% endif %}>All{% if nofo_group != 'all' %} {{ nofo_group|title }}{% endif %} published NOFOs</a>
16+
<a href="{% url 'nofos:nofo_index' %}?group={{ nofo_group }}" {% if not nofo_status or nofo_status == 'in progress' %}aria-current="page"{% endif %}>In progress NOFOs</a> |
17+
<a href="{% url 'nofos:nofo_index' %}?status=published&group={{ nofo_group }}" {% if nofo_status == 'published' %}aria-current="page"{% endif %}>Published NOFOs</a> |
18+
<a href="{% url 'nofos:nofo_index' %}?status=paused&group={{ nofo_group }}" {% if nofo_status == 'paused' %}aria-current="page"{% endif %}>Paused NOFOs</a> |
19+
<a href="{% url 'nofos:nofo_index' %}?status=cancelled&group={{ nofo_group }}" {% if nofo_status == 'cancelled' %}aria-current="page"{% endif %}>Cancelled NOFOs</a>
1920
</p>
2021

2122
{% if user.group == 'bloom' %}
@@ -31,12 +32,16 @@ <h1 class="font-heading-xl margin-y-0">{{ nofo_group|title }}{% if nofo_status a
3132
{% if nofo_list %}
3233
<table class="sortable usa-table usa-table--borderless width-full">
3334
<caption>
34-
{% if not nofo_status or nofo_status == 'unpublished' %}
35+
{% if not nofo_status or nofo_status == 'in progress' %}
3536
NOFOs being worked on or in review.
3637
{% elif nofo_status == 'published' %}
37-
NOFOs that made it across the finish line.
38+
NOFOs that rode off into the sunset.
39+
{% elif nofo_status == 'paused' %}
40+
NOFOs cooling their heels at the saloon.
41+
{% elif nofo_status == 'cancelled' %}
42+
NOFOs that were put out to pasture.
3843
{% elif nofo_status == 'all' %}
39-
All the NOFOs fit to show.
44+
Every NOFO in the corral.
4045
{% else %}
4146
List of NOFOs with status: {{ nofo_status }}
4247
{% endif %}

‎bloom_nofos/nofos/views.py

+5-3
Original file line numberDiff line numberDiff line change
@@ -189,15 +189,17 @@ def get_queryset(self):
189189
queryset = queryset.filter(archived__isnull=True)
190190

191191
# default status: return unpublished NOFOs
192-
self.status = self.request.GET.get("status", "unpublished")
192+
self.status = self.request.GET.get("status", "in progress")
193193
# default group: 'all' nofos unless a bloom user. if bloom user, default to 'bloom'
194194
self.group = self.request.GET.get(
195195
"group", "bloom" if self.request.user.group == "bloom" else "all"
196196
)
197197

198198
if self.status:
199-
if self.status == "unpublished":
200-
queryset = queryset.exclude(status="published")
199+
if self.status == "in progress":
200+
queryset = queryset.exclude(
201+
status__in=["published", "paused", "cancelled"]
202+
)
201203
elif self.status == "all":
202204
pass
203205
else:

‎pyproject.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "bloom-nofos"
3-
version = "2.10.0"
3+
version = "2.11.0"
44
description = "the no-code solo nofo web flow"
55
authors = ["Paul Craig <paul@pcraig.ca>"]
66
readme = "README.md"

0 commit comments

Comments
 (0)
Please sign in to comment.