-
Notifications
You must be signed in to change notification settings - Fork 90
Expand file tree
/
Copy pathdocument_management.html
More file actions
220 lines (201 loc) · 10.4 KB
/
document_management.html
File metadata and controls
220 lines (201 loc) · 10.4 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
{% extends "admin/core/base.html" %}
{% load static %}
{% load securitytags %}
{% load files %}
{% block title %}Article Document Management{% endblock title %}
{% block title-section %}Article Document Management{% endblock %}
{% block title-sub %}{% include "admin/elements/article_title_sub.html" %}{% endblock %}
{% block body %}
{% csrf_token %}
<div class="row expanded box">
<div class="large-12 columns">
<div class="title-area">
Article #{{ article.pk }} {{ article.safe_title }} Files
</div>
<table id="files" class="small files">
<thead>
<tr>
<th>ID</th>
<th>Label</th>
<th>Filename</th>
<th>Type</th>
<th>Uploaded</th>
<th>Modified</th>
<th>Download</th>
<th>History</th>
<th>Replace</th>
<th>Delete</th>
{% if request.user.is_admin %}
<th>Admin</th>
{% endif %}
</tr>
</thead>
<tbody>
{% for file in files %}
{% can_edit_file file article as can_edit_file_flag %}
{% can_view_file file as can_view_file_flag %}
{% can_view_file_history file article as can_view_file_history_flag %}
<tr>
<td>{{ file.pk }}</td>
<td class="wrap-long-text">{% if not file.label %}No Label{% endif %}{{ file.label }}</td>
<td class="wrap-long-text">{{ file }}</td>
<td>{% file_type article file %}</td>
<td>{{ file.date_uploaded|date:"Y-m-d G:i" }}</td>
<td>{{ file.last_modified|date:"Y-m-d G:i" }}</td>
<td>{% if can_view_file_flag %}
<a href="{% url 'article_file_download' 'id' article.pk file.pk %}"><i
class="fa fa-download">
</i></a>{% endif %}</td>
<td>{% if can_view_file_history_flag %}
<a href="{% url 'file_history' article.pk file.pk %}?return={{ request.path|urlencode }}"><i
class="fa fa-history">
</i></a>{% endif %}
</td>
<td>{% if can_edit_file_flag %}
<a href="{% url 'article_file_replace' 'id' article.pk file.pk %}?return={{ request.path|urlencode }}%3Freturn%3D{{ request.GET.return|urlencode }}"><i
class="fa fa-cloud-upload"> </i></a>{% endif %}</td>
<td>{% if can_edit_file_flag %}
<a href="{% url 'file_delete' article.pk file.pk %}?return={{ request.path|urlencode }}%3Freturn%3D{{ request.GET.return|urlencode }}"><i
class="fa fa-trash">
</i></a>{% endif %}</td>
{% if request.user.is_admin %}
<td>
<a target="_blank" href="{% url 'admin:core_file_change' file.pk %}"><span class="fa fa-cogs"> </span>Edit</a>
</td>
{% endif %}
</tr>
{% endfor %}
</tbody>
</table>
<p>If required, you can upload new files to various sections of the workflow.</p>
<a class="button success" data-open="uploadbox" aria-controls="uploadbox" aria-haspopup="true" tabindex="0"><i
class="fa fa-cloud-upload">
</i>Upload File</a>
</div>
</div>
<div class="large-12 columns">
<form method="POST">
{% csrf_token %}
<a class="button success float-right" href="{{ return_url }}"><i class="fa fa-check"> </i>Return
</a>
</form>
</div>
<div class="reveal" id="uploadbox" data-reveal data-animation-in="slide-in-up"
data-animation-out="slide-out-down">
<div class="card">
<div class="card-divider">
<h4><i class="fa fa-upload"> </i>Upload File</h4>
</div>
</div>
<div class="card-section">
<p>Add a label and then upload a file. You can only upload one file type at a time.</p>
{% if error %}
<div class="alert alert-warning" role="alert">{{ error }}</div>
{% endif %}
<button class="close-button" data-close aria-label="Close modal" type="button">
<span aria-hidden="true">×</span>
</button>
<form method="POST" enctype="multipart/form-data">
{% csrf_token %}
<label for="label">File Label*</label>
<input type="text" maxlength="200" id="label" name="label" placeholder="Add file label here." required="required" />
<input type="hidden" name="upload" value="upload">
<h4>Manuscript File</h4>
<div class="clearfix">
<div>
<p><small>Manuscript files hold the main text content of the
article while it is being finalized. They are used across review,
copyediting, and typesetting.</small></p>
<input name="manu-file" type="file" class="float-left" style="width:50%;"
data-placeholder="No file"
data-buttonName="btn-primary">
<button type="submit" class="button success float-right" name="manu"><i
class="fa fa-upload">
</i>Upload
</button>
</div>
</div>
<h4>Figure/Data File</h4>
<div class="clearfix">
<div>
<p><small>Figure files hold images that will be included
in the article. Data files hold any other other content
that is not an image or main text content
but that will be included in the published article.</small></p>
<input name="fig-file" type="file" class="float-left" style="width:50%;"
data-placeholder="No file"
data-buttonName="btn-primary">
<button type="submit" class="button success float-right" name="fig"><i
class="fa fa-upload">
</i>Upload
</button>
</div>
</div>
<h4>Galley File</h4>
<div class="clearfix">
<div>
<p><small>Galleys are files that have been typeset
or encoded, most often in XML, HTML, or PDF format,
so that they are ready for proofing and publication.</small></p>
<input name="galley-file" type="file" class="float-left" style="width:50%;"
data-placeholder="No file"
data-buttonName="btn-primary">
<button type="submit" class="button success float-right" name="galley"><i
class="fa fa-upload">
</i>Upload
</button>
</div>
</div>
<h4>Proofing File</h4>
<div class="clearfix">
<div>
<p><small>Proofing files are copies of galleys
that have been marked up to indicate corrections to be
made in subsequent rounds of typesetting.</small></p>
<input name="proofing-file" type="file" class="float-left" style="width:50%;"
data-placeholder="No file"
data-buttonName="btn-primary">
<button type="submit" class="button success float-right" name="proofing"><i
class="fa fa-upload">
</i>Upload
</button>
</div>
</div>
<h4>Source File</h4>
<div class="clearfix">
<div>
<p><small>Source files are files created in typesetting
while generating a galley. They are often in
specialized file formats used by graphic design and
document layout applications.</small></p>
<input name="source-file" type="file" class="float-left" style="width:50%;"
data-placeholder="No file"
data-buttonName="btn-primary">
<button type="submit" class="button success float-right" name="source"><i
class="fa fa-upload">
</i>Upload
</button>
</div>
</div>
<h4>Supplementary File</h4>
<div class="clearfix">
<div>
<p><small>Supplementary files are publication-ready
pieces of content to be published alongside the article,
often with their own DOIs.</small></p>
<input name="supp-file" type="file" class="float-left" style="width:50%;"
data-placeholder="No file"
data-buttonName="btn-primary">
<button type="submit" class="button success float-right" name="supp"><i
class="fa fa-upload">
</i>Upload
</button>
</div>
</div>
</form>
</div>
</div>
{% endblock body %}
{% block js %}
{% include "admin/elements/datatables.html" with target="#files" %}
{% endblock js %}