Locatizations.
[wolnelektury.git] / src / catalogue / templates / catalogue / author_detail.html
1 {% extends 'base.html' %}
2 {% load i18n %}
3 {% load catalogue_tags %}
4
5 {% load choose_cites from social_tags %}
6
7
8 {% block breadcrumbs %}
9   <a href="/katalog/"><span>{% trans "Katalog" %}</span></a>
10   {% if tags %}
11     <a href="{{ main_tag.get_absolute_catalogue_url }}"><span>{{ main_tag.get_category_display|title }}</span></a>
12   {% endif %}
13 {% endblock %}
14
15 {% block main %}
16   <div class="l-section">
17     <div class="l-author__header">
18       {% if main_tag.photo %}
19         <figure>
20           <img src="{{ main_tag.photo.url }}" alt="{{ main_tag.name }}">
21         </figure>
22       {% endif %}
23       <h1>
24         {% if main_tag %}
25           {{ main_tag.name }}
26         {% else %}
27           {{ title }}
28         {% endif %}
29       </h1>
30     </div>
31   </div>
32
33   <div class="l-section">
34     <div class="l-books__header">
35       <div class="l-books__input">
36         <i class="icon icon-filter"></i>
37         <input type="text" placeholder="{% trans 'filtry, tytuł' %}" class="quick-filter" data-for="book-list" data-filters="with-filter">
38         <div class="filter-container">
39           {% for tag in tags %}
40             {% if tag is not main_tag %}
41               <span class="filter filter-category-{{ tag.category }}">
42                 <a href="{% catalogue_url list_type tag %}">{{ tag }}</a>
43                 <a href="{% catalogue_url list_type tags -tag %}">✖</a>
44               </span>
45             {% endif %}
46           {% endfor %}
47         </div>
48
49       </div>
50       <div class="l-books__sorting">
51         <span>{% trans "Sortuj:" %}</span>
52         <div>
53           <button data-order="data-pop">{% trans "najpopularniejsze" %}</button>
54           <button class="is-active">{% trans "alfabetycznie" %}</button>
55           <!--button>chronologicznie</button-->
56         </div>
57       </div>
58     </div>
59   </div>
60   <div class="with-filter">
61
62     <div class="row">
63       <h2>{% nice_title_from_tags tags categories %}</h2>
64       {% if suggest %}
65         <div class="filter-container">
66           {% for tag in suggest %}
67             <span class="filter filter-category-{{ tag.category }}">
68               <a href="{% catalogue_url list_type tags tag %}">{{ tag }}</a>
69             </span>
70           {% endfor %}
71         </div>
72       {% endif %}
73     </div>
74   </div>
75
76   <div class="l-section l-section--col">
77     <div class="l-books__grid" id="book-list">
78       {% for book in object_list %}
79         {% include "catalogue/book_box.html" %}
80       {% endfor %}
81     </div>
82   </div>
83
84   {% if tags %}
85     <section class="l-section">
86       <div class="l-author">
87         {% with tag=main_tag %}
88           {% include 'catalogue/author_box.html' %}
89         {% endwith %}
90         {% choose_cites 3 author=main_tag as cites %}
91         {% if cites %}
92           <div class="row">
93             <div class="l-author__quotes">
94               <div class="l-author__quotes__slider">
95
96                 {% for fragment in cites %}
97                   <div class="l-author__quotes__slider__item">
98                     {% include "catalogue/fragment_slider_box.html" %}
99                   </div>
100                 {% endfor %}
101
102               </div>
103             </div>
104           </div>
105         {% endif %}
106       </div>
107     </section>
108     {% endif %}
109 {% endblock %}