152 lines
5.3 KiB
HTML
152 lines
5.3 KiB
HTML
{% extends "base.html" %}
|
|
{# Copyright The IETF Trust 2015-2021, All Rights Reserved #}
|
|
{% load origin ietf_filters static tz %}
|
|
|
|
{% block title %}{{ meeting }} : Proceedings Materials{% endblock %}
|
|
|
|
{% block content %}
|
|
{% origin %}
|
|
|
|
|
|
|
|
<h1>{{ meeting }} : Proceedings Materials</h1>
|
|
|
|
{% if meeting.proceedings_final %}
|
|
<div class="alert alert-warning">
|
|
The proceedings have been finalized for this meeting.
|
|
</div>
|
|
{% endif %}
|
|
|
|
|
|
<div class="panel panel-default">
|
|
<div class="panel-heading">Proceedings Materials</div>
|
|
<div class="panel-body">
|
|
<table class="table table-condensed table-striped">
|
|
<thead>
|
|
<tr>
|
|
<th>Type</th>
|
|
<th>Title</th>
|
|
<th>Document</th>
|
|
<th>Updated</th>
|
|
<th></th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for mat_type, mat in proceedings_materials %}
|
|
<tr>
|
|
<td>{{ mat_type }}</td>
|
|
{% if mat and mat.active %}
|
|
{% url 'ietf.doc.views_doc.document_main' name=mat.document.name as url %}
|
|
<td>
|
|
<a href="{{ mat.document.get_href }}">{{ mat }}</a>
|
|
</td>
|
|
<td>
|
|
<a href="{{ url }}">{{ mat.document }}</a>
|
|
{% if mat.is_url %} (external URL) {% else %} (uploaded file) {% endif %}
|
|
</td>
|
|
<td>
|
|
{% with timestamp=mat.document.time|utc %}
|
|
{{ timestamp|date:"Y-m-d" }}<br><small>{{ timestamp|date:"H:i:s" }} UTC</small>
|
|
{% endwith %}
|
|
</td>
|
|
{% else %}
|
|
<td colspan="3"></td>
|
|
{% endif %}
|
|
|
|
{% if user|has_role:"Secretariat" %}
|
|
<td class="col-md-2">
|
|
{% url 'ietf.meeting.views_proceedings.upload_material' num=meeting.number material_type=mat_type.slug as upload_url %}
|
|
{% url 'ietf.meeting.views_proceedings.edit_material' num=meeting.number material_type=mat_type.slug as edit_url %}
|
|
{% url 'ietf.meeting.views_proceedings.remove_material' num=meeting.number material_type=mat_type.slug as remove_url %}
|
|
{% url 'ietf.meeting.views_proceedings.restore_material' num=meeting.number material_type=mat_type.slug as restore_url %}
|
|
{% if mat is None %}
|
|
<a class="btn btn-default btn-sm pull-right" href="{{ upload_url }}">Add Material</a>
|
|
{% elif mat.active %}
|
|
<a class="btn btn-default btn-sm pull-right" href="{{ upload_url }}">Replace Material</a>
|
|
<a class="btn btn-default btn-sm pull-right" href="{{ edit_url }}">Change title</a>
|
|
<a class="btn btn-default btn-sm pull-right" href="{{ remove_url }}">Remove</a>
|
|
{% else %}
|
|
<a class="btn btn-default btn-sm pull-right" href="{{ upload_url }}">Add Material</a>
|
|
<a class="btn btn-default btn-sm pull-right" href="{{ restore_url }}">Restore</a>
|
|
{% endif %}
|
|
</td>
|
|
{% endif %}
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
|
|
<a class="btn btn-default pull-right" href="{% url 'ietf.meeting.views.materials' num=meeting.number %}">Back</a>
|
|
{% endblock %}
|
|
|
|
{% comment %}{% block js %}
|
|
{% if can_manage_materials %}
|
|
<script type="text/javascript" src="{% static 'jquery/jquery.min.js' %}"></script>
|
|
<script type="text/javascript" src="{% static 'js-cookie/src/js.cookie.js' %}"></script>
|
|
<script type="text/javascript" src={% static 'Sortable/Sortable.min.js' %}></script>
|
|
|
|
<script type="text/javascript">
|
|
|
|
|
|
$.ajaxSetup({
|
|
crossDomain: false,
|
|
beforeSend: function (xhr, settings) {
|
|
if (!csrfSafeMethod(settings.type)) {
|
|
xhr.setRequestHeader('X-CSRFToken', Cookies.get('csrftoken'));
|
|
}
|
|
}
|
|
});
|
|
|
|
var sortables = [];
|
|
var options = {
|
|
group: 'slides',
|
|
animation: 150,
|
|
onAdd: function (event) {onAdd(event)},
|
|
onRemove: function (event) {onRemove(event)},
|
|
onEnd: function (event) {onEnd(event)}
|
|
};
|
|
|
|
function onAdd(event) {
|
|
var old_session = event.from.getAttribute('session');
|
|
var new_session = event.to.getAttribute('session');
|
|
$.post(event.to.getAttribute('addToSession'), {
|
|
'order': event.newIndex + 1,
|
|
'name': event.item.getAttribute('name')
|
|
});
|
|
$(event.item).find('td:eq(1)').find('a').each(function () {
|
|
$(this).attr('href', $(this).attr('href').replace(old_session, new_session));
|
|
});
|
|
}
|
|
|
|
function onRemove(event) {
|
|
var old_session = event.from.getAttribute('session');
|
|
$.post(event.from.getAttribute('removeFromSession'), {
|
|
'oldIndex': event.oldIndex + 1,
|
|
'name': event.item.getAttribute('name')
|
|
});
|
|
}
|
|
|
|
function onEnd(event) {
|
|
if (event.to == event.from) {
|
|
$.post(event.from.getAttribute('reorderInSession'), {
|
|
'oldIndex': event.oldIndex + 1,
|
|
'newIndex': event.newIndex + 1
|
|
});
|
|
}
|
|
}
|
|
|
|
$(document).ready(function () {
|
|
|
|
$('.slides tbody').each(function () {
|
|
sortables.push(Sortable.create(this, options));
|
|
});
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
{% endif %}
|
|
{% endblock %}
|
|
{% endcomment %} |