fix: Add editorial stream to proceedings (#6027)
* fix: Add editorial stream to proceedings Fixes #5717 * fix: Move editorial stream after the irtf in proceedings
This commit is contained in:
parent
f124af8c2d
commit
101963d3bd
|
@ -7632,6 +7632,13 @@ class ProceedingsTests(BaseMeetingTestCase):
|
|||
'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 @@ class ProceedingsTests(BaseMeetingTestCase):
|
|||
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 @@ class ProceedingsTests(BaseMeetingTestCase):
|
|||
# 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"""
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -206,10 +206,40 @@
|
|||
</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 %}
|
||||
|
|
Loading…
Reference in a new issue