Skip to content

Commit f3a4336

Browse files
committed
Merged in [19316] from rjsparks@nostrum.com:
Adjust groupfeatures has_session_materials to match modern usage. Adjusted proceedings and materials templates to show fewer unnecessary duplicates. Fixes ietf-tools#2981 and ietf-tools#3387. - Legacy-Id: 19335 Note: SVN reference [19316] has been migrated to Git commit d4899b7
2 parents cecf079 + d4899b7 commit f3a4336

3 files changed

Lines changed: 35 additions & 6 deletions

File tree

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Copyright The IETF Trust 2021 All Rights Reserved
2+
3+
from django.db import migrations
4+
5+
# Not adding team at this time - need to untangle the nonsession_materials mess first
6+
7+
types_to_change = [
8+
'program',
9+
'dir',
10+
'review',
11+
]
12+
13+
def forward(apps, schema_editor):
14+
GroupFeatures = apps.get_model('group', 'GroupFeatures')
15+
GroupFeatures.objects.filter(type__in=types_to_change).update(has_session_materials=True)
16+
17+
def reverse(apps, schema_editor):
18+
GroupFeatures = apps.get_model('group', 'GroupFeatures')
19+
GroupFeatures.objects.filter(type__in=types_to_change).update(has_session_materials=False)
20+
21+
class Migration(migrations.Migration):
22+
23+
dependencies = [
24+
('group', '0047_ietfllc'),
25+
]
26+
27+
operations = [
28+
migrations.RunPython(forward, reverse),
29+
]

ietf/templates/base/menu.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161

6262
{% if user|has_role:"WG Chair,RG Chair" %}
6363
{% if flavor == "top" %}<li class="divider hidden-xs"></li>{% endif %}
64-
<li {%if flavor == "top" %}class="dropdown-header hidden-xs"{% else %}class="nav-header"{% endif %}>WG chair</li>
64+
<li {%if flavor == "top" %}class="dropdown-header hidden-xs"{% else %}class="nav-header"{% endif %}>Manage</li>
6565
<li><a href="{% url "ietf.submit.views.approvals" %}">Approve a draft</a></li>
6666

6767
{% for g in user|docman_groups %}

ietf/templates/meeting/materials.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,8 @@ <h2 class="anchor-target" id="training">Training</h2>
137137
</thead>
138138

139139
<tbody>
140-
{% for session in training %}
141-
{% ifchanged %}
140+
{% for session in training %}
141+
{% ifchanged %} {# TODO: Find a better way to represent purposed sessions in both materials and proceedings #}
142142
{% include "meeting/group_materials.html" %}
143143
{% endifchanged %}
144144
{% endfor %}
@@ -174,7 +174,7 @@ <h2 class="anchor-target" id="iab">IAB <small>Internet Architecture Board</small
174174

175175
<tbody>
176176
{% for session in iab %}
177-
{% ifchanged %}
177+
{% ifchanged session.group.acronym %}
178178
{% include "meeting/group_materials.html" %}
179179
{% endifchanged %}
180180
{% endfor %}
@@ -209,7 +209,7 @@ <h2 class="anchor-target" id="irtf">IRTF <small>Internet Research Task Force</sm
209209

210210
<tbody>
211211
{% for session in irtf|dictsort:"group.acronym" %}
212-
{% ifchanged %}
212+
{% ifchanged session.group.acronym %}
213213
{% include "meeting/group_materials.html" %}
214214
{% endifchanged %}
215215
{% endfor %}
@@ -243,7 +243,7 @@ <h2 class="anchor-target" id="other">Other <small>Miscellaneous other sessions</
243243

244244
<tbody>
245245
{% for session in other|dictsort:"group.acronym" %}
246-
{% ifchanged %}
246+
{% ifchanged session.group.acronym %}
247247
{% include "meeting/group_materials.html" %}
248248
{% endifchanged %}
249249
{% endfor %}

0 commit comments

Comments
 (0)