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