Make it more obvious that a group has been replaced when looking at its pages. Fixes #2661. Commit ready for merge.

- Legacy-Id: 15824
This commit is contained in:
Robert Sparks 2018-12-14 22:25:55 +00:00
parent 487c35d0ae
commit fdf0964c40
2 changed files with 18 additions and 0 deletions

View file

@ -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')

View file

@ -17,6 +17,9 @@
{% if group.state_id == "dormant" or group.state_id == "conclude" %}
<span class="label label-warning">Concluded {{ group.type.name }}</span>
{% endif %}
{% if group.state_id == "replaced" %}
<span class="label label-warning">Replaced {{ group.type.name }}</span>
{% endif %}
{% if group.state_id == "proposed" %}
<span class="label label-info">Proposed {{ group.type.name }}</span>
{% endif %}