a065d4b5a07c31fd9d5c1ffbf34f92b04bc76c0a
[wolnelektury.git] / src / picture / templates / picture / picture_short.html
1 {% load i18n %}
2 {% load thumbnail %}
3 {% load catalogue_tags social_tags %}
4 {% load picture_tags %}
5
6 <div class="{% block box-class %}book-box{% endblock %} picture">
7   <div class="book-box-inner">
8     <div class="book-box-body">
9       {% with picture.get_absolute_url as main_link %}
10       {% with picture.tags_by_category as tags %}
11         <div class="book-box-head">
12             <div class="author">
13                 {% for tag in tags.author %}
14                     <a href="{{ tag.get_absolute_gallery_url }}">{{ tag }}</a>{% if not forloop.last %},
15                 {% endif %}{% endfor %}
16             </div>
17             <div class="title">
18                 {% if main_link %}<a href="{{ main_link }}">{% endif %}
19                     {{ picture.title }}
20                 {% if main_link %}</a>{% endif %}
21             </div>
22         </div>
23
24         <div class="cover-area">
25           {% block picture-view %}
26           {% if main_link %}<a href="{{ main_link }}">{% endif %}
27             {% thumbnail picture.image_file "216x288" crop="center" as thumb %}
28             <img class="cover" src="{{thumb.url}}"/>
29             {% endthumbnail %}
30           {% if main_link %}</a>{% endif %}
31           {% endblock %}
32            {# what about licensing icons here #}
33         </div>
34
35         <div class="tags">
36           {% spaceless %}
37             <span class="category">
38               <span class="mono"> {% trans "Epoch" %}:</span>&nbsp;<span class="book-box-tag">
39                 {% for tag in tags.epoch %}
40                   <a href="{{ tag.get_absolute_gallery_url }}">{{ tag }}</a>
41                   {% if not forloop.last %}<span>, </span>{% endif %}
42                 {% endfor %}
43               </span>
44             </span>
45
46             <span class="category">
47               <span class="mono"> {% trans "Kind" %}:</span>&nbsp;<span class="book-box-tag">
48                 {% for tag in tags.kind %}
49                   <a href="{{ tag.get_absolute_gallery_url }}">{{ tag }}</a>
50                   {% if not forloop.last %}<span>, </span>{% endif %}
51                 {% endfor %}
52               </span>
53             </span>
54
55             <span class="category">
56               <span class="mono"> {% trans "Genre" %}:</span>&nbsp;<span class="book-box-tag">
57                 {% for tag in tags.genre %}
58                   <a href="{{ tag.get_absolute_gallery_url }}">{{ tag }}</a>
59                   {% if not forloop.last %}<span>, </span>{% endif %}
60                 {% endfor %}
61               </span>
62             </span>
63
64             {% block extra_categories %}
65             {% endblock %}
66           {% endspaceless %}
67         </div>
68       {% endwith %}
69       {% endwith %}
70     </div>
71     <ul class="book-box-tools">
72       <li class="book-box-read">
73         <a href="{% url 'picture_viewer' picture.slug %}" class="downarrow">{% trans "View online" %}</a>
74       </li>
75       <li class="book-box-download">
76         <a href="{{picture.image_file.url}}" class="downarrow">{% trans "download original" %}</a>
77       </li>
78     </ul>
79     {% block book-box-extra-info %}{% endblock %}
80     {% block box-append %}{% endblock %}
81     {% block right-column %}{% endblock %}
82     <div class="clearboth"></div>
83   </div>
84 </div>