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