fixes
[wolnelektury.git] / src / catalogue / templates / catalogue / picture_detail.html
1 {% extends "base/base.html" %}
2 {% load i18n %}
3 {% load catalogue_tags pagination_tags %}
4 {% load thumbnail %}
5
6
7 {% block titleextra %}{{ picture.title }}{% endblock %}
8
9 {% block bodyid %}picture-detail{% endblock %}
10
11 {% block body %}
12   <h1>{{picture.title}}</h1>
13
14   <div id="books-list">
15     <div id='breadcrumbs'>
16       {% if categories.author %}
17         {% for tag in categories.author %}
18           <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
19         {% endfor %}
20         &#187;
21       {% endif %}
22     </div>
23
24     {% thumbnail picture.image_file "400x500" upscale="false" as im %}
25       <img style="margin:{{ im|margin:"500x500" }}" src="{{ im.url }}" width="{{ im.x }}" height="{{ im.y }}"/>
26     {% endthumbnail %}
27
28     {% if picture.info.license %}
29       <p>{% trans "Work is licensed under " %} <a href="{{ picture.info.license }}">{{ picture.info.license_description }}</a>.</p>
30     {% endif %}
31     <p>{% trans "Based on" %}: {{ picture.info.source_name }}</p>
32     {% if picture.info.description %}
33       <div id="description">
34         <div id='description-long'>{{ picture.info.description|safe }}</div>
35         {# <div id='description-short'>{{ picture.info.description|safe|truncatewords_html:30 }}</div> #}
36       </div>
37       <div id="toggle-description"><p></p></div>
38     {% endif %}
39   </div>
40
41   <div id="tags-list">
42     <div id="book-info">
43       <h2>{% trans "Details" %}</h2>
44       <ul>
45         <li>
46           {% trans "Author" %}:
47           {% for tag in categories.author %}
48             <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
49           {% endfor %}
50         </li>
51         <li>
52           {% trans "Epoch" %}:
53           {% for tag in categories.epoch %}
54             <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
55           {% endfor %}
56         </li>
57         <li>
58           {% trans "Kind" %}:
59           {% for tag in categories.kind %}
60             <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
61           {% endfor %}
62         </li>
63       </ul>
64       <h2>{% trans "Other resources" %}</h2>
65       <ul>
66         {% if picture.info.source_url %}
67           <li><a href="{{ picture.info.source_url }}">{% trans "Source of the image" %}</a></li>
68         {% endif %}
69         {% if picture.info.about and not hide_about %}
70           <li><a href="{{ picture.info.about }}">{% trans "Image on the Editor's Platform" %}</a></li>
71         {% endif %}
72       </ul>
73       <p><a href="{{ picture.xml_file.url }}">{% trans "View XML source" %}</a></p>
74     </div>
75     <div id="themes-list">
76       <h2>{% trans "Work's themes " %}</h2>
77       <ul>
78         {% for theme in picture_themes %}
79           <li><a href="{{ theme.get_absolute_url }}">{{ theme }} ({{ theme.count }})</a></li>
80         {% endfor %}
81       </ul>
82     </div>
83     <div class="clearboth"></div>
84   </div>
85 {% endblock %}
86
87
88 {% block extrabody %}
89   {% javascript "picture" %}
90 {% endblock %}