Skip to content

Commit d9b1528

Browse files
committed
Starting a page for direct rendering of proceedings. Commit ready for merge.
- Legacy-Id: 11711
1 parent 9f46d58 commit d9b1528

4 files changed

Lines changed: 222 additions & 1 deletion

File tree

ietf/meeting/tests_views.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -248,6 +248,17 @@ def test_materials(self):
248248
# FIXME: missing tests of .pdf/.tar generation (some code can
249249
# probably be lifted from similar tests in iesg/tests.py)
250250

251+
def test_proceedings(self):
252+
meeting = make_meeting_test_data()
253+
session = Session.objects.filter(meeting=meeting, group__acronym="mars").first()
254+
255+
self.write_materials_files(meeting, session)
256+
257+
url = urlreverse("ietf.meeting.views.proceedings", kwargs=dict(num=meeting.number))
258+
login_testing_unauthorized(self,"secretary",url)
259+
r = self.client.get(url)
260+
self.assertEqual(r.status_code, 200)
261+
251262
def test_feed(self):
252263
meeting = make_meeting_test_data()
253264
session = Session.objects.filter(meeting=meeting, group__acronym="mars").first()

ietf/meeting/urls.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@
6565
url(r'^floor-plan/(?P<floor>[-a-z0-9_]+)/?$', views.floor_plan),
6666
url(r'^week-view(?:.html)?/?$', views.week_view),
6767
url(r'^room-view(?:.html)?/$', views.room_view),
68-
url(r'^materials(?:.html)?/$', views.materials),
68+
url(r'^materials(?:.html)?/$', views.materials),
69+
url(r'^proceedings(?:.html)?/$', views.proceedings),
6970
]
7071

7172
urlpatterns = [

ietf/meeting/views.py

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,3 +1438,30 @@ def floor_plan(request, num=None, floor=None, ):
14381438
"number": num,
14391439
"floors": floors,
14401440
})
1441+
1442+
@role_required('Secretariat')
1443+
def proceedings(request, num=None):
1444+
1445+
meeting = get_meeting(num)
1446+
begin_date = meeting.get_submission_start_date()
1447+
cut_off_date = meeting.get_submission_cut_off_date()
1448+
cor_cut_off_date = meeting.get_submission_correction_date()
1449+
now = datetime.date.today()
1450+
1451+
schedule = get_schedule(meeting, None)
1452+
sessions = Session.objects.filter(meeting__number=meeting.number, timeslotassignments__schedule=schedule).select_related()
1453+
plenaries = sessions.filter(name__icontains='plenary')
1454+
ietf = sessions.filter(group__parent__type__slug = 'area').exclude(group__acronym='edu')
1455+
irtf = sessions.filter(group__parent__acronym = 'irtf')
1456+
training = sessions.filter(group__acronym__in=['edu','iaoc'])
1457+
iab = sessions.filter(group__parent__acronym = 'iab')
1458+
1459+
cache_version = Document.objects.filter(session__meeting__number=meeting.number).aggregate(Max('time'))["time__max"]
1460+
return render(request, "meeting/proceedings.html", {
1461+
'meeting_num': meeting.number,
1462+
'plenaries': plenaries, 'ietf': ietf, 'training': training, 'irtf': irtf, 'iab': iab,
1463+
'cut_off_date': cut_off_date,
1464+
'cor_cut_off_date': cor_cut_off_date,
1465+
'submission_started': now > begin_date,
1466+
'cache_version': cache_version,
1467+
})
Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
{% extends "base.html" %}
2+
{# Copyright The IETF Trust 2015, All Rights Reserved #}
3+
{% load origin %}
4+
5+
{% load ietf_filters staticfiles %}
6+
7+
{% block pagehead %}
8+
<link rel="stylesheet" href="{% static "jquery.tablesorter/css/theme.bootstrap.min.css" %}">
9+
{% endblock %}
10+
11+
{% block bodyAttrs %}data-spy="scroll" data-target="#affix"{% endblock %}
12+
13+
{% block title %}IETF {{ meeting_num }} Proceedings {% endblock %}
14+
15+
{% block content %}
16+
{% origin %}
17+
<div class="row">
18+
<div class="col-md-10">
19+
20+
<h1>IETF {{ meeting_num }} Proceedings</h1>
21+
22+
<p class="alert alert-info">
23+
<b>This page is under construction</b>
24+
</p>
25+
26+
{# cache for 15 minutes, as long as there's no proceedings activity. takes 4-8 seconds to generate. #}
27+
{% load cache %}
28+
{% cache 900 ietf_meeting_materials meeting_num cache_version %}
29+
30+
{% with "True" as show_agenda %}
31+
<!-- Plenaries -->
32+
{% if plenaries %}
33+
<h2 class="anchor-target" id="plenaries">Plenaries</h2>
34+
<table class="table table-condensed table-striped tablesorter">
35+
<thead>
36+
<tr>
37+
<th class="col-md-1">Group</th>
38+
<th class="col-md-1">Agenda</th>
39+
<th class="col-md-1">Minutes</th>
40+
<th class="col-md-6">Slides</th>
41+
<th class="col-md-3">Drafts</th>
42+
</tr>
43+
</thead>
44+
45+
<tbody>
46+
{% for session in plenaries %}
47+
{% include "meeting/group_materials.html" %}
48+
{% endfor %}
49+
</tbody>
50+
</table>
51+
{% endif %}
52+
53+
<!-- Working groups -->
54+
{% regroup ietf|dictsort:"group.parent.acronym" by group.parent.name as areas %}
55+
{% for sessions in areas %}
56+
<h2 class="anchor-target" id="{{sessions.list.0.group.parent.acronym}}">{{sessions.list.0.group.parent.acronym|upper}} <small>{{ sessions.grouper }}</small></h2>
57+
<table class="table table-condensed table-striped tablesorter">
58+
<thead>
59+
<tr>
60+
<th class="col-md-1">Group</th>
61+
<th class="col-md-1">Agenda</th>
62+
<th class="col-md-1">Minutes</th>
63+
<th class="col-md-6">Slides</th>
64+
<th class="col-md-3">Drafts</th>
65+
</tr>
66+
</thead>
67+
68+
<tbody>
69+
{% for session in sessions.list|dictsort:"group.acronym" %}
70+
{% ifchanged session.group.acronym %}
71+
{% include "meeting/group_materials.html" %}
72+
{% endifchanged %}
73+
{% endfor %}
74+
</tbody>
75+
</table>
76+
{% endfor %}
77+
78+
<!-- Training Sessions -->
79+
{% if training %}
80+
{% with "False" as show_agenda %}
81+
<h2 class="anchor-target" id="training">Training</h2>
82+
<table class="table table-condensed table-striped tablesorter">
83+
<thead>
84+
<tr>
85+
<th class="col-md-1">Group</th>
86+
<th class="col-md-1">Agenda</th>
87+
<th class="col-md-1">Minutes</th>
88+
<th class="col-md-6">Slides</th>
89+
<th class="col-md-3">Drafts</th>
90+
</tr>
91+
</thead>
92+
93+
<tbody>
94+
{% for session in training %}
95+
{% ifchanged %}
96+
{% include "meeting/group_materials.html" %}
97+
{% endifchanged %}
98+
{% endfor %}
99+
</tbody>
100+
</table>
101+
{% endwith %}
102+
{% endif %}
103+
104+
<!-- IAB Sessions -->
105+
{% if iab %}
106+
<h2 class="anchor-target" id="iab">IAB <small>Internet Architecture Board</small></h2>
107+
<table class="table table-condensed table-striped tablesorter">
108+
<thead>
109+
<tr>
110+
<th class="col-md-1">Group</th>
111+
<th class="col-md-1">Agenda</th>
112+
<th class="col-md-1">Minutes</th>
113+
<th class="col-md-6">Slides</th>
114+
<th class="col-md-3">Drafts</th>
115+
</tr>
116+
</thead>
117+
118+
<tbody>
119+
{% for session in iab %}
120+
{% ifchanged %}
121+
{% include "meeting/group_materials.html" %}
122+
{% endifchanged %}
123+
{% endfor %}
124+
</tbody>
125+
</table>
126+
{% endif %}
127+
128+
<!-- IRTF Sessions -->
129+
{% if irtf %}
130+
<h2 class="anchor-target" id="irtf">IRTF <small>Internet Research Task Force</small></h2>
131+
<table class="table table-condensed table-striped tablesorter">
132+
<thead>
133+
<tr>
134+
<th class="col-md-1">Group</th>
135+
<th class="col-md-1">Agenda</th>
136+
<th class="col-md-1">Minutes</th>
137+
<th class="col-md-6">Slides</th>
138+
<th class="col-md-3">Drafts</th>
139+
</tr>
140+
</thead>
141+
142+
<tbody>
143+
{% for session in irtf|dictsort:"group.acronym" %}
144+
{% ifchanged %}
145+
{% include "meeting/group_materials.html" %}
146+
{% endifchanged %}
147+
{% endfor %}
148+
</tbody>
149+
</table>
150+
{% endif %}
151+
{% endwith %}
152+
{% endcache %}
153+
</div>
154+
155+
<div class="col-md-2 hidden-print bs-docs-sidebar" id="affix">
156+
<ul class="nav nav-pills nav-stacked small" data-spy="affix">
157+
{% if plenaries %}
158+
<li><a href="#plenaries">Plenaries</a></li>
159+
{% endif %}
160+
{% if ietf %}
161+
{% regroup ietf|dictsort:"group.parent.acronym" by group.parent as areas %}
162+
{% for area in areas %}
163+
<li><a href="#{{area.grouper.acronym}}">{{ area.grouper.acronym|upper }}</a></li>
164+
{% endfor %}
165+
{% endif %}
166+
{% if training %}
167+
<li><a href="#training">Training</a></li>
168+
{% endif %}
169+
{% if iab %}
170+
<li><a href="#iab">IAB</a></li>
171+
{% endif %}
172+
{% if irtf %}
173+
<li><a href="#irtf">IRTF</a></li>
174+
{% endif %}
175+
</ul>
176+
</div>
177+
</div>
178+
{% endblock %}
179+
180+
{% block js %}
181+
<script src="{% static "jquery.tablesorter/js/jquery.tablesorter.combined.min.js" %}"></script>
182+
{% endblock %}

0 commit comments

Comments
 (0)