From 8b815fc76d628f4254a8a65bbbcd453951b8f639 Mon Sep 17 00:00:00 2001
From: Lars Eggert
Date: Fri, 31 Mar 2023 10:29:07 +0900
Subject: [PATCH] feat: Add list of sub-groups to group's "about" page (#5450)
* feat: Add list of sub-groups to group's "about" page
Fixes #5441
* Address review comments
---
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 d34645abb..4d83a6b4c 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 6b2a36e90..0ad9813e2 100644
--- a/ietf/templates/group/group_about.html
+++ b/ietf/templates/group/group_about.html
@@ -12,6 +12,9 @@ height: 100vh;
text-decoration: none;
}
{% endblock %}
+{% block pagehead %}
+
+{% endblock %}
{% block group_content %}
{% origin %}
{% if group.state_id == "conclude" %}
@@ -401,8 +404,38 @@ height: 100vh;
{% endif %}
{% endif %}
+ {% if subgroups %}
+
+ Groups in {{ group.acronym|upper }}
+
+
+
+
+ Group |
+ Name |
+ Type |
+
+
+
+ {% for sg in subgroups %}
+
+
+
+ |
+ {{ sg.name }} |
+ {{ sg.type }} |
+
+ {% endfor %}
+
+
+ {% endif %}
{% endblock %}
{% block js %}
+