Add HotJar on few pages.
[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 {% load ssi_include from ssify %}
5
6 {% 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 %}
7
8
9 {% block extrahead %}
10 {{ block.super }}
11 {% if request.path == '/katalog/lektury/' or request.path == '/katalog/audiobooki/' %}
12 {% include "hotjar.html" %}
13 {% endif %}
14 {% endblock %}
15
16
17 {% block bodyid %}tagged-object-list{% endblock %}
18
19 {% block body %}
20   <div class="tabbed-filter">
21     <h1>{% if tags %}{% html_title_from_tags tags %}{% endif %}</h1>
22
23     <div class="tabs">
24       <a class="tab white-box" data-id="authors">{% trans "Authors" %}</a>
25       <a class="tab white-box" data-id="epochs">{% trans "Epochs" %}</a>
26       <a class="tab white-box" data-id="genres">{% trans "Genres" %}</a>
27       <a class="tab white-box" data-id="kinds">{% trans "Kinds" %}</a>
28       {% if theme_is_set %}
29         <a class="tab white-box" data-id="themes">{% trans "Themes" %}</a>
30       {% endif %}
31     </div>
32   </div>
33
34   <div class="tabbed-filter-contents">
35     <div id="authors" class="white-box normal-text tab-content">
36       {% inline_tag_list categories.author tags 'author' list_type=list_type %}
37     </div>
38     <div id="epochs" class="white-box normal-text tab-content">
39       {% inline_tag_list categories.epoch tags 'epoch' list_type=list_type %}
40     </div>
41     <div id="genres" class="white-box normal-text tab-content">
42       {% inline_tag_list categories.genre tags 'genre' list_type=list_type %}
43     </div>
44     <div id="kinds" class="white-box normal-text tab-content">
45       {% inline_tag_list categories.kind tags 'kind' list_type=list_type %}
46     </div>
47     {% if theme_is_set %}
48       <div id="themes" class="white-box normal-text tab-content">
49         {% inline_tag_list categories.theme tags 'theme' list_type=list_type %}
50       </div>
51     {% endif %}
52   </div>
53
54   {% comment %}
55   {% if list_type == 'books' and not tags %}
56     <section>
57       <h1>{% trans "Recent publications" %}</h1>
58       {% for book in last_published %}
59         {% ssi_include 'catalogue_book_mini' pk=book.pk %}
60       {% endfor %}
61       <a class="more" href="{% url 'recent_list' %}">{% trans "More recent publications" %}</a>
62     </section>
63     <section>
64       <h1>{% trans "Most popular books" %}</h1>
65       {% for book in most_popular %}
66         {% ssi_include 'catalogue_book_mini' pk=book.pk %}
67       {% endfor %}
68     </section>
69   {% endif %}
70   {% endcomment %}
71
72   {% if theme_is_set %}
73     {% work_list object_list %}
74   {% else %}
75     <div id="books-list">
76       {% if object_list %}
77         {% work_list best %}
78         {% if tags %}
79           <h2>{% trans "All matching works" %}</h2>
80         {% else %}
81           {% if list_type == 'audiobooks' %}
82             <h2>{% trans "Listing of all audiobooks" %}</h2>
83           {% else %}
84             <h2>{% trans "All works" %}</h2>
85           {% endif %}
86         {% endif %}
87         {% plain_list object_list by_author=True list_type=list_type %}
88         {% if daisy %}
89           <h2>{% trans "DAISY files" %}</h2>
90           {% plain_list daisy by_author=True %}
91         {% endif %}
92       {% else %}
93         {% trans "Sorry! Search cirteria did not match any resources." %}
94         {% include "info/join_us.html" %}
95       {% endif %}
96     </div>
97
98     {% if categories.theme and list_type != 'audiobooks' %}
99       <h2>{% trans "Motifs and themes" %}</h2>
100       {% plain_list categories.theme choice=tags list_type=list_type %}
101     {% endif %}
102   {% endif %}
103
104   {% for tag in tags %}
105     {% if tag.category != 'set' %}
106       <h2>{% trans tag.category as c %}{{ c|capfirst }}: {{ tag }}</h2>
107       <div class="white-box">
108         {% if tag.has_description %}
109           {{ tag.description|safe }}
110         {% else %}
111           <em>{% trans "No description." %}</em>
112         {% endif %}
113       </div>
114
115       {% if tag.wiki_link %}
116         <div class="white-box">
117         <a href="{{ tag.wiki_link }}">
118           {{ tag }} {% trans "in Wikipedia" %}
119         </a></div>
120       {% endif %}
121       {% if tag.culturepl_link %}
122         <div class="white-box">
123         <a href="{{ tag.culturepl_link }}">
124           {{ tag }} {% trans "in Culture.pl" %}
125         </a></div>
126       {% endif %}
127     {% endif %}
128   {% endfor %}
129 {% endblock %}