Django 2.2
[wolnelektury.git] / src / catalogue / templates / catalogue / book_detail.html
1 {% extends "base/base.html" %}
2 {% load i18n %}
3 {% load catalogue_tags %}
4 {% load build_absolute_uri from fnp_common %}
5 {% load cache %}
6
7 {% block titleextra %}{{ book.pretty_title }}{% endblock %}
8 {% block ogimage %}{% if book.cover %}{{ book.cover.url|build_absolute_uri:request }}{% endif %}{% endblock %}
9
10 {% block metadescription %}{% book_title book %}. {{ block.super }}{% endblock %}
11
12 {% block bodyid %}book-detail{% endblock %}
13
14 {% block extrahead %}
15 {{ block.super }}
16 {% if request.path == '/katalog/lektura/pan-tadeusz/' %}
17 {% include "hotjar.html" %}
18 {% endif %}
19 {% endblock %}
20
21
22 {% block body %}
23   {% include 'catalogue/book_wide.html' %}
24
25   {% work_list book_children %}
26
27   {% spaceless %}
28     {% if book.other_versions %}
29       <section class="see-also">
30         <h1>{% trans "Other versions" %}:</h1>
31         {% for rel in book.other_versions %}
32           {{ rel.mini_box }}
33         {% endfor %}
34       </section>
35     {% endif %}
36
37     <section class="see-also">
38       <h2>{% trans "See also" %}:</h2>
39       {% related_books book taken=book.other_versions|length %}
40     </section>
41   {% endspaceless %}
42
43   {% with book.related_themes as themes %}
44     {% if themes %}
45       <h2>{% trans "Themes" %}</h2>
46       {% plain_list themes book=book %}
47     {% endif %}
48   {% endwith %}
49
50
51   <h2>{% trans "Information about the work" %}</h2>
52   {% for author in book.authors %}
53     <div class="white-box">
54       <a style="display:block" href="{{ author.get_absolute_url }}">
55         {% cache 86400 catalogue_tag_box author.pk %}
56           {% include 'catalogue/tag_box.html' with tag=author %}
57         {% endcache %}
58       </a>
59     </div>
60   {% endfor %}
61
62
63   {% if extra_info.source_url %}
64     <div class="white-box">
65       <a href="{{ extra_info.source_url }}">{% trans "Source" %}</a> {% trans "of the book" %}
66       {% trans "in" %} {% source_name extra_info.source_url %}
67     </div>
68   {% endif %}
69   {% if book|status:user != 'closed' %}
70     <div class="white-box"><a href="{{ book.xml_url }}">{% trans "Source XML file" %}</a></div>
71   {% endif %}
72   {% if extra_info.about and not hide_about %}
73     <div class="white-box">
74       {% trans "Book on" %} <a href="{{ extra_info.about }}">{% trans "Editor's Platform" %}</a>
75     </div>
76   {% endif %}
77   {% if book.wiki_link %}
78     <div class="white-box">
79       <a href="{{ book.wiki_link }}">{% trans "Book description on Wikipedia" %}</a>
80     </div>
81   {% endif %}
82   <div class="white-box">
83     <a href="{% url 'poem_from_book' book.slug %}">{% trans "Mix this book" %}</a>
84   </div>
85
86 {% endblock %}