diff --git a/ietf/group/info.py b/ietf/group/info.py index f0241b39e..e18551af8 100644 --- a/ietf/group/info.py +++ b/ietf/group/info.py @@ -296,25 +296,28 @@ def chartering_groups(request): group_types=group_types)) def concluded_groups(request): - group_types = GroupTypeName.objects.filter(slug__in=("wg", "rg")) + sections = OrderedDict() - for t in group_types: - t.concluded_groups = Group.objects.filter(type=t, state__in=("conclude", "bof-conc")).select_related("state", "charter").order_by("acronym") + sections['WGs'] = Group.objects.filter(type='wg', state="conclude").select_related("state", "charter").order_by("parent__name","acronym") + sections['RGs'] = Group.objects.filter(type='rg', state="conclude").select_related("state", "charter").order_by("parent__name","acronym") + sections['BOFs'] = Group.objects.filter(type='wg', state="bof-conc").select_related("state", "charter").order_by("parent__name","acronym") + for name, groups in sections.items(): + # add start/conclusion date - d = dict((g.pk, g) for g in t.concluded_groups) + d = dict((g.pk, g) for g in groups) - for g in t.concluded_groups: + for g in groups: g.start_date = g.conclude_date = None - for e in ChangeStateGroupEvent.objects.filter(group__in=t.concluded_groups, state="active").order_by("-time"): + for e in ChangeStateGroupEvent.objects.filter(group__in=groups, state="active").order_by("-time"): d[e.group_id].start_date = e.time - for e in ChangeStateGroupEvent.objects.filter(group__in=t.concluded_groups, state="conclude").order_by("time"): + for e in ChangeStateGroupEvent.objects.filter(group__in=groups, state="conclude").order_by("time"): d[e.group_id].conclude_date = e.time return render(request, 'group/concluded_groups.html', - dict(group_types=group_types)) + dict(sections=sections)) def get_group_materials(group): # return Document.objects.filter(group=group, type__in=group.features.material_types, session=None).exclude(states__slug="deleted") diff --git a/ietf/templates/group/concluded_groups.html b/ietf/templates/group/concluded_groups.html index 1489b431f..abe6b9b43 100644 --- a/ietf/templates/group/concluded_groups.html +++ b/ietf/templates/group/concluded_groups.html @@ -6,23 +6,41 @@ {% endblock %} +{% block morecss %} + +.fixed { position: fixed; } + +.bs-docs-sidebar .nav .nav>li>a { padding-left: 20px; } + +.bs-docs-sidebar .nav ul.nav { display: none; } + +.bs-docs-sidebar .nav>.active>ul.nav { display: block; } + +{% endblock %} + +{% block bodyAttrs %}data-spy="scroll" data-target="#navscroller"{% endblock %} + {% block title %}Concluded groups{% endblock %} {% block content %} {% origin %} +
Note that the information on historical groups may be inaccurate.
- {% for t in group_types %} -Some additional concluded WGs may be present here.
- {% elif t.slug == "rg" %} + {% elif label == "RGs" %}The information below is incomplete and misses a few older RGs. Please check the IRTF site @@ -30,36 +48,69 @@
{% endif %} - {% if not t.concluded_groups %} + {% if not groups %}No groups found.
{% else %} -Group | -Name | -Start | -Concluded | -
---|---|---|---|
- {{ g.acronym }} - | -{{ g.name }} | -{{ g.start_date|date:"Y-m" }} | -{{ g.conclude_date|date:"Y-m" }} | -
Group | +Name | +Start | +Concluded | +
---|---|---|---|
+ {{ g.acronym }} + | +{{ g.name }} | +{{ g.start_date|date:"Y-m" }} | +{{ g.conclude_date|date:"Y-m" }} | +