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 meeting materials #6047

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
18 changes: 18 additions & 0 deletions ietf/meeting/tests_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,6 +648,20 @@ def do_test_materials(self, meeting, session):
self.assertFalse(row.find("a:contains(\"Bad Slideshow\")"))

# test with no meeting number in url
# 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)
url = urlreverse("ietf.meeting.views.materials", kwargs=dict())
r = self.client.get(url)
self.assertEqual(r.status_code, 200)
Expand All @@ -657,6 +671,10 @@ def do_test_materials(self, meeting, session):
self.assertTrue(row.find('a:contains("Minutes")'))
self.assertTrue(row.find('a:contains("Slideshow")'))
self.assertFalse(row.find("a:contains(\"Bad Slideshow\")"))
# test for different sections
sections = ["plenaries", "gen", "iab", "editorial", "irtf", "training"]
for section in sections:
self.assertEqual(len(q(f"#{section}")), 1, f"{section} section should exists in proceedings")

# test with a loggged-in wg chair
self.client.login(username="marschairman", password="marschairman+password")
Expand Down
9 changes: 6 additions & 3 deletions ietf/meeting/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,18 +159,19 @@ def materials(request, num=None):
irtf = sessions.filter(group__parent__acronym = 'irtf')
training = sessions.filter(group__acronym__in=['edu','iaoc'], type_id__in=['regular', 'other', ])
iab = sessions.filter(group__parent__acronym = 'iab')
editorial = sessions.filter(group__acronym__in=['rsab','rswg'])

session_pks = [s.pk for ss in [plenaries, ietf, irtf, training, iab] for s in ss]
session_pks = [s.pk for ss in [plenaries, ietf, irtf, training, iab, editorial] for s in ss]
other = sessions.filter(type__in=['regular'], group__type__features__has_meetings=True).exclude(pk__in=session_pks)

for topic in [plenaries, ietf, training, irtf, iab]:
for topic in [plenaries, ietf, training, irtf, iab, editorial]:
for event in topic:
date_list = []
for slide_event in event.all_meeting_slides(): date_list.append(slide_event.time)
for agenda_event in event.all_meeting_agendas(): date_list.append(agenda_event.time)
if date_list: setattr(event, 'last_update', sorted(date_list, reverse=True)[0])

for session_list in [plenaries, ietf, training, irtf, iab, other]:
for session_list in [plenaries, ietf, training, irtf, iab, editorial, other]:
for session in session_list:
session.past_cutoff_date = past_cutoff_date

Expand All @@ -183,6 +184,7 @@ def materials(request, num=None):
irtf, _ = organize_proceedings_sessions(irtf)
training, _ = organize_proceedings_sessions(training)
iab, _ = organize_proceedings_sessions(iab)
editorial, _ = organize_proceedings_sessions(editorial)
other, _ = organize_proceedings_sessions(other)

ietf_areas = []
Expand All @@ -202,6 +204,7 @@ def materials(request, num=None):
'training': training,
'irtf': irtf,
'iab': iab,
'editorial': editorial,
'other': other,
'cut_off_date': cut_off_date,
'cor_cut_off_date': cor_cut_off_date,
Expand Down
36 changes: 36 additions & 0 deletions ietf/templates/meeting/materials.html
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,42 @@ <h2 class="mt-4" id="irtf">
</tbody>
</table>
{% endif %}
<!-- Editorial Sessions -->
{% if editorial %}
<h2 class="mt-4" 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="agenda">
Agenda
</th>
<th scope="col" data-sort="minutes">
Minutes
</th>
<th scope="col" data-sort="slides">
Slides
</th>
<th scope="col" data-sort="drafts">
Internet-Drafts
</th>
<th scope="col" data-sort="updated">
Updated
</th>
{% if user|has_role:"Secretariat" or user_groups %}
<th scope="col"></th>
{% endif %}
</tr>
</thead>
<tbody>
{% for entry in editorial %}
{% include "meeting/group_materials.html" %}
{% endfor %}
</tbody>
</table>
{% endif %}
{% if other %}
<h2 class="mt-4" id="other">
Other <small>Miscellaneous other sessions</small>
Expand Down
Loading