Merge branch 'pretty' of github.com:fnp/wolnelektury into pretty
[wolnelektury.git] / wolnelektury / templates / catalogue / tagged_object_list.html
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load catalogue_tags pagination_tags switch_tag %}
4
5 {% block titleextra %}{% title_from_tags tags %}{% endblock %}
6
7 {% block bodyid %}tagged-object-list{% endblock %}
8
9 {% block body %}
10     <div class="left-column">
11     <div class="page-desc">
12     <h1>{% title_from_tags tags %}</h1>
13
14     {% with tags|last as last_tag %}
15     {% if last_tag.has_description %}
16         <div id="description">
17             <div id='description-long'>{{ last_tag.description|safe }}</div>
18             <div id='description-short'>{{ last_tag.description|safe|truncatewords_html:30 }}</div>
19         </div>
20         <div class="clearboth"></div>
21         <div id="toggle-description"><p></p></div>
22     {% endif %}
23
24
25     <div class="inline-tag-lists">
26     {% if categories.author %}
27         <p><span class="mono">{% trans "Authors" %}:</span>
28         {% inline_tag_list categories.author tags %}
29         </p>
30     {% endif %}
31     {% if categories.kind %}
32         <p><span class="mono">{% trans "Kinds" %}:</span>
33         {% inline_tag_list categories.kind tags %}
34         </p>
35     {% endif %}
36     {% if categories.genre %}
37         <p><span class="mono">{% trans "Genres" %}:</span>
38         {% inline_tag_list categories.genre tags %}
39         </p>
40     {% endif %}
41     {% if categories.epoch %}
42         <p><span class="mono">{% trans "Epochs" %}:</span>
43         {% inline_tag_list categories.epoch tags %}
44         </p>
45     {% endif %}
46     </div>
47
48     {% if categories.theme %}
49         <div id="themes-list-wrapper">
50             <p><a href="#" id="themes-list-toggle" class="mono">{% trans "Motifs and themes" %}</a></p>
51             <div id="themes-list">
52                 {% tag_list categories.theme tags %}
53             </div>
54         </div>
55     {% endif %}
56
57     </div>
58     </div>
59
60
61     <div class="right-column">
62         <a href="" class="cite">
63             <div class="cite-body">
64             Dobranoc, obróć jeszcze raz na mnie oczęta,<br/>
65             (…) Daj mi pierś ucałować<br/>
66             Dobranoc, zapięta.
67             </div>
68             <p class="mono">Adam Mickiewicz, Dziady część III</p>
69         </a>
70
71         <div class="see-also">
72             <h2 class='mono'>{% trans "See also" %}:</h2>
73             <ul>
74                 <li><a href="">Wiki</a></li>
75                 <li><a href="">Gazeta</a></li>
76             </ul>
77         </div>
78
79         <div class="download">
80             <h2 class='mono'>{% trans "Download" %}:</h2>
81             <ul>
82                 <li><a href="">wszystko</a></li>
83                 <li><a href="">część</a></li>
84             </ul>
85         </div>
86
87     </div>
88
89     <div class="clearboth"></div>
90
91
92
93
94     {% autopaginate object_list 10 %}
95     <div id="books-list">
96
97
98         {% if last_tag.gazeta_link %}
99         <p><a href="{{ last_tag.gazeta_link }}">
100             {% switch last_tag.category %}
101                 {% case "author" %}
102                     {% trans "Read work's study of this author on Lektury.Gazeta.pl" %}
103                 {% case "epoch" %}
104                     {% blocktrans %}Read study of epoch {{ last_tag }} on Lektury.Gazeta.pl{% endblocktrans %}
105                 {% case "kind" %}
106                     {% blocktrans %}Read study of kind {{ last_tag }} on Lektury.Gazeta.pl{% endblocktrans %}
107                 {% case "genre" %}
108                     {% blocktrans %}Read study of genre {{ last_tag }} on Lektury.Gazeta.pl{% endblocktrans %}
109                 {% else %}
110                     {% trans "Read related study on Lektury.Gazeta.pl" %}
111             {% endswitch %}
112         </a></p>
113         {% endif %}
114         {% if last_tag.wiki_link %}
115         <p><a href="{{ last_tag.wiki_link }}">
116                 {% switch last_tag.category %}
117                             {% case "author" %}
118                                     {% trans "Read article about this author on Wikipedia" %}
119                                 {% case "epoch" %}
120                     {% blocktrans %}Read article about epoch {{ last_tag }} on Wikipedia{% endblocktrans %}
121                                 {% case "kind" %}
122                     {% blocktrans %}Read article about kind {{ last_tag }} on Wikipedia{% endblocktrans %}
123                                 {% case "genre" %}
124                     {% blocktrans %}Read article about genre {{ last_tag }} on Wikipedia{% endblocktrans %}
125                                 {% else %}
126                                     {% trans "Read related article on Wikipedia" %}
127                         {% endswitch %}
128         </a></p>
129         {% endif %}
130
131         {% if object_list %}
132             {% spaceless %}
133             <ol>
134             {% for book in object_list %}
135                 <li>
136                     {% if user_is_owner %}
137                         <a href="{% url remove_from_shelf last_tag.slug book.slug %}" class="remove-from-shelf">{% trans "Delete" %}</a>
138                     {% endif %}
139                     {{ book.short_html }}</li>
140             {% endfor %}
141             </ol>
142             {% endspaceless %}
143             {% paginate %}
144         {% else %}
145             {% trans "Sorry! Search cirteria did not match any resources." %}
146             {% include "info/join_us.html" %}
147         {% endif %}
148         {% endwith %}
149     </div>
150         {% if object_list %}
151         {% comment %} If we didn't find anything there will be nothing on the right side as well {% endcomment %}
152         {% endif %}
153 {% endblock %}