Mass yt publishing.
[audio.git] / src / archive / templates / archive / book.html
1 {% extends "archive/base.html" %}
2 {% load i18n %}
3 {% load tags %}
4
5
6 {% block menu-active-audiobooks %}active{% endblock %}
7
8
9 {% block content %}
10   <div class="card mt-4">
11     <div class="card-header">
12       <h2>{{ object_list.0.book.title }}</h2>
13     </div>
14     <div class="card-body">
15       <table class="table">
16         <thead>
17           <tr>
18             <th>{% trans "Index" %}</th>
19             <th>{% trans "Title" %}</th>
20             <th>MP3</th>
21             <th>Ogg</th>
22             <th colspan="3">YouTube</th>
23           </tr>
24         </thead>
25         <tbody>
26           {% with volumes=object_list.0.youtube_volume_count %}
27             {% for audiobook in object_list %}
28               <tr>
29                 <td>{{ audiobook.index }}</td>
30                 <td>
31                   <a href="{% url 'file' audiobook.id %}">
32                     {% if audiobook.part_name %}
33                       {{ audiobook.part_name }}
34                     {% else %}
35                       <em class="text-warning" title="ddd">
36                         ({{ audiobook }})
37                       </em>
38                       {% endif %}
39                   </a>
40                 </td>
41                 <td>{% status audiobook "mp3" %}</td>
42                 <td>{% status audiobook "ogg" %}</td>
43                 {% ifchanged audiobook.youtube_volume_index %}
44                   <td>
45                     {{ audiobook.youtube_volume_index }}/{{ volumes }}
46                   </td>
47                   <td>
48                     {{ audiobook.youtube_volume }}
49                   </td>
50                   <td>
51                     {% status audiobook "youtube" %}
52                   </td>
53                 {% else  %}
54                   <td>
55                     –
56                   </td>
57                   <td>
58                     <span class="text-secondary">
59                       {{ audiobook.youtube_volume }}
60                     </span>
61                   </td>
62                   <td>
63                   </td>
64                 {% endifchanged %}
65               </tr>
66             {% endfor %}
67           {% endwith %}
68         </tbody>
69       </table>
70       <form method="post" action="{% url 'youtube_book_publish' view.kwargs.slug %}">
71         {% csrf_token %}
72         <button class="btn btn-primary">
73           Opublikuj wszystko na YouTube
74         </button>
75       </form>
76     </div>
77 {% endblock %}