translator in book box
[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           {% if book.translator %}
29               <div class="author">
30                   tłum. {{ book.translator }}
31               </div>
32           {% endif %}
33         </div>
34
35         <div class="cover-area">
36           {% if book.cover_thumb %}
37             {% if main_link %}<a href="{{ main_link }}">{% endif %}
38               <img src="{{ book.cover_thumb.url }}" alt="Cover" class="cover" />
39             {% if main_link %}</a>{% endif %}
40           {% endif %}
41           {% block cover-area-extra %}{% endblock %}
42         </div>
43
44         <div class="tags">
45           <span class="category">
46           <span class="mono"> {% trans "Epoch" %}:</span>&nbsp;<span class="book-box-tag">
47             {% for tag in tags.epoch %}
48               <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>
49               {% if not forloop.last %}<span>, </span>{% endif %}
50             {% endfor %}
51           </span></span>
52
53           <span class="category">
54           <span class="mono"> {% trans "Kind" %}:</span>&nbsp;<span class="book-box-tag">
55             {% for tag in tags.kind %}
56               <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>
57               {% if not forloop.last %}<span>, </span>{% endif %}
58             {% endfor %}
59           </span></span>
60
61           <span class="category">
62           <span class="mono"> {% trans "Genre" %}:</span>&nbsp;<span class="book-box-tag">
63             {% for tag in tags.genre %}
64               <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>
65               {% if not forloop.last %}<span>, </span>{% endif %}
66             {% endfor %}
67           </span></span>
68
69           {% if show_lang %}
70             <span class="category">
71               <span class="mono"> {% trans "Language" %}:</span>&nbsp;<span class="book-box-tag">
72                 <a>{{ book.language_name }}</a>
73               </span>
74             </span>
75           {% endif %}
76
77           {% if stage_note %}
78             <br>
79             <span class="category">
80               <a{% if stage_note_url %} href="{{ stage_note_url }}"{% endif %}>{{ stage_note }}</a>
81             </span>
82           {% endif %}
83         </div>
84       </div>
85       {% book_shelf_tags book.pk %}
86
87       <ul class="book-box-tools">
88         <li class="book-box-read">
89           {% if book.html_file %}
90             <a href="{% url 'book_text' book.slug %}" class="downarrow">{% trans "Read online" %}</a>
91           {% endif %}
92           {% if book.print_on_demand %}
93             <a href="{{ book.ridero_link }}" class="downarrow print">{% trans "Print on demand" %}</a>
94           {% endif %}
95         </li>
96         <li class="book-box-download">
97           <a class="downarrow">{% trans "Download" %}:</a>
98           <div class="book-box-formats">
99             {% if book.pdf_file %}
100               <span><a href="{{ book.pdf_file.url}}">PDF</a></span>
101             {% endif %}
102             {% custom_pdf_link_li book %}
103             {% if book.epub_file %}
104               <span><a href="{{ book.epub_file.url}}">EPUB</a></span>
105             {% endif %}
106             {% if book.mobi_file %}
107               <span><a href="{{ book.mobi_file.url}}">MOBI</a></span>
108             {% endif %}
109             {% if  book.fb2_file %}
110               <span><a href="{{ book.fb2_file.url}}">FB2</a></span>
111             {% endif %}
112             {% if  book.txt_file %}
113               <span><a href="{{ book.txt_file.url}}">TXT</a></span>
114             {% endif %}
115             {% download_audio book %}
116           </div>
117         </li>
118       </ul>
119       {% block book-box-extra-info %}{% endblock %}
120       {% block box-append %}
121       {% endblock %}
122     </div>
123
124     {% block right-column %}
125       {% if audiobooks %}
126         <div class="audiobook-right-column">
127           {% include 'catalogue/snippets/jplayer.html' %}
128         </div>
129       {% endif %}
130     {% endblock %}
131
132     <div class="clearboth"></div>
133     </div>
134   </div>
135 {% endspaceless %}