1 {% extends "archive/base.html" %}
7 {% block menu-active-audiobooks %}active{% endblock %}
13 {% for alert in alerts %}
14 <div class="mt-4 alert alert-warning">{{ alert }}</div>
19 <div class="row mt-4">
20 <div class="col-xl-7">
21 <div class="card mt-4">
22 <div class="card-header">
23 <h2>{% if audiobook.slug %}<a href="{% url 'book' audiobook.slug %}" %}">{% endif %}{{ audiobook.title }}{% if audiobook.slug %}</a>{% endif %}</h2>
25 <div class="card-body">
26 <form method='post' action='.'>
28 {% bootstrap_form form %}
29 <input class="btn btn-primary" type="submit" value='{% trans "Commit" %}' />
36 <div class="col-xl-5">
37 {% if audiobook.mp3_status or audiobook.ogg_status or audiobook.youtube_status %}
38 <h2>{% trans "Publishing pending" %}</h2>
39 <form method="post" action="{% url 'cancel_publishing' audiobook.id %}">
41 <input class='btn btn-danger' type="submit" value="{% trans "Cancel publishing" %}" />
46 <div class="card mt-4">
47 <div class="card-header">
50 <div class="card-body">
51 {% if audiobook.mp3_status %}
55 {% tags_table audiobook.get_mp3_tags.tags %}
57 <p>Status: <b>{{ audiobook.get_mp3_status_display }}</b></p>
60 {% if audiobook.ogg_status %}
64 {% tags_table audiobook.get_ogg_tags.tags %}
66 <p>Status: <b>{{ audiobook.get_ogg_status_display }}</b></p>
70 {% if audiobook.mp3_file %}
71 <p><a href="{% url 'download' audiobook.id 'mp3' %}">{% trans "Download MP3 file." %}</a></p>
72 {% if audiobook.mp3_published %}
73 <p>{% trans "Published:" %} {{ audiobook.mp3_published }}</a></p>
74 {% if audiobook.get_mp3_published_tags.tags %}
75 {% tags_table audiobook.get_mp3_published_tags.tags %}
78 <p>{% trans "Not published yet." %}</p>
81 <p>{% trans "MP3 file hasn't been generated yet." %}</p>
84 {% if audiobook.ogg_file %}
85 <p><a href="{% url 'download' audiobook.id 'ogg' %}">{% trans "Download Ogg Vorbis file." %}</a></p>
86 {% if audiobook.ogg_published %}
87 <p>{% trans "Published:" %} {{ audiobook.ogg_published }}</a></p>
88 {% if audiobook.get_ogg_published_tags.tags %}
89 {% tags_table audiobook.get_ogg_published_tags.tags %}
92 <p>{% trans "Not published yet." %}</p>
95 <p>{% trans "Ogg Vorbis file hasn't been generated yet." %}</p>
98 {% if user_can_publish %}
99 <form method="post" action="{% url 'publish' audiobook.id %}">
101 <input class="btn btn-primary" type="submit" value="{% trans "Publish" %}" />
104 <a class="btn btn-primary" href="{% url 'apiclient_oauth' %}">Podłącz się</a>
107 {% if not audiobook.mp3_published or not audiobook.ogg_published %}
108 <form class="mt-3" method="post" action="{% url 'convert' audiobook.id %}">
110 <input class="btn btn-secondary" type="submit" value="{% trans "Convert without publishing" %}" />
118 <div class="card mt-4">
119 <div class="card-header">
122 <div class="card-body">
123 {% if audiobook.youtube_status %}
127 <p>Status: <b>{{ audiobook.get_youtube_status_display }}</b></p>
130 {% if audiobook.youtube_id %}
131 {% if audiobook.youtube_id %}
133 <a href="https://youtu.be/{{ audiobook.youtube_id }}" target="_blank" title="{% trans "See on YouTube" %}">
134 <img src="https://i.ytimg.com/vi/{{ audiobook.youtube_id }}/hq720.jpg" style="width: 100%">
139 {% if audiobook.youtube_published %}
140 <p>{% trans "Published:" %} {{ audiobook.youtube_published }}</a></p>
141 {% if audiobook.get_youtube_published_tags.tags %}
142 {% tags_table audiobook.get_youtube_published_tags.tags %}
145 <p>{% trans "Not published yet." %}</p>
148 <p>{% trans "YouTube file hasn't been generated yet." %}</p>
151 {% if audiobook.youtube_id %}
152 <form method="post" action="{% url 'youtube_update_thumbnail' audiobook.id %}">
154 <input class="btn btn-secondary" type="submit" value="{% trans "Update YouTube thumbnail" %}">
158 <form method="post" action="{% url 'youtube_update' audiobook.id %}">
160 <input class="btn btn-secondary" type="submit" value="{% trans "Update YouTube metadata" %}">
164 {% if audiobook.is_youtube_publishable %}
167 <a href="{% url 'youtube_preview' audiobook.id %}">
168 {% trans "Preview YouTube metadata" %}
171 <form method="post" action="{% url 'youtube_publish' audiobook.id %}">
173 <input class="btn btn-primary" type="submit" value="{% trans "Publish on YouTube" %}" />
186 <div class="col-xl-6">
188 <div class="card mt-4">
189 <div class="card-header">
190 <h3>Metadane dla MP3, Ogg</h3>
192 <div class="card-body">
193 <table class='table'>
194 {% tags_table audiobook.new_publish_tags 0 %}
200 <div class="col-xl-6">
201 <div class="card mt-4">
202 <div class="card-header">
203 <h3>Metadane dla YouTube</h3>
205 <div class="card-body">
206 <img src="{% url 'youtube_thumbnail' audiobook.id %}" style="width:100%">
207 <strong>{{ youtube_title }}</strong><br><br>
208 {{ youtube_description|linebreaksbr }}
216 <div class="card mt-4 mb-4">
217 <div class="card-header">
218 <h2>Plik źródłowy</h2>
220 <div class="card-body">
221 <p>Last modified: {{ audiobook.modified }}</p>
222 <p>Plik źródłowy: <a href='{{ audiobook.source_file.url }}'>{{ path }}</a>
223 (sha1: <tt>{{ audiobook.source_sha1 }}</tt>).
225 {% multiple_tags_table tags %}
227 <form method="post" action="{% url 'remove_to_archive' audiobook.id %}"
228 onsubmit='return confirm("{% trans "Are you sure you want to move this audiobook to archive?" %}")'>
230 <input class="btn btn-danger" type="submit" value="{% trans "Remove to archive" %}" />