Adjust groupfeatures has_session_materials to match modern usage. Adjusted proceedings and materials templates to show fewer unnecessary duplicates. Fixes #2981 and #3387. Commit ready for merge.

- Legacy-Id: 19316
This commit is contained in:
Robert Sparks 2021-09-03 15:14:06 +00:00
parent 311b4728e1
commit d4899b78f9
3 changed files with 35 additions and 6 deletions

View file

@ -0,0 +1,29 @@
# Copyright The IETF Trust 2021 All Rights Reserved
from django.db import migrations
# Not adding team at this time - need to untangle the nonsession_materials mess first
types_to_change = [
'program',
'dir',
'review',
]
def forward(apps, schema_editor):
GroupFeatures = apps.get_model('group', 'GroupFeatures')
GroupFeatures.objects.filter(type__in=types_to_change).update(has_session_materials=True)
def reverse(apps, schema_editor):
GroupFeatures = apps.get_model('group', 'GroupFeatures')
GroupFeatures.objects.filter(type__in=types_to_change).update(has_session_materials=False)
class Migration(migrations.Migration):
dependencies = [
('group', '0047_ietfllc'),
]
operations = [
migrations.RunPython(forward, reverse),
]

View file

@ -61,7 +61,7 @@
{% if user|has_role:"WG Chair,RG Chair" %}
{% if flavor == "top" %}<li class="divider hidden-xs"></li>{% endif %}
<li {%if flavor == "top" %}class="dropdown-header hidden-xs"{% else %}class="nav-header"{% endif %}>WG chair</li>
<li {%if flavor == "top" %}class="dropdown-header hidden-xs"{% else %}class="nav-header"{% endif %}>Manage</li>
<li><a href="{% url "ietf.submit.views.approvals" %}">Approve a draft</a></li>
{% for g in user|docman_groups %}

View file

@ -134,8 +134,8 @@
</thead>
<tbody>
{% for session in training %}
{% ifchanged %}
{% for session in training %}
{% ifchanged %} {# TODO: Find a better way to represent purposed sessions in both materials and proceedings #}
{% include "meeting/group_materials.html" %}
{% endifchanged %}
{% endfor %}
@ -171,7 +171,7 @@
<tbody>
{% for session in iab %}
{% ifchanged %}
{% ifchanged session.group.acronym %}
{% include "meeting/group_materials.html" %}
{% endifchanged %}
{% endfor %}
@ -206,7 +206,7 @@
<tbody>
{% for session in irtf|dictsort:"group.acronym" %}
{% ifchanged %}
{% ifchanged session.group.acronym %}
{% include "meeting/group_materials.html" %}
{% endifchanged %}
{% endfor %}
@ -240,7 +240,7 @@
<tbody>
{% for session in other|dictsort:"group.acronym" %}
{% ifchanged %}
{% ifchanged session.group.acronym %}
{% include "meeting/group_materials.html" %}
{% endifchanged %}
{% endfor %}