dcb2d5456abbbec0a1a695392dcc62fd8ae646c0
[redakcja.git] / src / catalogue / templates / catalogue / book_list / book.html
1 {% load i18n %}
2 {% load username from common_tags %}
3
4 {% if book.single %}
5     {% with chunk as chunk %}
6     <tr>
7         <td><input type="checkbox" name="select_book" value="{{book.id}}" data-chunk-id="{{chunk.id}}"/></td>
8         <td><a class="btn btn-sm btn-secondary" href="{% url 'catalogue_book' book.slug %}"><small>{% trans "Book settings" %}</small></a></td>
9         <td><a class="btn btn-sm btn-secondary" href="{% url 'catalogue_chunk_edit' book.slug chunk.slug %}"><small>{% trans "Chunk settings" %}</small></a></td>
10         <td><a class="btn btn-primary" target="_blank"
11                     href="{% url 'wiki_editor' book.slug %}">
12                         {% trans "Edit:" %}
13                     {{ book.title }}</a></td>
14         <td>{% if chunk.stage %}
15             {{ chunk.stage }}
16         {% else %}–
17         {% endif %}</td>
18         <td class='user-column'>{% if chunk.user %}<a href="{% url 'catalogue_user' chunk.user.username %}">{{ chunk.user|username }}</a>{% endif %}</td>
19         <td>
20             {% if chunk.published %}
21             <div><small>{% trans "published" %}</small></div>
22             {% endif %}
23             {% if book.new_publishable %}
24             <div><small>{% trans "publishable" %}</small></div>
25             {% endif %}
26             {% if chunk.changed %}
27             <div><small>{% trans "changed" %}</small></div>
28             {% endif %}
29         </td>
30         <td>{{ book.project.name }}</td>
31     </tr>
32     {% endwith %}
33 {% else %}
34     <tr>
35         <td><input type="checkbox" name="select_book" value="{{book.id}}"/></td>
36         <td><a class='btn btn-sm btn-secondary' href="{% url 'catalogue_book' book.slug %}"><small>{% trans "Book settings" %}</small></a></td>
37         <td></td>
38         <td>{{ book.title }}</td>
39         <td></td>
40         <td class='user-column'></td>
41         <td>
42             {% if book.published %}
43             <div><small>{% trans "published" %}</small></div>
44             {% endif %}
45             {% if book.new_publishable %}
46             <div><small>{% trans "publishable" %}</small></div>
47             {% endif %}
48         </td>
49         <td>{{ book.project.name }}</td>
50     </tr>
51 {% endif %}