From 309509072bdd33da6ac26e686c779b0f1a2c3f77 Mon Sep 17 00:00:00 2001 From: Eric Vyncke Date: Sun, 20 Jul 2025 08:57:08 +0000 Subject: [PATCH 1/3] Use statement.state to sort entries --- ietf/group/views.py | 2 +- ietf/templates/group/statements.html | 93 +++++++++++++++------------- 2 files changed, 52 insertions(+), 43 deletions(-) diff --git a/ietf/group/views.py b/ietf/group/views.py index f30569d230..9d0ab4d654 100644 --- a/ietf/group/views.py +++ b/ietf/group/views.py @@ -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, diff --git a/ietf/templates/group/statements.html b/ietf/templates/group/statements.html index 035c3bc967..627d96feb9 100644 --- a/ietf/templates/group/statements.html +++ b/ietf/templates/group/statements.html @@ -1,42 +1,51 @@ -{% extends "group/group_base.html" %} -{# Copyright The IETF Trust 2023, All Rights Reserved #} -{% load origin %} -{% load ietf_filters person_filters textfilters %} -{% load static %} -{% block pagehead %} - -{% endblock %} -{% block group_content %} - {% origin %} -

{{group.acronym|upper}} Statements

- {% if request.user|has_role:"Secretariat" %} -
- - Start New Statement - -
- {% endif %} - - - - - - - - - {% for statement in statements %} - - - - - {% endfor %} - -
DateStatement
{{ statement.published|date:"Y-m-d" }}{{statement.title}} - {% if statement.status == "replaced" %}Replaced{% endif %} -
-{% endblock %} -{% block js %} - -{% endblock %} \ No newline at end of file + {% extends "group/group_base.html" %} + {# Copyright The IETF Trust 2023, All Rights Reserved #} + {% load origin %} + {% load ietf_filters person_filters textfilters %} + {% load static %} + {% block pagehead %} + + {% endblock %} + {% block group_content %} + {% origin %} +

{{group.acronym|upper}} Statements

+ {% if request.user|has_role:"Secretariat" %} +
+ + Start New Statement + +
+ {% endif %} + + + + + + + + {% regroup statements by status as grouped_statements %} + {% for statement_group in grouped_statements %} + + + + + + + {% for statement in statement_group.list %} + + + + + {% endfor %} + + {% endfor %} +
DateStatement
+ {{ statement_group.grouper|title }} {{"Statement"|plural:statement_group.list }} ({{ statement_group.list|length }} {{"hit"|plural:statement_group.list }}) +
{{ statement.published|date:"Y-m-d" }}{{statement.title}} +
+ {% endblock %} + {% block js %} + + {% endblock %} \ No newline at end of file From b9fd2c6cc330b1bcc921c05626055cadd4ac6afc Mon Sep 17 00:00:00 2001 From: Eric Vyncke Date: Sun, 20 Jul 2025 08:59:07 +0000 Subject: [PATCH 2/3] remove spurious tabs --- ietf/templates/group/statements.html | 102 +++++++++++++-------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/ietf/templates/group/statements.html b/ietf/templates/group/statements.html index 627d96feb9..1aa1b06f05 100644 --- a/ietf/templates/group/statements.html +++ b/ietf/templates/group/statements.html @@ -1,51 +1,51 @@ - {% extends "group/group_base.html" %} - {# Copyright The IETF Trust 2023, All Rights Reserved #} - {% load origin %} - {% load ietf_filters person_filters textfilters %} - {% load static %} - {% block pagehead %} - - {% endblock %} - {% block group_content %} - {% origin %} -

{{group.acronym|upper}} Statements

- {% if request.user|has_role:"Secretariat" %} - - {% endif %} - - - - - - - - {% regroup statements by status as grouped_statements %} - {% for statement_group in grouped_statements %} - - - - - - - {% for statement in statement_group.list %} - - - - - {% endfor %} - - {% endfor %} -
DateStatement
- {{ statement_group.grouper|title }} {{"Statement"|plural:statement_group.list }} ({{ statement_group.list|length }} {{"hit"|plural:statement_group.list }}) -
{{ statement.published|date:"Y-m-d" }}{{statement.title}} -
- {% endblock %} - {% block js %} - - {% endblock %} \ No newline at end of file +{% extends "group/group_base.html" %} +{# Copyright The IETF Trust 2023, All Rights Reserved #} +{% load origin %} +{% load ietf_filters person_filters textfilters %} +{% load static %} +{% block pagehead %} + +{% endblock %} +{% block group_content %} + {% origin %} +

{{group.acronym|upper}} Statements

+ {% if request.user|has_role:"Secretariat" %} + + {% endif %} + + + + + + + +{% regroup statements by status as grouped_statements %} +{% for statement_group in grouped_statements %} + + + + + + + {% for statement in statement_group.list %} + + + + + {% endfor %} + +{% endfor %} +
DateStatement
+ {{ statement_group.grouper|title }} {{"Statement"|plural:statement_group.list }} ({{ statement_group.list|length }} {{"hit"|plural:statement_group.list }}) +
{{ statement.published|date:"Y-m-d" }}{{statement.title}} +
+{% endblock %} +{% block js %} + +{% endblock %} \ No newline at end of file From a62b39826011c992d57d531fee58a8b85b65ca33 Mon Sep 17 00:00:00 2001 From: Eric Vyncke Date: Tue, 22 Jul 2025 06:37:33 +0000 Subject: [PATCH 3/3] Uncomment the URL --- ietf/templates/group/statements.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ietf/templates/group/statements.html b/ietf/templates/group/statements.html index 1aa1b06f05..6bbe3cb394 100644 --- a/ietf/templates/group/statements.html +++ b/ietf/templates/group/statements.html @@ -38,7 +38,7 @@

{{group.acronym|upper}} Statements

{% for statement in statement_group.list %} {{ statement.published|date:"Y-m-d" }} - {{statement.title}} + {{statement.title}} {% endfor %}