Rearrange source to src dir.
[redakcja.git] / src / catalogue / templates / catalogue / document_upload.html
1 {% extends "catalogue/base.html" %}
2 {% load i18n %}
3
4
5 {% block titleextra %}{% trans "Bulk document upload" %}{% endblock %}
6
7
8 {% block leftcolumn %}
9
10
11 <h2>{% trans "Bulk documents upload" %}</h2>
12
13 <p>
14 {% trans "Please submit a ZIP with UTF-8 encoded XML files. Files not ending with <code>.xml</code> will be ignored." %}
15 </p>
16
17 <form enctype="multipart/form-data" method="POST" action="{{ request.path }}">
18 {% csrf_token %}
19 {{ form.as_p }}
20 <p><button type="submit">{% trans "Upload" %}</button></p>
21 </form>
22
23 <hr/>
24
25 {% if error_list %}
26
27     <p class='error'>{% trans "There have been some errors. No files have been added to the repository." %}
28     <h3>{% trans "Offending files" %}</h3>
29     <ul id='error-list'>
30         {% for filename, title, error in error_list %}
31             <li>{{ title }} (<code>{{ filename }}</code>): {{ error }}</li>
32         {% endfor %}
33     </ul>
34
35     {% if ok_list %}
36     <h3>{% trans "Correct files" %}</h3>
37         <ul>
38             {% for filename, slug, title in ok_list %}
39                 <li>{{ title }} (<code>{{ filename }}</code>)</li>
40             {% endfor %}
41         </ul>
42     {% endif %}
43
44 {% else %}
45
46     {% if ok_list %}
47         <p class='success'>{% trans "Files have been successfully uploaded to the repository." %}</p>
48         <h3>{% trans "Uploaded files" %}</h3>
49         <ul id='ok-list'>
50         {% for filename, slug, title in ok_list %}
51             <li><a href='{% url "wiki_editor" slug %}'>{{ title }}</a> (<code>{{ filename }})</a></li>
52         {% endfor %}
53         </ul>
54     {% endif %}
55 {% endif %}
56
57 {% if skipped_list %}
58     <h3>{% trans "Skipped files" %}</h3>
59     <p>{% trans "Files skipped due to no <code>.xml</code> extension" %}</p>
60     <ul id='skipped-list'>
61         {% for filename in skipped_list %}
62             <li>{{ filename }}</li>
63         {% endfor %}
64     </ul>
65 {% endif %}
66
67
68 {% endblock leftcolumn %}
69
70
71 {% block rightcolumn %}
72 {% endblock rightcolumn %}