diff --git a/ietf/group/migrations/0048_has_session_materials.py b/ietf/group/migrations/0048_has_session_materials.py new file mode 100644 index 000000000..3a081275d --- /dev/null +++ b/ietf/group/migrations/0048_has_session_materials.py @@ -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), + ] diff --git a/ietf/templates/base/menu.html b/ietf/templates/base/menu.html index 19db79876..f1e88a43b 100644 --- a/ietf/templates/base/menu.html +++ b/ietf/templates/base/menu.html @@ -61,7 +61,7 @@ {% if user|has_role:"WG Chair,RG Chair" %} {% if flavor == "top" %}{% endif %} -
  • WG chair
  • +
  • Manage
  • Approve a draft
  • {% for g in user|docman_groups %} diff --git a/ietf/templates/meeting/materials.html b/ietf/templates/meeting/materials.html index 18e62f0e0..77ae5d170 100644 --- a/ietf/templates/meeting/materials.html +++ b/ietf/templates/meeting/materials.html @@ -137,8 +137,8 @@ - {% 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 @@ {% for session in iab %} - {% ifchanged %} + {% ifchanged session.group.acronym %} {% include "meeting/group_materials.html" %} {% endifchanged %} {% endfor %} @@ -209,7 +209,7 @@ {% for session in irtf|dictsort:"group.acronym" %} - {% ifchanged %} + {% ifchanged session.group.acronym %} {% include "meeting/group_materials.html" %} {% endifchanged %} {% endfor %} @@ -243,7 +243,7 @@ {% for session in other|dictsort:"group.acronym" %} - {% ifchanged %} + {% ifchanged session.group.acronym %} {% include "meeting/group_materials.html" %} {% endifchanged %} {% endfor %}