189c9322fed83f4ace7fb80319f58ecdd8911190
[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 class="table-sm">
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-outline-secondary" href="{% url 'catalogue_book' book.slug %}" title="{% trans "Book settings" %}">&#x1f4d5;</a></td>
9         <td><a class="btn btn-sm btn-outline-secondary" href="{% url 'catalogue_chunk_edit' book.slug chunk.slug %}" title="{% trans "Chunk settings" %}">&#x1f4dc;</a></td>
10         <td><a class="btn btn-primary" target="_blank"
11                     href="{% url 'wiki_editor' book.slug %}">
12                     {{ book.title }}</a></td>
13         <td>{% if chunk.stage %}
14             {{ chunk.stage }}
15         {% else %}–
16         {% endif %}</td>
17         <td class='user-column'>{% if chunk.user %}<a href="{% url 'catalogue_user' chunk.user.username %}">{{ chunk.user|username }}</a>{% endif %}</td>
18         <td>
19           {% if book.published %}
20             <span class="badge badge-info" title="{% trans "published" %}">opubl.</span>
21           {% endif %}
22           {% if book.new_publishable %}
23             <span class="badge badge-primary" title="{% trans "publishable" %}">do publ.</span>
24           {% endif %}
25           {% if chunk.changed %}
26             <span class="badge badge-warning title="{% trans "changed" %}">zmiany</span>
27           {% endif %}
28         </td>
29         <td>{{ book.project.name }}</td>
30     </tr>
31     {% endwith %}
32 {% else %}
33     <tr class="table-sm">
34       <td><input type="checkbox" name="select_book" value="{{book.id}}"/></td>
35       <td><a class='btn btn-sm btn-outline-secondary' href="{% url 'catalogue_book' book.slug %}" title="{% trans "Book settings" %}">&#x1f4d5;</a></td>
36       <td></td>
37       <td>{{ book.title }}</td>
38       <td></td>
39       <td class='user-column'></td>
40       <td>
41         {% if book.published %}
42           <span class="badge badge-info" title="{% trans "published" %}">opubl.</span>
43         {% endif %}
44         {% if book.new_publishable %}
45           <span class="badge badge-info" title="{% trans "publishable" %}">do publ.</span>
46         {% endif %}
47       </td>
48       <td>{{ book.project.name }}</td>
49     </tr>
50 {% endif %}