clean dev
[wolnelektury.git] / src / catalogue / templates / catalogue / tagged_object_list.html
1 {% extends "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 {% 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 {% comment %}
46 {% if list_type == 'books' and not tags %}
47     <section>
48         <h1>{% trans "Recent publications" %}</h1>
49         {% for book in last_published %}
50             {% ssi_include 'catalogue_book_mini' pk=book.pk %}
51         {% endfor %}
52         <a class="more" href="{% url 'recent_list' %}">{% trans "More recent publications" %}</a>
53     </section>
54     <section>
55         <h1>{% trans "Most popular books" %}</h1>
56         {% for book in most_popular %}
57             {% ssi_include 'catalogue_book_mini' pk=book.pk %}
58         {% endfor %}
59     </section>
60 {% endif %}
61 {% endcomment %}
62
63 {% if theme_is_set %}
64     {% work_list object_list %}
65 {% else %}
66     <div id="books-list">
67         {% if object_list %}
68             {% work_list best %}
69             {% if tags %}
70                 <h2>{% trans "All matching works" %}</h2>
71             {% else %}
72                 {% if list_type == 'audiobooks' %}
73                     <h2>{% trans "Listing of all audiobooks" %}</h2>
74                 {% else %}
75                     <h2>{% trans "All works" %}</h2>
76                  {% endif %}
77             {% endif %}
78             {% plain_list object_list by_author=True list_type=list_type %}
79             {% if daisy %}
80                 <h2>{% trans "DAISY files" %}</h2>
81                 {% plain_list daisy by_author=True %}
82             {% endif %}
83         {% else %}
84             {% trans "Sorry! Search cirteria did not match any resources." %}
85             {% include "info/join_us.html" %}
86         {% endif %}
87     </div>
88
89     {% if categories.theme and list_type != 'audiobooks' %}
90         <h2>{% trans "Motifs and themes" %}</h2>
91         {% plain_list categories.theme choice=tags list_type=list_type %}
92     {% endif %}
93
94 {% endif %}
95
96 {% for tag in tags %}
97     {% if tag.category != 'set' %}
98         <h2>{% trans tag.category as c %}{{ c|capfirst }}: {{ tag }}</h2>
99         <div class="white-box">
100             {% if tag.has_description %}
101                 {{ tag.description|safe }}
102             {% else %}
103                 <em>{% trans "No description." %}</em>
104             {% endif %}
105         </div>
106
107         {% if tag.gazeta_link %}
108             <div class="white-box"><a href="{{ tag.gazeta_link }}">
109                 {{ tag }} {% trans "in Lektury.Gazeta.pl" %}
110             </a></div>
111         {% endif %}
112         {% if tag.wiki_link %}
113             <div class="white-box">
114             <a href="{{ tag.wiki_link }}">
115                 {{ tag }} {% trans "in Wikipedia" %}
116             </a></div>
117         {% endif %}
118         {% if tag.culturepl_link %}
119             <div class="white-box">
120             <a href="{{ tag.culturepl_link }}">
121                 {{ tag }} {% trans "in Culture.pl" %}
122             </a></div>
123         {% endif %}
124     {% endif %}
125 {% endfor %}
126
127 {% endblock %}