parent
101963d3bd
commit
e1e15da398
|
@ -648,6 +648,20 @@ class MeetingTests(BaseMeetingTestCase):
|
|||
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)
|
||||
|
@ -657,6 +671,10 @@ class MeetingTests(BaseMeetingTestCase):
|
|||
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")
|
||||
|
|
|
@ -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
|
||||
|
||||
|
@ -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 = []
|
||||
|
@ -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,
|
||||
|
|
|
@ -190,6 +190,42 @@
|
|||
</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>
|
||||
|
|
Loading…
Reference in a new issue