forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaterials_table.html
More file actions
57 lines (56 loc) · 2.02 KB
/
materials_table.html
File metadata and controls
57 lines (56 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
{# Copyright The IETF Trust 2021, All Rights Reserved #}
{% load ietf_filters misc_filters tz %}
{# only show if user is secretariat or at least one material is active #}
{% if proceedings_materials|list_extract:1|keep_only:'active' or user|has_role:'Secretariat' %}
<!-- Proceedings materials not tied to groups -->
<h2 class="anchor-target" id="proceedings-materials">Proceedings Materials</h2>
<table class="table table-condensed table-striped">
<thead>
<tr>
{% if user|has_role:'Secretariat' %}
<th class="col-md-2">Type</th>
<th class="col-md-8">Title</th>
<th class="col-md-1">Updated</th>
<th class="col-md-1"> </th>
{% else %}
<th class="col-md-2">Type</th>
<th class="col-md-9">Title</th>
<th class="col-md-1">Updated</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for type_name, material in proceedings_materials %}
{# secretariat sees empty slots, others do not #}
{% if user|has_role:'Secretariat' or meeting and material.active %}
<tr>
<td>{{ type_name }}</td>
{% if material and material.active %}
<td>
<a
href="{{ material.get_href }}">
{{ material.document.title }}
</a>
</td>
<td>
{% with timestamp=material.document.time|utc %}
{{ timestamp|date:"Y-m-d" }}<br><small>{{ timestamp|date:"H:i:s" }} UTC</small>
{% endwith %}
{% else %}
<td colspan="2"></td>
{% endif %}
{% if user|has_role:'Secretariat' %}
{% if forloop.first %}
<td rowspan="{{ proceedings_materials|length }}">
<a href="{% url 'ietf.meeting.views_proceedings.material_details' num=meeting.number %}">
Edit materials
</a>
</td>
{% endif %}
{% endif %}
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% endif %}