1 {% extends "archive/base.html" %}
10 {% for alert in alerts %}
11 <div class="mt-4 alert alert-warning">{{ alert }}</div>
14 <div class="card mt-4">
15 <div class="card-header">
16 <h2>{% trans "Publishing" %}</h2>
18 <div class="card-body">
19 {% if audiobook.mp3_status or audiobook.ogg_status or audiobook.youtube_status %}
20 <h2>{% trans "Publishing pending" %}</h2>
21 <form method="post" action="{% url 'cancel_publishing' audiobook.id %}">
23 <input class='btn btn-danger' type="submit" value="{% trans "Cancel publishing" %}" />
26 {% if audiobook.mp3_status %}
30 {% tags_table audiobook.get_mp3_tags.tags %}
32 <p>Status: <b>{{ audiobook.get_mp3_status_display }}</b></p>
35 {% if audiobook.ogg_status %}
39 {% tags_table audiobook.get_ogg_tags.tags %}
41 <p>Status: <b>{{ audiobook.get_ogg_status_display }}</b></p>
44 {% if audiobook.youtube_status %}
48 <p>Status: <b>{{ audiobook.get_youtube_status_display }}</b></p>
54 {% tags_table audiobook.new_publish_tags 0 %}
58 <div class="col-md-6">
59 {% if user_can_publish %}
60 <form method="post" action="{% url 'publish' audiobook.id %}">
62 <input class="btn btn-primary" type="submit" value="{% trans "Publish" %}" />
65 <a class="btn btn-primary" href="{% url 'apiclient_oauth' %}">Podłącz się</a>
68 {% if not audiobook.mp3_published or not audiobook.ogg_published %}
69 <form class="mt-3" method="post" action="{% url 'convert' audiobook.id %}">
71 <input class="btn btn-secondary" type="submit" value="{% trans "Convert without publishing" %}" />
75 <div class="col-md-6">
77 <a href="{% url 'youtube_preview' audiobook.id %}">
78 {% trans "Preview YouTube metadata" %}
81 <form method="post" action="{% url 'youtube_publish' audiobook.id %}">
83 <input class="btn btn-primary" type="submit" value="{% trans "Publish on YouTube" %}" />
86 {% if audiobook.youtube_id %}
87 <form method="post" action="{% url 'youtube_update' audiobook.id %}">
89 <input class="btn btn-secondary" type="submit" value="{% trans "Update YouTube metadata" %}">
103 <div class="col-xl-4">
104 <div class="card mt-4">
105 <div class="card-header">
106 <h2>{% trans "MP3 file" %}</h2>
108 <div class="card-body">
109 {% if audiobook.mp3_file %}
110 <p><a href="{% url 'download' audiobook.id 'mp3' %}">{% trans "Download MP3 file." %}</a></p>
111 {% if audiobook.mp3_published %}
112 <p>{% trans "Published:" %} {{ audiobook.mp3_published }}</a></p>
113 {% if audiobook.get_mp3_published_tags.tags %}
114 {% tags_table audiobook.get_mp3_published_tags.tags %}
117 <p>{% trans "Not published yet." %}</p>
120 <p>{% trans "MP3 file hasn't been generated yet." %}</p>
126 <div class="col-xl-4">
127 <div class="card mt-4">
128 <div class="card-header">
129 <h2>{% trans "Ogg Vorbis file" %}</h2>
131 <div class="card-body">
132 {% if audiobook.ogg_file %}
133 <p><a href="{% url 'download' audiobook.id 'ogg' %}">{% trans "Download Ogg Vorbis file." %}</a></p>
134 {% if audiobook.ogg_published %}
135 <p>{% trans "Published:" %} {{ audiobook.ogg_published }}</a></p>
136 {% if audiobook.get_ogg_published_tags.tags %}
137 {% tags_table audiobook.get_ogg_published_tags.tags %}
140 <p>{% trans "Not published yet." %}</p>
143 <p>{% trans "Ogg Vorbis file hasn't been generated yet." %}</p>
149 <div class="col-xl-4">
150 <div class="card mt-4">
151 <div class="card-header">
152 <h2>{% trans "YouTube" %}</h2>
154 <div class="card-body">
155 {% if audiobook.youtube_id %}
156 {% if audiobook.youtube_id %}
158 <a href="https://youtu.be/{{ audiobook.youtube_id }}" target="_blank">{% trans "See on YouTube" %}</a>
161 {% if audiobook.youtube_published %}
162 <p>{% trans "Published:" %} {{ audiobook.youtube_published }}</a></p>
163 {% if audiobook.get_youtube_published_tags.tags %}
164 {% tags_table audiobook.get_youtube_published_tags.tags %}
167 <p>{% trans "Not published yet." %}</p>
170 <p>{% trans "YouTube file hasn't been generated yet." %}</p>
176 <div class="col-xl-6">
177 <div class="card mt-4">
178 <div class="card-header">
179 <h2>Plik źródłowy</h2>
181 <div class="card-body">
182 <p>Last modified: {{ audiobook.modified }}</p>
183 <p>Plik źródłowy: <a href='{% url "download" audiobook.id %}'>{{ path }}</a>
184 (sha1: <tt>{{ audiobook.source_sha1 }}</tt>).
186 {% multiple_tags_table tags %}
188 <form method="post" action="{% url 'remove_to_archive' audiobook.id %}"
189 onsubmit='return confirm("{% trans "Are you sure you want to move this audiobook to archive?" %}")'>
191 <input class="btn btn-danger" type="submit" value="{% trans "Remove to archive" %}" />
198 <div class="col-xl-6">
199 <div class="card mt-4 mb-4">
200 <div class="card-header">
201 <h2>{% trans "Update tags" %}</h2>
203 <div class="card-body">
205 <form method='post' action='.'>
207 {% bootstrap_form form %}
208 <input class="btn btn-primary" type="submit" value='{% trans "Commit" %}' />