Uncrazy the caching, more.
[wolnelektury.git] / src / catalogue / templates / catalogue / tagged_object_list.html
1 {% extends "base/base.html" %}
2 {% load i18n %}
3 {% load catalogue_tags switch_tag social_tags %}
4
5 {% block titleextra %}{% if tags %}{% title_from_tags tags %}{% elif list_type == 'gallery' %}{% trans "Gallery" %}{% elif list_type == 'audiobooks' %}{% trans "Audiobooks" %}{% else %}{% trans "Literature" %}{% endif %}{% endblock %}
6
7
8 {% block extrahead %}
9 {{ block.super }}
10 {% if request.path == '/katalog/lektury/' or request.path == '/katalog/audiobooki/' %}
11 {% include "hotjar.html" %}
12 {% endif %}
13 {% endblock %}
14
15
16 {% block bodyid %}tagged-object-list{% endblock %}
17
18 {% block body %}
19   <div class="tabbed-filter">
20     <h1>{% if tags %}{% html_title_from_tags tags %}{% endif %}</h1>
21
22     <div class="tabs">
23       <a class="tab white-box" data-id="authors">{% trans "Authors" %}</a>
24       <a class="tab white-box" data-id="epochs">{% trans "Epochs" %}</a>
25       <a class="tab white-box" data-id="genres">{% trans "Genres" %}</a>
26       <a class="tab white-box" data-id="kinds">{% trans "Kinds" %}</a>
27       {% if theme_is_set %}
28         <a class="tab white-box" data-id="themes">{% trans "Themes" %}</a>
29       {% endif %}
30     </div>
31   </div>
32
33   <div class="tabbed-filter-contents">
34     <div id="authors" class="white-box normal-text tab-content">
35       {% inline_tag_list categories.author tags 'author' list_type=list_type %}
36     </div>
37     <div id="epochs" class="white-box normal-text tab-content">
38       {% inline_tag_list categories.epoch tags 'epoch' list_type=list_type %}
39     </div>
40     <div id="genres" class="white-box normal-text tab-content">
41       {% inline_tag_list categories.genre tags 'genre' list_type=list_type %}
42     </div>
43     <div id="kinds" class="white-box normal-text tab-content">
44       {% inline_tag_list categories.kind tags 'kind' list_type=list_type %}
45     </div>
46     {% if theme_is_set %}
47       <div id="themes" class="white-box normal-text tab-content">
48         {% inline_tag_list categories.theme tags 'theme' list_type=list_type %}
49       </div>
50     {% endif %}
51   </div>
52
53   {% if theme_is_set %}
54     {% work_list object_list %}
55   {% else %}
56     <div id="books-list">
57       {% if object_list %}
58         {% work_list best %}
59         {% if tags %}
60           <h2>{% trans "All matching works" %}</h2>
61         {% else %}
62           {% if list_type == 'audiobooks' %}
63             <h2>{% trans "Listing of all audiobooks" %}</h2>
64           {% else %}
65             <h2>{% trans "All works" %}</h2>
66           {% endif %}
67         {% endif %}
68         {% plain_list object_list by_author=True list_type=list_type %}
69         {% if daisy %}
70           <h2>{% trans "DAISY files" %}</h2>
71           {% plain_list daisy by_author=True %}
72         {% endif %}
73       {% else %}
74         {% trans "Sorry! Search cirteria did not match any resources." %}
75         {% include "info/join_us.html" %}
76       {% endif %}
77     </div>
78
79     {% if categories.theme and list_type != 'audiobooks' %}
80       <h2>{% trans "Motifs and themes" %}</h2>
81       {% plain_list categories.theme choice=tags list_type=list_type %}
82     {% endif %}
83   {% endif %}
84
85   {% for tag in tags %}
86     {% if tag.category != 'set' %}
87       <h2>{% trans tag.category as c %}{{ c|capfirst }}: {{ tag }}</h2>
88       <div class="white-box">
89         {% if tag.has_description %}
90           {{ tag.description|safe }}
91         {% else %}
92           <em>{% trans "No description." %}</em>
93         {% endif %}
94       </div>
95
96       {% if tag.wiki_link %}
97         <div class="white-box">
98         <a href="{{ tag.wiki_link }}">
99           {{ tag }} {% trans "in Wikipedia" %}
100         </a></div>
101       {% endif %}
102       {% if tag.culturepl_link %}
103         <div class="white-box">
104         <a href="{{ tag.culturepl_link }}">
105           {{ tag }} {% trans "in Culture.pl" %}
106         </a></div>
107       {% endif %}
108     {% endif %}
109   {% endfor %}
110 {% endblock %}