Skip to content

Commit a1a518a

Browse files
committed
merged older materials work (specifically, that vetted in prague)
- Legacy-Id: 10750
2 parents 12ed190 + 609f368 commit a1a518a

7 files changed

Lines changed: 70 additions & 36 deletions

File tree

ietf/doc/views_doc.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -307,6 +307,8 @@ def document_main(request, name, rev=None):
307307
status_changes = [ rel.document for rel in status_change_docs if rel.document.get_state_slug() in ('appr-sent','appr-pend')]
308308
proposed_status_changes = [ rel.document for rel in status_change_docs if rel.document.get_state_slug() in ('needshep','adrev','iesgeval','defer','appr-pr')]
309309

310+
presentations = doc.future_presentations()
311+
310312
# remaining actions
311313
actions = []
312314

@@ -417,6 +419,7 @@ def document_main(request, name, rev=None):
417419
search_archive=search_archive,
418420
actions=actions,
419421
tracking_document=tracking_document,
422+
presentations=presentations,
420423
),
421424
context_instance=RequestContext(request))
422425

@@ -526,13 +529,8 @@ def document_main(request, name, rev=None):
526529
# created and content is made available on disk
527530
if doc.type_id in ("slides", "agenda", "minutes"):
528531
can_manage_material = can_manage_materials(request.user, doc.group)
529-
presentations = None
530-
if doc.type_id=='slides' and doc.get_state_slug('slides')=='active' :
531-
presentations = doc.future_presentations()
532+
presentations = doc.future_presentations()
532533
if doc.meeting_related():
533-
# disallow editing meeting-related stuff through this
534-
# interface for the time being
535-
can_manage_material = False
536534
basename = doc.canonical_name() # meeting materials are unversioned at the moment
537535
if doc.external_url:
538536
# we need to remove the extension for the globbing below to work

ietf/doc/views_material.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -250,11 +250,10 @@ def time_sort_key(session):
250250
def edit_material_presentations(request, name, acronym=None, date=None, seq=None, week_day=None):
251251

252252
doc = get_object_or_404(Document, name=name)
253-
if not (doc.type_id=='slides' and doc.get_state('slides').slug=='active'):
254-
raise Http404
255253

256254
group = doc.group
257-
if not (group.features.has_materials and can_manage_materials(request.user,group)):
255+
256+
if not can_manage_materials(request.user,group):
258257
raise Http404
259258

260259
sorted_sessions = get_upcoming_manageable_sessions(request.user, doc, acronym, date, seq, week_day)
@@ -301,11 +300,11 @@ def edit_material_presentations(request, name, acronym=None, date=None, seq=None
301300
def material_presentations(request, name, acronym=None, date=None, seq=None, week_day=None):
302301

303302
doc = get_object_or_404(Document, name=name)
304-
if not (doc.type_id=='slides' and doc.get_state('slides').slug=='active'):
305-
raise Http404
303+
306304

307305
group = doc.group
308-
if not (group.features.has_materials and can_manage_materials(request.user,group)):
306+
307+
if not can_manage_materials(request.user,group):
309308
raise Http404
310309

311310
sorted_sessions = get_upcoming_manageable_sessions(request.user, doc, acronym, date, seq, week_day)

ietf/meeting/models.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -948,6 +948,9 @@ def recordings(self):
948948
def slides(self):
949949
return list(self.get_material("slides", only_one=False))
950950

951+
def drafts(self):
952+
return list(self.materials.filter(type='draft'))
953+
951954
def __unicode__(self):
952955
if self.meeting.type_id == "interim":
953956
return self.meeting.number

ietf/templates/doc/document_draft.html

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,26 @@
244244
</tr>
245245
{% endif %}
246246

247+
{% if presentations or can_edit_stream_info %}
248+
<tr>
249+
<th></th>
250+
<th>On Agenda</th>
251+
<td class="edit">
252+
{% if not snapshot and can_edit_stream_info %}
253+
{% doc_edit_button "material_presentations" name=doc.name %}
254+
{% endif %}
255+
</td>
256+
257+
<td>
258+
{% if presentations %}
259+
{% for pres in presentations %}{{ pres.session.short_name }} at {{ pres.session.meeting }} {% if pres.rev != doc.rev %}(version -{{ pres.rev }}){% endif %}{% if not forloop.last %}, {% endif %}{% endfor %}
260+
{% else %}
261+
None
262+
{% endif %}
263+
</td>
264+
</tr>
265+
{% endif %}
266+
247267
<tr>
248268
<th></th>
249269
<th>Document shepherd</th>

ietf/templates/doc/document_material.html

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@
3232

3333
<tbody class="meta">
3434
<tr>
35-
<th>{% if doc.meeting_related %}Meeting{% endif %} {{ doc.type.name }}</th>
36-
<td class="edit"></td>
37-
<td>
35+
<th class="col-md-1">{% if doc.meeting_related %}Meeting{% endif %} {{ doc.type.name }}</th>
36+
<td class="edit col-md-1"></td>
37+
<td class="col-md-10">
3838
{{ doc.group.name }}
3939
<a href="{{ doc.group.about_url }}">({{ doc.group.acronym }})</a> {{ doc.group.type.name }}
4040

ietf/templates/meeting/group_materials.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,15 @@
4848
{% endfor %}
4949
{% endwith %}
5050
</td>
51+
<td>
52+
{% with session.drafts as drafts %}
53+
{% for draft in drafts %}
54+
<a href="{% url "doc_view" name=draft.canonical_name %}">{{ draft.canonical_name }}</a><br>
55+
{% empty %}
56+
<span class="label label-warning">No drafts</span>
57+
{% endfor %}
58+
{% endwith %}
59+
</td>
5160
{% endif %}
5261
</tr>
5362

ietf/templates/meeting/materials.html

Lines changed: 26 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,11 @@ <h2 class="anchor-target" id="plenaries">Plenaries</h2>
4242
<table class="table table-condensed table-striped tablesorter">
4343
<thead>
4444
<tr>
45-
<th>Group</th>
46-
<th>Agenda</th>
47-
<th>Minutes</th>
48-
<th>Slides</th>
45+
<th class="col-md-1">Group</th>
46+
<th class="col-md-1">Agenda</th>
47+
<th class="col-md-1">Minutes</th>
48+
<th class="col-md-6">Slides</th>
49+
<th class="col-md-3">Drafts</th>
4950
</tr>
5051
</thead>
5152

@@ -64,10 +65,11 @@ <h2 class="anchor-target" id="{{sessions.list.0.group.parent.acronym}}">{{sessio
6465
<table class="table table-condensed table-striped tablesorter">
6566
<thead>
6667
<tr>
67-
<th>Group</th>
68-
<th>Agenda</th>
69-
<th>Minutes</th>
70-
<th>Slides</th>
68+
<th class="col-md-1">Group</th>
69+
<th class="col-md-1">Agenda</th>
70+
<th class="col-md-1">Minutes</th>
71+
<th class="col-md-6">Slides</th>
72+
<th class="col-md-3">Drafts</th>
7173
</tr>
7274
</thead>
7375

@@ -88,10 +90,11 @@ <h2 class="anchor-target" id="training">Training</h2>
8890
<table class="table table-condensed table-striped tablesorter">
8991
<thead>
9092
<tr>
91-
<th>Group</th>
92-
<th>Agenda</th>
93-
<th>Minutes</th>
94-
<th>Slides</th>
93+
<th class="col-md-1">Group</th>
94+
<th class="col-md-1">Agenda</th>
95+
<th class="col-md-1">Minutes</th>
96+
<th class="col-md-6">Slides</th>
97+
<th class="col-md-3">Drafts</th>
9598
</tr>
9699
</thead>
97100

@@ -112,10 +115,11 @@ <h2 class="anchor-target" id="iab">IAB <small>Internet Architecture Board</small
112115
<table class="table table-condensed table-striped tablesorter">
113116
<thead>
114117
<tr>
115-
<th>Group</th>
116-
<th>Agenda</th>
117-
<th>Minutes</th>
118-
<th>Slides</th>
118+
<th class="col-md-1">Group</th>
119+
<th class="col-md-1">Agenda</th>
120+
<th class="col-md-1">Minutes</th>
121+
<th class="col-md-6">Slides</th>
122+
<th class="col-md-3">Drafts</th>
119123
</tr>
120124
</thead>
121125

@@ -135,10 +139,11 @@ <h2 class="anchor-target" id="irtf">IRTF <small>Internet Research Task Force</sm
135139
<table class="table table-condensed table-striped tablesorter">
136140
<thead>
137141
<tr>
138-
<th>Group</th>
139-
<th>Agenda</th>
140-
<th>Minutes</th>
141-
<th>Slides</th>
142+
<th class="col-md-1">Group</th>
143+
<th class="col-md-1">Agenda</th>
144+
<th class="col-md-1">Minutes</th>
145+
<th class="col-md-6">Slides</th>
146+
<th class="col-md-3">Drafts</th>
142147
</tr>
143148
</thead>
144149

@@ -182,4 +187,4 @@ <h2 class="anchor-target" id="irtf">IRTF <small>Internet Research Task Force</sm
182187

183188
{% block js %}
184189
<script src="{% static "jquery.tablesorter/js/jquery.tablesorter.combined.min.js" %}"></script>
185-
{% endblock %}
190+
{% endblock %}

0 commit comments

Comments
 (0)