0cba65cc97b5226954dbbf62af52c403498bce3c
[wolnelektury.git] / src / catalogue / templates / catalogue / book_short.html
1 {% spaceless %}
2   {% load i18n %}
3   {% load catalogue_tags %}
4   {% load book_shelf_tags from social_tags %}
5
6   <div class="{% block box-class %}book-box{% if audiobooks %} audiobook-box{% endif %}{% endblock %}">
7     <div class="book-box-inner">
8
9     {% block book-box-pre %}
10       {% include "catalogue/snippets/like_button.html" %}
11     {% endblock %}
12
13     <div class="book-left-column">
14       <div class="book-box-body">
15         {% block book-box-body-pre %}
16         {% endblock %}
17
18         <div class="book-box-head">
19           <div class="author">
20             {% for tag in tags.author %}
21               <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>{% if not forloop.last %},
22             {% endif %}{% endfor %}{% for parent in parents %},
23               <a href="{{ parent.get_absolute_url }}">{{ parent.title }}</a>{% endfor %}
24           </div>
25           <div class="title">
26             {% if main_link %}<a href="{{ main_link }}">{% endif %}{{ book.title }}{% if main_link %}</a>{% endif %}
27           </div>
28         </div>
29
30         <div class="cover-area">
31           {% if book.cover_thumb %}
32             {% if main_link %}<a href="{{ main_link }}">{% endif %}
33               <img src="{{ book.cover_thumb.url }}" alt="Cover" class="cover" />
34             {% if main_link %}</a>{% endif %}
35           {% endif %}
36           {% block cover-area-extra %}{% endblock %}
37         </div>
38
39         <div class="tags">
40           <span class="category">
41           <span class="mono"> {% trans "Epoch" %}:</span>&nbsp;<span class="book-box-tag">
42             {% for tag in tags.epoch %}
43               <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>
44               {% if not forloop.last %}<span>, </span>{% endif %}
45             {% endfor %}
46           </span></span>
47
48           <span class="category">
49           <span class="mono"> {% trans "Kind" %}:</span>&nbsp;<span class="book-box-tag">
50             {% for tag in tags.kind %}
51               <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>
52               {% if not forloop.last %}<span>, </span>{% endif %}
53             {% endfor %}
54           </span></span>
55
56           <span class="category">
57           <span class="mono"> {% trans "Genre" %}:</span>&nbsp;<span class="book-box-tag">
58             {% for tag in tags.genre %}
59               <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>
60               {% if not forloop.last %}<span>, </span>{% endif %}
61             {% endfor %}
62           </span></span>
63
64           {% if show_lang %}
65             <span class="category">
66               <span class="mono"> {% trans "Language" %}:</span>&nbsp;<span class="book-box-tag">
67                 <a>{{ book.language_name }}</a>
68               </span>
69             </span>
70           {% endif %}
71
72           {% if stage_note %}
73             <br>
74             <span class="category">
75               <a{% if stage_note_url %} href="{{ stage_note_url }}"{% endif %}>{{ stage_note }}</a>
76             </span>
77           {% endif %}
78         </div>
79       </div>
80       {% book_shelf_tags book.pk %}
81
82       <ul class="book-box-tools">
83         <li class="book-box-read">
84           {% if book.html_file %}
85             <a href="{% url 'book_text' book.slug %}" class="downarrow">{% trans "Read online" %}</a>
86           {% endif %}
87         </li>
88         <li class="book-box-download">
89           <a class="downarrow">{% trans "Download" %}:</a>
90           <div class="book-box-formats">
91             {% if book.pdf_file %}
92               <span><a href="{{ book.pdf_file.url}}">PDF</a></span>
93             {% endif %}
94             {% custom_pdf_link_li book %}
95             {% if book.epub_file %}
96               <span><a href="{{ book.epub_file.url}}">EPUB</a></span>
97             {% endif %}
98             {% if book.mobi_file %}
99               <span><a href="{{ book.mobi_file.url}}">MOBI</a></span>
100             {% endif %}
101             {% if  book.fb2_file %}
102               <span><a href="{{ book.fb2_file.url}}">FB2</a></span>
103             {% endif %}
104             {% if  book.txt_file %}
105               <span><a href="{{ book.txt_file.url}}">TXT</a></span>
106             {% endif %}
107             {% download_audio book %}
108           </div>
109         </li>
110       </ul>
111       {% block book-box-extra-info %}{% endblock %}
112       {% block box-append %}
113       {% endblock %}
114     </div>
115
116     {% block right-column %}
117       {% if audiobooks %}
118         <div class="audiobook-right-column">
119           {% include 'catalogue/snippets/jplayer.html' %}
120         </div>
121       {% endif %}
122     {% endblock %}
123
124     <div class="clearboth"></div>
125     </div>
126   </div>
127 {% endspaceless %}