Reduce the crazy, just upload things.
[audio.git] / src / archive / templates / archive / file_managed.html
1 {% extends "archive/base.html" %}
2 {% load i18n %}
3 {% load tags %}
4
5 {% block content %}
6
7 <p>Plik źródłowy: <a href='{% url "download" audiobook.id %}'>{{ path }}</a>
8 (sha1: <tt>{{ audiobook.source_sha1 }}</tt>).
9 </p>
10
11 <h2>{% trans "Publishing" %}</h2>
12
13 {% if audiobook.mp3_status or audiobook.ogg_status %}
14
15 <h2>{% trans "Publishing pending" %}</h2>
16
17 <form method="post" action="{% url 'cancel_publishing' audiobook.id %}">
18     {% csrf_token %}
19     <input type="submit" value="{% trans "Cancel publishing" %}" />
20 </form>
21
22
23 {% if audiobook.mp3_status %}
24     <hr/>
25     <h2>MP3</h2>
26
27     {% tags_table audiobook.mp3_tags.tags %}
28
29     <p>Status: <b>{{ audiobook.get_mp3_status_display }}</b></p>
30 {% endif %}
31
32 {% if audiobook.ogg_status %}
33     <hr/>
34     <h2>Ogg Vorbis</h2>
35
36     {% tags_table audiobook.ogg_tags.tags %}
37
38     <p>Status: <b>{{ audiobook.get_ogg_status_display }}</b></p>
39 {% endif %}
40
41
42
43
44 {% else %}
45     <table class='tags'>
46         {% tags_table audiobook.new_publish_tags 0 %}
47         <tr><th></th><td>
48
49             {% if user_can_publish %}
50                 <form method="post" action="{% url 'publish' audiobook.id %}">
51                     {% csrf_token %}
52                     <input type="submit" value="{% trans "Publish" %}" />
53                 </form>
54             {% else %}
55                 <a href="{% url 'apiclient_oauth' %}">Podłącz się</a>
56             {% endif %}
57
58             {% if not audiobook.mp3_published or not audiobook.ogg_published %}
59             <form method="post" action="{% url 'convert' audiobook.id %}">
60                 {% csrf_token %}
61                 <input type="submit" value="{% trans "Convert without publishing" %}" />
62             </form>
63             {% endif %}
64
65         </td></tr>
66     </table>
67 {% endif %}
68
69 <hr/>
70 {% if audiobook.mp3_file %}
71     <h2>{% trans "MP3 file" %}</h2>
72     <p><a href="{% url 'download' audiobook.id 'mp3' %}">{% trans "Download MP3 file." %}</a></p>
73     {% if audiobook.mp3_published %}
74         <p>{% trans "Published:" %} {{ audiobook.mp3_published }}</a></p>
75         {% if audiobook.mp3_published_tags.tags %}
76             {% tags_table audiobook.mp3_published_tags.tags %}
77         {% endif %}
78     {% else %}
79         <p>{% trans "Not published yet." %}</p>
80     {% endif %}
81 {% else %}
82     <p>{% trans "MP3 file hasn't been generated yet." %}</p>
83 {% endif %}
84
85 <hr/>
86 {% if audiobook.ogg_file %}
87     <h2>{% trans "Ogg Vorbis file" %}</h2>
88     <p><a href="{% url 'download' audiobook.id 'ogg' %}">{% trans "Download Ogg Vorbis file." %}</a></p>
89     {% if audiobook.ogg_published %}
90         <p>{% trans "Published:" %} {{ audiobook.ogg_published }}</a></p>
91         {% if audiobook.ogg_published_tags.tags %}
92             {% tags_table audiobook.ogg_published_tags.tags %}
93         {% endif %}
94     {% else %}
95         <p>{% trans "Not published yet." %}</p>
96     {% endif %}
97 {% else %}
98     <p>{% trans "Ogg Vorbis file hasn't been generated yet." %}</p>
99 {% endif %}
100
101
102
103
104 <hr />
105
106
107
108
109 <h2>{% trans "Update tags" %}</h2>
110
111 Last modified: {{ audiobook.modified }}
112
113 {% multiple_tags_table tags %}
114
115
116
117 <form method='post' action='.'>
118     {% csrf_token %}
119     <table>
120         {{ form.as_table }}
121         <td></td><td><input type="submit" value='{% trans "Commit" %}' /></td></td>
122     </table>
123 </form>
124
125
126
127 <hr />
128
129
130
131 <form method="post" action="{% url 'remove_to_archive' audiobook.id %}"
132     onsubmit='return confirm("{% trans "Are you sure you want to move this audiobook to archive?" %}")'>
133     {% csrf_token %}
134     <input type="submit" value="{% trans "Remove to archive" %}" />
135 </form>
136
137
138
139 {% endblock %}