Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ietf/group/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2187,7 +2187,7 @@ def statements(request, acronym, group_type=None):
).values_list("state__slug", flat=True)[:1]
)
)
.order_by("-published")
.order_by("status", "-published")
)
return render(
request,
Expand Down
19 changes: 14 additions & 5 deletions ietf/templates/group/statements.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ <h2 class="my-3">{{group.acronym|upper}} Statements</h2>
{% if request.user|has_role:"Secretariat" %}
<div class="buttonlist">
<a id="start_button"
class="btn btn-primary"
href="{% url 'ietf.doc.views_statement.new_statement' %}">
class="btn btn-primary"
href="{% url 'ietf.doc.views_statement.new_statement' %}">
Start New Statement
</a>
</div>
Expand All @@ -25,16 +25,25 @@ <h2 class="my-3">{{group.acronym|upper}} Statements</h2>
<th scope="col" data-sort="statement">Statement</th>
</tr>
</thead>
{% regroup statements by status as grouped_statements %}
{% for statement_group in grouped_statements %}
<tbody>
{% for statement in statements %}
<tr class="table-info">
<th scope="col" colspan="2">
{{ statement_group.grouper|title }} {{"Statement"|plural:statement_group.list }} ({{ statement_group.list|length }} {{"hit"|plural:statement_group.list }})
</th>
</tr>
</tbody>
<tbody>
{% for statement in statement_group.list %}
<tr>
<td title="{{ statement.published|date:'Y-m-d H:i:s O' }}">{{ statement.published|date:"Y-m-d" }}</td>
<td><a href="{% url 'ietf.doc.views_doc.document_main' name=statement.name %}">{{statement.title}}</a>
{% if statement.status == "replaced" %}<span class="badge rounded-pill text-bg-warning">Replaced</span>{% endif %}
</td>
</tr>
{% endfor %}
{% endfor %}
</tbody>
{% endfor %}
</table>
{% endblock %}
{% block js %}
Expand Down
Loading