Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add editorial stream to proceedings #6027

Merged
merged 2 commits into from
Jul 24, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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"]:
rjsparks marked this conversation as resolved.
Show resolved Hide resolved
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 @@ -3777,6 +3777,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 @@ -3796,6 +3800,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 @@ -147,6 +147,36 @@ <h2 class="mt-5" id="iab">
</tbody>
</table>
{% endif %}
<!-- Editorial Sessions -->
kesara marked this conversation as resolved.
Show resolved Hide resolved
{% 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 %}
<!-- IRTF Sessions -->
{% if irtf.meeting_groups %}
<h2 class="mt-5" id="irtf">
Expand Down Expand Up @@ -212,4 +242,4 @@ <h2 class="mt-5" id="irtf">
{% block js %}
<script src="{% static "ietf/js/list.js" %}">
</script>
{% endblock %}
{% endblock %}
Loading