Merge branch 'pretty' of github.com:fnp/wolnelektury into pretty
[wolnelektury.git] / wolnelektury / 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 title %}{{ picture.title }} {% trans "on WolneLektury.pl" %}{% endblock %}
8
9 {% block bodyid %}picture-detail{% endblock %}
10
11 {% block body %}
12     <h1>{{picture.title}}</h1>
13     <form action="{% url search %}" method="get" accept-charset="utf-8" id="search-form">
14         <p>{{ form.q }} <input type="submit" value="{% trans "Search" %}" /> <strong>{% trans "or" %}</strong> <a href="{% url main_page %}">{% trans "return to main page" %}</a></p>
15     </form>
16
17     <div id="books-list">
18         <div id='breadcrumbs'>
19             {% if categories.author %}
20                 {% for tag in categories.author %}
21                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
22                 {% endfor %}
23                 &#187; 
24             {% endif %}
25         </div>
26
27         {% thumbnail picture.image_file "400x500" upscale="false" as im %}
28         <img style="margin:{{ im|margin:"400x500" }}" src="{{ im.url }}" width="{{ im.x }}" height="{{ im.y }}" />
29         {% endthumbnail %}
30
31         {% if picture.info.license %}
32         <p>{% trans "Work is licensed under " %} <a href="{{ picture.info.license }}">{{ picture.info.license_description }}</a>.</p>
33         {% endif %}
34         <p>{% trans "Based on" %}: {{ picture.info.source_name }}</p>
35         {% if picture.info.description %}
36             <div id="description">
37                 <div id='description-long'>{{ picture.info.description|safe }}</div>
38                 <div id='description-short'>{{ picture.info.description|safe|truncatewords_html:30 }}</div>
39             </div>
40             <div id="toggle-description"><p></p></div>
41         {% endif %}
42
43     </div>
44
45     <div id="tags-list">
46         <div id="book-info">
47             <h2>{% trans "Details" %}</h2>
48             <ul>
49                 <li>
50                     {% trans "Author" %}:
51                     {% for tag in categories.author %}
52                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
53                     {% endfor %}
54                 </li>
55                 <li>
56                     {% trans "Epoch" %}:
57                     {% for tag in categories.epoch %}
58                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
59                     {% endfor %}
60                 </li>
61                 <li>
62                     {% trans "Kind" %}:
63                     {% for tag in categories.kind %}
64                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
65                     {% endfor %}
66                 </li>
67             </ul>
68             <h2>{% trans "Other resources" %}</h2>
69             <ul>
70                 {% if picture.info.source_url %}
71                 <li><a href="{{ picture.info.source_url }}">{% trans "Source of the image" %}</a></li>
72                 {% endif %}
73                 {% if picture.info.about and not hide_about %}
74                 <li><a href="{{ picture.info.about }}">{% trans "Image on the Editor's Platform" %}</a></li>
75                 {% endif %}
76 {% comment %}
77                 {% if book.gazeta_link %}
78                 <li><a href="{{ book.gazeta_link }}">{% trans "Picture description on Lektury.Gazeta.pl" %}</a></li>
79                 {% endif %}
80                 {% if book.wiki_link %}
81                 <li><a href="{{ book.wiki_link }}">{% trans "Book description on Wikipedia" %}</a></li>
82                 {% endif %}
83 {% endcomment %}
84             </ul>
85             <p><a href="{{ picture.xml_file.url }}">{% trans "View XML source" %}</a></p>
86         </div>
87         <div id="themes-list">
88             <h2>{% trans "Work's themes " %}</h2>
89             <ul>
90             {% for theme in picture_themes %}
91                 <li><a href="{{ theme.get_absolute_url }}">{{ theme }} ({{ theme.count }})</a></li>
92             {% endfor %}
93             </ul>
94         </div>
95         <div class="clearboth"></div>
96     </div>
97     <div id="set-window">
98         <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
99         <div class="target">
100             <p><img src="{{ STATIC_URL }}img/indicator.gif" alt="*"/> {% trans "Loading" %}</p>
101         </div>
102     </div>
103 {% endblock %}