From 101963d3bd999ed52a3cd648357efaafe190b4df Mon Sep 17 00:00:00 2001 From: Kesara Rathnayake Date: Tue, 25 Jul 2023 05:06:28 +1200 Subject: [PATCH] fix: Add editorial stream to proceedings (#6027) * fix: Add editorial stream to proceedings Fixes #5717 * fix: Move editorial stream after the irtf in proceedings --- ietf/meeting/tests_views.py | 22 +++++++++++++++++ ietf/meeting/views.py | 5 ++++ ietf/templates/meeting/proceedings.html | 32 ++++++++++++++++++++++++- 3 files changed, 58 insertions(+), 1 deletion(-) diff --git a/ietf/meeting/tests_views.py b/ietf/meeting/tests_views.py index 50323a5433..5f68ba1fd4 100644 --- a/ietf/meeting/tests_views.py +++ b/ietf/meeting/tests_views.py @@ -7632,6 +7632,13 @@ def _assertProceedingsMaterialsDisplayed(self, response, meeting): 'Correct title and link for each ProceedingsMaterial should appear in the correct order' ) + def _assertGroupSessions(self, response, meeting): + """Checks that group/sessions are present""" + pq = PyQuery(response.content) + sections = ["plenaries", "gen", "iab", "editorial", "irtf", "training"] + for section in sections: + self.assertEqual(len(pq(f"#{section}")), 1, f"{section} section should exists in proceedings") + def test_proceedings(self): """Proceedings should be displayed correctly @@ -7645,6 +7652,20 @@ def test_proceedings(self): SessionPresentationFactory(document__type_id='recording',session=session) SessionPresentationFactory(document__type_id='recording',session=session,document__title="Audio recording for tests") + # Add various group sessions + groups = [] + parent_groups = [ + GroupFactory.create(type_id="area", acronym="gen"), + GroupFactory.create(acronym="iab"), + GroupFactory.create(acronym="irtf"), + ] + for parent in parent_groups: + groups.append(GroupFactory.create(parent=parent)) + for acronym in ["rsab", "edu"]: + groups.append(GroupFactory.create(acronym=acronym)) + for group in groups: + SessionFactory(meeting=meeting, group=group) + self.write_materials_files(meeting, session) self._create_proceedings_materials(meeting) @@ -7691,6 +7712,7 @@ def test_proceedings(self): # configurable contents self._assertMeetingHostsDisplayed(r, meeting) self._assertProceedingsMaterialsDisplayed(r, meeting) + self._assertGroupSessions(r, meeting) def test_named_session(self): """Session with a name should appear separately in the proceedings""" diff --git a/ietf/meeting/views.py b/ietf/meeting/views.py index 18f0f73cbb..d7b072bfc4 100644 --- a/ietf/meeting/views.py +++ b/ietf/meeting/views.py @@ -3779,6 +3779,10 @@ def proceedings(request, num=None): sessions.filter(group__parent__acronym = 'iab') .exclude(current_status='notmeet') ) + editorial, _ = organize_proceedings_sessions( + sessions.filter(group__acronym__in=['rsab','rswg']) + .exclude(current_status='notmeet') + ) ietf = sessions.filter(group__parent__type__slug = 'area').exclude(group__acronym='edu').order_by('group__parent__acronym', 'group__acronym') ietf_areas = [] @@ -3798,6 +3802,7 @@ def proceedings(request, num=None): 'training': training, 'irtf': irtf, 'iab': iab, + 'editorial': editorial, 'ietf_areas': ietf_areas, 'cut_off_date': cut_off_date, 'cor_cut_off_date': cor_cut_off_date, diff --git a/ietf/templates/meeting/proceedings.html b/ietf/templates/meeting/proceedings.html index 00ee18df62..b5d4a6198a 100644 --- a/ietf/templates/meeting/proceedings.html +++ b/ietf/templates/meeting/proceedings.html @@ -206,10 +206,40 @@

{% endif %} + + {% if editorial %} +

Editorial Stream

+ + + + + + + + + + + + {% for entry in editorial %} + {% include "meeting/group_proceedings.html" with entry=entry meeting=meeting show_agenda=True only %} + {% endfor %} + +
+ Group + + Artifacts + + Recordings + + Slides + + Internet-Drafts +
+ {% endif %} {% endif %} {% endcache %} {% endblock %} {% block js %} -{% endblock %} \ No newline at end of file +{% endblock %}