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