Skip to content

Commit a1fc872

Browse files
committed
Merged in [15824] from rjsparks@nostrum.com:
Make it more obvious that a group has been replaced when looking at its pages. Fixes ietf-tools#2661. - Legacy-Id: 15826 Note: SVN reference [15824] has been migrated to Git commit fdf0964
2 parents 0289f32 + fdf0964 commit a1fc872

2 files changed

Lines changed: 18 additions & 0 deletions

File tree

ietf/group/tests_info.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,21 @@ def test_group_photos(self):
406406
roles = Role.objects.filter(group__acronym='iab')
407407
self.assertEqual(len(q('div.photo-thumbnail img')), roles.count())
408408

409+
def test_nonactive_group_badges(self):
410+
concluded_group = GroupFactory(state_id='conclude')
411+
url = urlreverse("ietf.group.views.history",kwargs={'acronym':concluded_group.acronym})
412+
r = self.client.get(url)
413+
self.assertEqual(r.status_code,200)
414+
q = PyQuery(r.content)
415+
self.assertEqual(q('.label-warning').text(),"Concluded WG")
416+
replaced_group = GroupFactory(state_id='replaced')
417+
url = urlreverse("ietf.group.views.history",kwargs={'acronym':replaced_group.acronym})
418+
r = self.client.get(url)
419+
self.assertEqual(r.status_code,200)
420+
q = PyQuery(r.content)
421+
self.assertEqual(q('.label-warning').text(),"Replaced WG")
422+
423+
409424
class GroupEditTests(TestCase):
410425
def setUp(self):
411426
self.charter_dir = self.tempdir('charter')

ietf/templates/group/group_base.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ <h1>{{ group.name}} ({{ group.acronym }})
1717
{% if group.state_id == "dormant" or group.state_id == "conclude" %}
1818
<span class="label label-warning">Concluded {{ group.type.name }}</span>
1919
{% endif %}
20+
{% if group.state_id == "replaced" %}
21+
<span class="label label-warning">Replaced {{ group.type.name }}</span>
22+
{% endif %}
2023
{% if group.state_id == "proposed" %}
2124
<span class="label label-info">Proposed {{ group.type.name }}</span>
2225
{% endif %}

0 commit comments

Comments
 (0)