From fdf0964c405832ea4d95cb589af52e6218705a5b Mon Sep 17 00:00:00 2001 From: Robert Sparks Date: Fri, 14 Dec 2018 22:25:55 +0000 Subject: [PATCH] Make it more obvious that a group has been replaced when looking at its pages. Fixes #2661. Commit ready for merge. - Legacy-Id: 15824 --- ietf/group/tests_info.py | 15 +++++++++++++++ ietf/templates/group/group_base.html | 3 +++ 2 files changed, 18 insertions(+) diff --git a/ietf/group/tests_info.py b/ietf/group/tests_info.py index d1307ccc4..6827cf5f8 100644 --- a/ietf/group/tests_info.py +++ b/ietf/group/tests_info.py @@ -406,6 +406,21 @@ class GroupPagesTests(TestCase): roles = Role.objects.filter(group__acronym='iab') self.assertEqual(len(q('div.photo-thumbnail img')), roles.count()) + def test_nonactive_group_badges(self): + concluded_group = GroupFactory(state_id='conclude') + url = urlreverse("ietf.group.views.history",kwargs={'acronym':concluded_group.acronym}) + r = self.client.get(url) + self.assertEqual(r.status_code,200) + q = PyQuery(r.content) + self.assertEqual(q('.label-warning').text(),"Concluded WG") + replaced_group = GroupFactory(state_id='replaced') + url = urlreverse("ietf.group.views.history",kwargs={'acronym':replaced_group.acronym}) + r = self.client.get(url) + self.assertEqual(r.status_code,200) + q = PyQuery(r.content) + self.assertEqual(q('.label-warning').text(),"Replaced WG") + + class GroupEditTests(TestCase): def setUp(self): self.charter_dir = self.tempdir('charter') diff --git a/ietf/templates/group/group_base.html b/ietf/templates/group/group_base.html index a2957479b..e06575ce6 100644 --- a/ietf/templates/group/group_base.html +++ b/ietf/templates/group/group_base.html @@ -17,6 +17,9 @@ {% if group.state_id == "dormant" or group.state_id == "conclude" %} Concluded {{ group.type.name }} {% endif %} + {% if group.state_id == "replaced" %} + Replaced {{ group.type.name }} + {% endif %} {% if group.state_id == "proposed" %} Proposed {{ group.type.name }} {% endif %}