Merge branch 'pretty' of github.com:fnp/wolnelektury into pretty
[wolnelektury.git] / wolnelektury / templates / catalogue / book_short.html
1 {% load i18n %}
2 {% load thumbnail %}
3 <div class="{% block box-class %}book-box{% endblock %}">
4 <div class="book-box-inner">
5     <a href="{{ book.get_absolute_url }}">
6         {% if book.cover %}
7             <img src="
8                 {% thumbnail book.cover "216x288" as thumb %}
9                     {{ thumb.url }}
10                 {% empty %}
11                     {{ book.cover.url }}
12                 {% endthumbnail %}
13             " alt="Cover" />
14         {% endif %}
15     </a>
16     {% block right-column %}
17     {% endblock %}
18     <div class="book-box-body">
19         <div class="book-box-head">
20             <div class="mono author">
21             {% for author in tags.author %}
22                 {{ author }}
23             {% endfor %}
24             </div>
25             <div class="title">{{ book.title }}</div>
26         </div>
27         <div class="tags">
28             {% spaceless %}
29
30             <span class="mono">{% trans "Epoch" %}:</span>&nbsp;<span class="book-box-tag">
31                 {% for tag in tags.epoch %}
32                     <a href="{{ tag.get_absolute_url }}">{{ tag.name }} </a>
33                 {% endfor %}
34             </span>
35
36             <span class="mono">{% trans "Kind" %}:</span>&nbsp;<span class="book-box-tag">
37                 {% for tag in tags.kind %}
38                     <a href="{{ tag.get_absolute_url }}">{{ tag.name }} </a>
39                 {% endfor %}
40             </span>
41
42             <span class="mono">{% trans "Genre" %}:</span>&nbsp;<span class="book-box-tag">
43                 {% for tag in tags.genre %}
44                     <a href="{{ tag.get_absolute_url }}">{{ tag.name }} </a>
45                 {% endfor %}
46             </span>
47
48             {% endspaceless %}
49         </div>
50     </div>
51     <ul class="book-box-tools">
52         <li class="book-box-read">
53         {% if book.html_file %}
54             <a href="{% url book_text book.slug %}" class="mono downarrow">{% trans "Read online" %}</a>
55         {% endif %}
56         </li>
57         <li class="book-box-download">
58             <a class="mono downarrow">{% trans "Download" %}</a>
59             <div class="book-box-formats mono">
60               {% if formats.pdf %}
61               <span><a href="{{formats.pdf.url}}">PDF</a> do wydruku</span>
62               {% endif %}
63               {% if formats.epub %}
64               <span><a href="{{formats.epub.url}}">EPUB</a> na czytnik</span>
65               {% endif %}
66               {% if formats.mobi %}
67               <span><a href="{{formats.mobi.url}}">MOBI</a> na Kindle</span>
68               {% endif %}
69               {% if formats.txt %}
70               <span><a href="{{formats.txt.url}}">TXT</a> do zadaƄ specjalnych</span>
71               {% endif %}
72             </div>
73         </li>
74         <li class="book-box-audiobook">
75         {% if book.has_mp3_file %}
76             <a href="{% url book_player book.slug %}" class="open-player mono downarrow">{% trans "Listen" %}</a>
77         {% endif %}
78         </li>
79     </ul>
80     {% block box-append %}
81     {% endblock %}
82 </div>
83 </div>