forked from adamlaska/datatracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmaterial_details.html
More file actions
152 lines (129 loc) · 5.28 KB
/
material_details.html
File metadata and controls
152 lines (129 loc) · 5.28 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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
{% 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 %}