Skip to content

Commit d4899b7

Browse files
committed
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. Commit ready for merge.
- Legacy-Id: 19316
1 parent 311b472 commit d4899b7

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
@@ -134,8 +134,8 @@ <h2 class="anchor-target" id="training">Training</h2>
134134
</thead>
135135

136136
<tbody>
137-
{% for session in training %}
138-
{% ifchanged %}
137+
{% for session in training %}
138+
{% ifchanged %} {# TODO: Find a better way to represent purposed sessions in both materials and proceedings #}
139139
{% include "meeting/group_materials.html" %}
140140
{% endifchanged %}
141141
{% endfor %}
@@ -171,7 +171,7 @@ <h2 class="anchor-target" id="iab">IAB <small>Internet Architecture Board</small
171171

172172
<tbody>
173173
{% for session in iab %}
174-
{% ifchanged %}
174+
{% ifchanged session.group.acronym %}
175175
{% include "meeting/group_materials.html" %}
176176
{% endifchanged %}
177177
{% endfor %}
@@ -206,7 +206,7 @@ <h2 class="anchor-target" id="irtf">IRTF <small>Internet Research Task Force</sm
206206

207207
<tbody>
208208
{% for session in irtf|dictsort:"group.acronym" %}
209-
{% ifchanged %}
209+
{% ifchanged session.group.acronym %}
210210
{% include "meeting/group_materials.html" %}
211211
{% endifchanged %}
212212
{% endfor %}
@@ -240,7 +240,7 @@ <h2 class="anchor-target" id="other">Other <small>Miscellaneous other sessions</
240240

241241
<tbody>
242242
{% for session in other|dictsort:"group.acronym" %}
243-
{% ifchanged %}
243+
{% ifchanged session.group.acronym %}
244244
{% include "meeting/group_materials.html" %}
245245
{% endifchanged %}
246246
{% endfor %}

0 commit comments

Comments
 (0)