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