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