Merged in [15824] from rjsparks@nostrum.com:

Make it more obvious that a group has been replaced when looking at its pages. Fixes #2661.
 - Legacy-Id: 15826
Note: SVN reference [15824] has been migrated to Git commit fdf0964c40
This commit is contained in:
Henrik Levkowetz 2018-12-16 20:43:12 +00:00
commit a1fc8722f2
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 %}