a2b0a5c41036e6a9849ce29d7bb10b702f2219ab
[wolnelektury.git] / src / catalogue / templates / catalogue / book_short.html
1 {% spaceless %}
2 {% load i18n %}
3 {% load catalogue_tags ssify %}
4 {% load likes_book book_shelf_tags from social_tags %}
5 <div class="{% block box-class %}book-box{% endblock %}">
6 <div class="book-box-inner">
7 <div class="book-left-column">
8
9
10
11
12 <div class="book-box-body">
13
14
15     {% likes_book book.pk as likes %}
16     <div class="star {{ likes.if }}{{ likes.else }}un{{ likes.endif }}like">
17         <div class="if-like" >
18             <a id="social-book-sets-{{ book.slug }}" data-callback='social-book-sets' class='ajaxable' href='{% url "social_book_sets" book.slug %}'>★</a>
19         </div>
20         <div class="if-unlike">
21             <form id="social-like-book-{{ book.slug }}" data-callback='social-like-book' method='post' class='ajax-form' action='{% url "social_like_book" book.slug %}'>
22                 {% ssi_csrf_token %}
23                 <button type='submit'>☆</button>
24             </form>
25         </div>
26     </div>
27
28     <div class="book-box-head">
29         <div class="author">
30             {% for tag in tags.author %}
31                 <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>{% if not forloop.last %},
32             {% endif %}{% endfor %}{% for parent in parents %},
33                 <a href="{{ parent.get_absolute_url }}">{{ parent.title }}</a>{% endfor %}
34         </div>
35         <div class="title">
36             {% if main_link %}<a href="{{ main_link }}">{% endif %}{{ book.title }}{% if main_link %}</a>{% endif %}
37         </div>
38     </div>
39
40     <div class="cover-area">
41         {% if book.cover_thumb %}
42             {% if main_link %}<a href="{{ main_link }}">{% endif %}
43                 <img src="{{ book.cover_thumb.url }}" alt="Cover" class="cover" />
44             {% if main_link %}</a>{% endif %}
45         {% endif %}
46         {% block cover-area-extra %}{% endblock %}
47     </div>
48
49         <div class="tags">
50             {% spaceless %}
51
52             <span class="category">
53             <span class="mono"> {% trans "Epoch" %}:</span>&nbsp;<span class="book-box-tag">
54                 {% for tag in tags.epoch %}
55                     <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>
56                     {% if not forloop.last %}<span>, </span>{% endif %}
57                 {% endfor %}
58             </span></span>
59
60             <span class="category">
61             <span class="mono"> {% trans "Kind" %}:</span>&nbsp;<span class="book-box-tag">
62                 {% for tag in tags.kind %}
63                     <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>
64                     {% if not forloop.last %}<span>, </span>{% endif %}
65                 {% endfor %}
66             </span></span>
67
68             <span class="category">
69             <span class="mono"> {% trans "Genre" %}:</span>&nbsp;<span class="book-box-tag">
70                 {% for tag in tags.genre %}
71                     <a href="{{ tag.get_absolute_url }}">{{ tag.name }}</a>
72                     {% if not forloop.last %}<span>, </span>{% endif %}
73                 {% endfor %}
74             </span></span>
75
76             {% if show_lang %}
77             <span class="category">
78             <span class="mono"> {% trans "Language" %}:</span>&nbsp;<span class="book-box-tag">
79                 <a>{{ book.language_name }}</a>
80             </span></span>
81             {% endif %}
82
83             {% if stage_note %}
84             <br><span class="category">
85                 <a{% if stage_note_url %} href="{{ stage_note_url }}"{% endif %}>{{ stage_note }}</a>
86             </span>
87             {% endif %}
88
89            {% endspaceless %}
90         </div>
91     </div>
92     {% book_shelf_tags book.pk %}
93
94     <ul class="book-box-tools">
95         <li class="book-box-read">
96         {% if book.html_file %}
97             <a href="{% url 'book_text' book.slug %}" class="downarrow">{% trans "Read online" %}</a>
98         {% endif %}
99         </li>
100         <li class="book-box-download">
101             <a class="downarrow">{% trans "Download" %}: </a>
102             <div class="book-box-formats">
103              {% if book.pdf_file %}
104              <span><a href="{{ book.pdf_file.url}}">PDF</a></span>
105              {% endif %}
106              {% custom_pdf_link_li book %}
107              {% if book.epub_file %}
108              <span><a href="{{ book.epub_file.url}}">EPUB</a></span>
109              {% endif %}
110              {% if book.mobi_file %}
111              <span><a href="{{ book.mobi_file.url}}">MOBI</a></span>
112              {% endif %}
113              {% if  book.fb2_file %}
114              <span><a href="{{ book.fb2_file.url}}">FB2</a></span>
115              {% endif %}
116              {% if  book.txt_file %}
117              <span><a href="{{ book.txt_file.url}}">TXT</a></span>
118              {% endif %}
119              {% download_audio book %}
120             </div>
121
122
123         </li>
124     </ul>
125     {% block book-box-extra-info %}{% endblock %}
126     {% block box-append %}
127     {% endblock %}
128     </div>
129
130
131
132
133
134
135     {% block right-column %}
136     {% endblock %}
137
138
139 {% if audiobooks %}
140 <div class="jp-type-playlist">
141   <div id="jplayer" class="jp-jplayer" data-player="jp_container_{{ book.pk }}"
142     data-supplied="{% if have_oggs %}oga,{% endif %}mp3"></div>
143   <div id="jp_container_{{ book.pk }}" class="jp-audio">
144     <div class="jp-type-single">
145         <span class="title"></span>
146       <div class="jp-gui jp-interface">
147         <ul class="jp-controls">
148           <li><a href="javascript:;" class="jp-play" tabindex="1">play</a></li>
149           <li><a href="javascript:;" class="jp-pause" tabindex="1">pause</a></li>
150           <li><a href="javascript:;" class="jp-mute" tabindex="1" title="mute">mute</a></li>
151           <li><a href="javascript:;" class="jp-unmute" tabindex="1" title="unmute">unmute</a></li>
152         </ul>
153         <div class="jp-progress">
154           <div class="jp-seek-bar">
155             <div class="jp-play-bar"></div>
156           </div>
157         </div>
158         <div class="jp-volume-bar">
159           <div class="jp-volume-bar-value"></div>
160         </div>
161         <div class="jp-time-holder">
162           <div class="jp-current-time"></div>
163           <div class="jp-duration"></div>
164         </div>
165       </div>
166       <div class="jp-playlist">
167         <ul>
168
169         {% for i in audiobooks %}
170           <li data-mp3='{{ i.mp3.file.url }}' data-ogg='{{ i.ogg.file.url }}'>
171             <div class='play'>{{ i.mp3.name }}
172             <div class='extra-info'>
173               {% trans "Artist" %}: <span class='artist'>{{ i.mp3.extra_info.artist_name }}</span>,
174               {% trans "Director" %}: <span class='director'>{{ i.mp3.extra_info.director_name }}</span>
175             </div>
176             </div>
177           </li>
178         {% endfor %}
179
180         </ul>
181       </div>
182
183       <div class="jp-no-solution">
184         <span>Update Required</span>
185         To play the media you will need to either update your browser to a recent version or update your <a href="http://get.adobe.com/flashplayer/" target="_blank">Flash plugin</a>.
186       </div>
187     </div>
188   </div>
189 <div>
190 <a class="play-prev">« {% trans "previous" %}</a>
191 {% trans "Part" %} <span class="number">1</span> / {{ audiobooks|length }}
192 <a class="play-next">{% trans "next" %} »</a>
193 </div>
194 </div>
195
196
197 {% endif %}
198
199
200     <div class="clearboth"></div>
201 </div>
202 </div>
203 {% endspaceless %}