datatracker/ietf/templates/meeting/proceedings/materials_table.html
Lars Eggert cf629a42ad And more fixes.
- Legacy-Id: 19877
2022-01-25 10:14:25 +00:00

53 lines
2.4 KiB
HTML

{# bs5ok #}
{# 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="mt-3" id="proceedings-materials">Proceedings Materials</h2>
<table class="table table-sm table-striped">
<thead>
<tr>
<th data-sort="type">Type</th>
<th data-sort="title">Title</th>
<th data-sort="updated">Updated</th>
{% if user|has_role:'Secretariat' %}
<th></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 class="text-muted">{{ timestamp|date:"H:i:s" }} UTC</small>
{% endwith %}
</td>
{% else %}
<td colspan="2"></td>
{% endif %}
{% if user|has_role:'Secretariat' %}
<td class="text-end">
<a class="btn btn-sm btn-primary"
href="{% url 'ietf.meeting.views_proceedings.material_details' num=meeting.number %}">
Edit materials
</a>
</td>
{% endif %}
</tr>
{% endif %}
{% endfor %}
</tbody>
</table>
{% endif %}