1 {% extends "archive/base.html" %}
10 <div class="card mt-4">
11 <div class="card-header">
12 <h2>{% trans "Publishing" %}</h2>
14 <div class="card-body">
15 {% if audiobook.mp3_status or audiobook.ogg_status or audiobook.youtube_status %}
16 <h2>{% trans "Publishing pending" %}</h2>
17 <form method="post" action="{% url 'cancel_publishing' audiobook.id %}">
19 <input class='btn btn-danger' type="submit" value="{% trans "Cancel publishing" %}" />
22 {% if audiobook.mp3_status %}
26 {% tags_table audiobook.get_mp3_tags.tags %}
28 <p>Status: <b>{{ audiobook.get_mp3_status_display }}</b></p>
31 {% if audiobook.ogg_status %}
35 {% tags_table audiobook.get_ogg_tags.tags %}
37 <p>Status: <b>{{ audiobook.get_ogg_status_display }}</b></p>
40 {% if audiobook.youtube_status %}
44 <p>Status: <b>{{ audiobook.get_youtube_status_display }}</b></p>
50 {% tags_table audiobook.new_publish_tags 0 %}
54 <div class="col-md-6">
55 {% if user_can_publish %}
56 <form method="post" action="{% url 'publish' audiobook.id %}">
58 <input class="btn btn-primary" type="submit" value="{% trans "Publish" %}" />
61 <a class="btn btn-primary" href="{% url 'apiclient_oauth' %}">Podłącz się</a>
64 {% if not audiobook.mp3_published or not audiobook.ogg_published %}
65 <form class="mt-3" method="post" action="{% url 'convert' audiobook.id %}">
67 <input class="btn btn-secondary" type="submit" value="{% trans "Convert without publishing" %}" />
71 <div class="col-md-6">
73 <a href="{% url 'youtube_preview' audiobook.id %}">
74 {% trans "Preview YouTube metadata" %}
77 <form method="post" action="{% url 'youtube_publish' audiobook.id %}">
79 <input class="btn btn-primary" type="submit" value="{% trans "Publish on YouTube" %}" />
82 <form class="mt-3" method="post" action="{% url 'youtube_convert' audiobook.id %}">
84 <input class="btn btn-secondary" type="submit" value="{% trans "Convert without publishing" %}" />
96 <div class="col-xl-4">
97 <div class="card mt-4">
98 <div class="card-header">
99 <h2>{% trans "MP3 file" %}</h2>
101 <div class="card-body">
102 {% if audiobook.mp3_file %}
103 <p><a href="{% url 'download' audiobook.id 'mp3' %}">{% trans "Download MP3 file." %}</a></p>
104 {% if audiobook.mp3_published %}
105 <p>{% trans "Published:" %} {{ audiobook.mp3_published }}</a></p>
106 {% if audiobook.get_mp3_published_tags.tags %}
107 {% tags_table audiobook.get_mp3_published_tags.tags %}
110 <p>{% trans "Not published yet." %}</p>
113 <p>{% trans "MP3 file hasn't been generated yet." %}</p>
119 <div class="col-xl-4">
120 <div class="card mt-4">
121 <div class="card-header">
122 <h2>{% trans "Ogg Vorbis file" %}</h2>
124 <div class="card-body">
125 {% if audiobook.ogg_file %}
126 <p><a href="{% url 'download' audiobook.id 'ogg' %}">{% trans "Download Ogg Vorbis file." %}</a></p>
127 {% if audiobook.ogg_published %}
128 <p>{% trans "Published:" %} {{ audiobook.ogg_published }}</a></p>
129 {% if audiobook.get_ogg_published_tags.tags %}
130 {% tags_table audiobook.get_ogg_published_tags.tags %}
133 <p>{% trans "Not published yet." %}</p>
136 <p>{% trans "Ogg Vorbis file hasn't been generated yet." %}</p>
142 <div class="col-xl-4">
143 <div class="card mt-4">
144 <div class="card-header">
145 <h2>{% trans "YouTube" %}</h2>
147 <div class="card-body">
148 {% if audiobook.youtube_id %}
149 {% if audiobook.youtube_id %}
151 <a href="https://youtu.be/{{ audiobook.youtube_id }}" target="_blank">{% trans "See on YouTube" %}</a>
153 <form method="post" action="{% url 'youtube_update' audiobook.id %}">
155 <input class="btn btn-secondary" type="submit" value="{% trans "Update YouTube metadata" %}">
158 {% if audiobook.youtube_published %}
159 <p>{% trans "Published:" %} {{ audiobook.youtube_published }}</a></p>
160 {% if audiobook.get_youtube_published_tags.tags %}
161 {% tags_table audiobook.get_youtube_published_tags.tags %}
164 <p>{% trans "Not published yet." %}</p>
167 <p>{% trans "YouTube file hasn't been generated yet." %}</p>
173 <div class="col-xl-6">
174 <div class="card mt-4">
175 <div class="card-header">
176 <h2>Plik źródłowy</h2>
178 <div class="card-body">
179 <p>Last modified: {{ audiobook.modified }}</p>
180 <p>Plik źródłowy: <a href='{% url "download" audiobook.id %}'>{{ path }}</a>
181 (sha1: <tt>{{ audiobook.source_sha1 }}</tt>).
183 {% multiple_tags_table tags %}
185 <form method="post" action="{% url 'remove_to_archive' audiobook.id %}"
186 onsubmit='return confirm("{% trans "Are you sure you want to move this audiobook to archive?" %}")'>
188 <input class="btn btn-danger" type="submit" value="{% trans "Remove to archive" %}" />
195 <div class="col-xl-6">
196 <div class="card mt-4 mb-4">
197 <div class="card-header">
198 <h2>{% trans "Update tags" %}</h2>
200 <div class="card-body">
202 <form method='post' action='.'>
204 {% bootstrap_form form %}
205 <input class="btn btn-primary" type="submit" value='{% trans "Commit" %}' />