From 6fab8b7c445e4b9f9697275f389d0027da9941b1 Mon Sep 17 00:00:00 2001
From: Lars Eggert
Date: Thu, 30 Mar 2023 08:04:03 +0300
Subject: [PATCH 1/2] feat: Add list of sub-groups to group's "about" page
Fixes #5441
---
ietf/group/views.py | 2 ++
ietf/templates/group/group_about.html | 33 +++++++++++++++++++++++++++
2 files changed, 35 insertions(+)
diff --git a/ietf/group/views.py b/ietf/group/views.py
index d34645abb0..4d83a6b4cb 100644
--- a/ietf/group/views.py
+++ b/ietf/group/views.py
@@ -544,6 +544,7 @@ def group_about(request, acronym, group_type=None):
can_provide_update = can_provide_status_update(request.user, group)
status_update = group.latest_event(type="status_update")
+ subgroups = Group.objects.filter(parent=group, state="active").exclude(type__slug__in=["sdo", "individ", "nomcom"]).order_by("type", "acronym")
return render(request, 'group/group_about.html',
construct_group_menu_context(request, group, "about", group_type, {
@@ -556,6 +557,7 @@ def group_about(request, acronym, group_type=None):
"charter_submit_url": charter_submit_url,
"editable_roles": group.used_roles or group.features.default_used_roles,
"closing_note": e,
+ "subgroups": subgroups,
}))
def all_status(request):
diff --git a/ietf/templates/group/group_about.html b/ietf/templates/group/group_about.html
index 6b2a36e905..d3753edabb 100644
--- a/ietf/templates/group/group_about.html
+++ b/ietf/templates/group/group_about.html
@@ -12,6 +12,9 @@
text-decoration: none;
}
{% endblock %}
+{% block pagehead %}
+
+{% endblock %}
{% block group_content %}
{% origin %}
{% if group.state_id == "conclude" %}
@@ -401,8 +404,38 @@
{% endif %}
{% endif %}
+ {% if subgroups %}
+
+ Subgroups under {{ group.acronym|upper }}
+
+
+
+
+ Group |
+ Name |
+ Type |
+
+
+
+ {% for sg in subgroups %}
+
+
+
+ |
+ {{ sg.name }} |
+ {{ sg.type }} |
+
+ {% endfor %}
+
+
+ {% endif %}
{% endblock %}
{% block js %}
+
From ca306880349e88718889f8633cc5c6528aef0f17 Mon Sep 17 00:00:00 2001
From: Lars Eggert
Date: Thu, 30 Mar 2023 09:07:58 +0300
Subject: [PATCH 2/2] Address review comments
---
ietf/templates/group/group_about.html | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/ietf/templates/group/group_about.html b/ietf/templates/group/group_about.html
index d3753edabb..0ad9813e2f 100644
--- a/ietf/templates/group/group_about.html
+++ b/ietf/templates/group/group_about.html
@@ -406,7 +406,7 @@
{% endif %}
{% if subgroups %}
- Subgroups under {{ group.acronym|upper }}
+ Groups in {{ group.acronym|upper }}