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">
76 {% if audiobook.is_youtube_publishable %}
78 <a href="{% url 'youtube_preview' audiobook.id %}">
79 {% trans "Preview YouTube metadata" %}
82 <form method="post" action="{% url 'youtube_publish' audiobook.id %}">
84 <input class="btn btn-primary" type="submit" value="{% trans "Publish on YouTube" %}" />
88 {% if audiobook.youtube_id %}
89 <form method="post" action="{% url 'youtube_update' audiobook.id %}">
91 <input class="btn btn-secondary" type="submit" value="{% trans "Update YouTube metadata" %}">
105 <div class="col-xl-4">
106 <div class="card mt-4">
107 <div class="card-header">
108 <h2>{% trans "MP3 file" %}</h2>
110 <div class="card-body">
111 {% if audiobook.mp3_file %}
112 <p><a href="{% url 'download' audiobook.id 'mp3' %}">{% trans "Download MP3 file." %}</a></p>
113 {% if audiobook.mp3_published %}
114 <p>{% trans "Published:" %} {{ audiobook.mp3_published }}</a></p>
115 {% if audiobook.get_mp3_published_tags.tags %}
116 {% tags_table audiobook.get_mp3_published_tags.tags %}
119 <p>{% trans "Not published yet." %}</p>
122 <p>{% trans "MP3 file hasn't been generated yet." %}</p>
128 <div class="col-xl-4">
129 <div class="card mt-4">
130 <div class="card-header">
131 <h2>{% trans "Ogg Vorbis file" %}</h2>
133 <div class="card-body">
134 {% if audiobook.ogg_file %}
135 <p><a href="{% url 'download' audiobook.id 'ogg' %}">{% trans "Download Ogg Vorbis file." %}</a></p>
136 {% if audiobook.ogg_published %}
137 <p>{% trans "Published:" %} {{ audiobook.ogg_published }}</a></p>
138 {% if audiobook.get_ogg_published_tags.tags %}
139 {% tags_table audiobook.get_ogg_published_tags.tags %}
142 <p>{% trans "Not published yet." %}</p>
145 <p>{% trans "Ogg Vorbis file hasn't been generated yet." %}</p>
151 <div class="col-xl-4">
152 <div class="card mt-4">
153 <div class="card-header">
154 <h2>{% trans "YouTube" %}</h2>
156 <div class="card-body">
157 {% if audiobook.youtube_id %}
158 {% if audiobook.youtube_id %}
160 <a href="https://youtu.be/{{ audiobook.youtube_id }}" target="_blank">{% trans "See on YouTube" %}</a>
163 {% if audiobook.youtube_published %}
164 <p>{% trans "Published:" %} {{ audiobook.youtube_published }}</a></p>
165 {% if audiobook.get_youtube_published_tags.tags %}
166 {% tags_table audiobook.get_youtube_published_tags.tags %}
169 <p>{% trans "Not published yet." %}</p>
172 <p>{% trans "YouTube file hasn't been generated yet." %}</p>
178 <div class="col-xl-6">
179 <div class="card mt-4">
180 <div class="card-header">
181 <h2>Plik źródłowy</h2>
183 <div class="card-body">
184 <p>Last modified: {{ audiobook.modified }}</p>
185 <p>Plik źródłowy: <a href='{% url "download" audiobook.id %}'>{{ path }}</a>
186 (sha1: <tt>{{ audiobook.source_sha1 }}</tt>).
188 {% multiple_tags_table tags %}
190 <form method="post" action="{% url 'remove_to_archive' audiobook.id %}"
191 onsubmit='return confirm("{% trans "Are you sure you want to move this audiobook to archive?" %}")'>
193 <input class="btn btn-danger" type="submit" value="{% trans "Remove to archive" %}" />
200 <div class="col-xl-6">
201 <div class="card mt-4 mb-4">
202 <div class="card-header">
203 <h2>{% trans "Update tags" %}</h2>
205 <div class="card-body">
207 <form method='post' action='.'>
209 {% bootstrap_form form %}
210 <input class="btn btn-primary" type="submit" value='{% trans "Commit" %}' />