Django 1.8 and other updates.
[wolnelektury.git] / apps / catalogue / templates / catalogue / picture_detail.html
1 {% extends "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 {%comment%}                <div id='description-short'>{{ picture.info.description|safe|truncatewords_html:30 }}</div>{%endcomment%}
36             </div>
37             <div id="toggle-description"><p></p></div>
38         {% endif %}
39
40     </div>
41
42     <div id="tags-list">
43         <div id="book-info">
44             <h2>{% trans "Details" %}</h2>
45             <ul>
46                 <li>
47                     {% trans "Author" %}:
48                     {% for tag in categories.author %}
49                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
50                     {% endfor %}
51                 </li>
52                 <li>
53                     {% trans "Epoch" %}:
54                     {% for tag in categories.epoch %}
55                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
56                     {% endfor %}
57                 </li>
58                 <li>
59                     {% trans "Kind" %}:
60                     {% for tag in categories.kind %}
61                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
62                     {% endfor %}
63                 </li>
64             </ul>
65             <h2>{% trans "Other resources" %}</h2>
66             <ul>
67                 {% if picture.info.source_url %}
68                 <li><a href="{{ picture.info.source_url }}">{% trans "Source of the image" %}</a></li>
69                 {% endif %}
70                 {% if picture.info.about and not hide_about %}
71                 <li><a href="{{ picture.info.about }}">{% trans "Image on the Editor's Platform" %}</a></li>
72                 {% endif %}
73 {% comment %}
74                 {% if book.gazeta_link %}
75                 <li><a href="{{ book.gazeta_link }}">{% trans "Picture description on Lektury.Gazeta.pl" %}</a></li>
76                 {% endif %}
77                 {% if book.wiki_link %}
78                 <li><a href="{{ book.wiki_link }}">{% trans "Book description on Wikipedia" %}</a></li>
79                 {% endif %}
80 {% endcomment %}
81             </ul>
82             <p><a href="{{ picture.xml_file.url }}">{% trans "View XML source" %}</a></p>
83         </div>
84         <div id="themes-list">
85             <h2>{% trans "Work's themes " %}</h2>
86             <ul>
87             {% for theme in picture_themes %}
88                 <li><a href="{{ theme.get_absolute_url }}">{{ theme }} ({{ theme.count }})</a></li>
89             {% endfor %}
90             </ul>
91         </div>
92         <div class="clearboth"></div>
93     </div>
94 {% endblock %}