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 #2981 and #3387.
 - Legacy-Id: 19335
Note: SVN reference [19316] has been migrated to Git commit d4899b78f9
This commit is contained in:
Robert Sparks 2021-09-04 15:01:38 +00:00
commit f3a433672a
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

@ -137,8 +137,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 %}
@ -174,7 +174,7 @@
<tbody>
{% for session in iab %}
{% ifchanged %}
{% ifchanged session.group.acronym %}
{% include "meeting/group_materials.html" %}
{% endifchanged %}
{% endfor %}
@ -209,7 +209,7 @@
<tbody>
{% for session in irtf|dictsort:"group.acronym" %}
{% ifchanged %}
{% ifchanged session.group.acronym %}
{% include "meeting/group_materials.html" %}
{% endifchanged %}
{% endfor %}
@ -243,7 +243,7 @@
<tbody>
{% for session in other|dictsort:"group.acronym" %}
{% ifchanged %}
{% ifchanged session.group.acronym %}
{% include "meeting/group_materials.html" %}
{% endifchanged %}
{% endfor %}