refactor tagged_object_list
[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
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 body %}
15
16 {% ssi_include 'catalogue_book_wide' pk=book.pk %}
17
18 {% work_list book_children %}
19
20 {% spaceless %}
21 {% if book.other_versions %}
22 <section class="see-also" style="display: inline-block;">
23 <h1>{% trans "Other versions" %}:</h1>
24 {% for rel in book.other_versions %}
25     {% ssi_include 'catalogue_book_mini' pk=rel.pk %}
26 {% endfor %}
27 </section>
28 {% endif %}
29
30 <section class="see-also" style="display: inline-block;">
31 <h2>{% trans "See also" %}:</h2>
32 {% related_books book taken=book.other_versions|length %}
33 </section>
34 {% endspaceless %}
35
36
37
38 {% with book.related_themes as themes %}
39 {% if themes %}
40     <h2>{% trans "Themes" %}</h2>
41     {% plain_list themes book=book %}
42 {% endif %}
43 {% endwith %}
44
45
46
47 <h2>{% trans "Information about the work" %}</h2>
48 {% for tag in tags %}
49         <div class="white-box">
50             <a style="display:block" href="{{ tag.get_absolute_url }}">
51         {% ssi_include 'catalogue_tag_box' pk=tag.pk %}
52         </a>
53         </div>
54 {% endfor %}
55
56
57       {% if extra_info.source_url %}
58       <div class="white-box"><a href="{{ extra_info.source_url }}">{% trans "Source" %}</a> {% trans "of the book" %}
59       {% trans "in" %} {% source_name extra_info.source_url %}</div>
60       {% endif %}
61       <div class="white-box"><a href="{{ book.xml_file.url }}">{% trans "Source XML file" %}</a></div>
62       {% if extra_info.about and not hide_about %}
63       <div class="white-box">{% trans "Book on" %} <a href="{{ extra_info.about }}">{% trans "Editor's Platform" %}</a></div>
64       {% endif %}
65       {% if book.gazeta_link %}
66       <div class="white-box"><a href="{{ book.gazeta_link }}">{% trans "Book description on Lektury.Gazeta.pl" %}</a></div>
67       {% endif %}
68       {% if book.wiki_link %}
69       <div class="white-box"><a href="{{ book.wiki_link }}">{% trans "Book description on Wikipedia" %}</a></div>
70       {% endif %}
71       <div class="white-box"><a href="{% url 'poem_from_book' book.slug %}">{% trans "Mix this book" %}</a></div>
72
73
74
75
76 {% endblock %}