Skip to content

Commit

Permalink
fix: Add editorial stream to proceedings (#6027)
Browse files Browse the repository at this point in the history
* fix: Add editorial stream to proceedings

Fixes #5717

* fix: Move editorial stream after the irtf in proceedings
  • Loading branch information
kesara authored Jul 24, 2023
1 parent f124af8 commit 101963d
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 1 deletion.
22 changes: 22 additions & 0 deletions ietf/meeting/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down Expand Up @@ -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"""
Expand Down
5 changes: 5 additions & 0 deletions ietf/meeting/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand All @@ -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,
Expand Down
32 changes: 31 additions & 1 deletion ietf/templates/meeting/proceedings.html
Original file line number Diff line number Diff line change
Expand Up @@ -206,10 +206,40 @@ <h2 class="mt-5" id="irtf">
</tbody>
</table>
{% endif %}
<!-- Editorial Sessions -->
{% if editorial %}
<h2 class="mt-5" id="editorial">Editorial Stream</h2>
<table class="table table-sm table-striped tablesorter">
<thead>
<tr>
<th scope="col" data-sort="group">
Group
</th>
<th scope="col" data-sort="artifacts">
Artifacts
</th>
<th scope="col" data-sort="recordings">
Recordings
</th>
<th scope="col" data-sort="slides">
Slides
</th>
<th scope="col" data-sort="drafts">
Internet-Drafts
</th>
</tr>
</thead>
<tbody>
{% for entry in editorial %}
{% include "meeting/group_proceedings.html" with entry=entry meeting=meeting show_agenda=True only %}
{% endfor %}
</tbody>
</table>
{% endif %}
{% endif %}
{% endcache %}
{% endblock %}
{% block js %}
<script src="{% static "ietf/js/list.js" %}">
</script>
{% endblock %}
{% endblock %}

0 comments on commit 101963d

Please sign in to comment.