change in multilingual
[wolnelektury.git] / wolnelektury / templates / catalogue / book_detail.html
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load catalogue_tags pagination_tags %}
4
5 {% block titleextra %}{{ book.title }}{% endblock %}
6
7 {% block metadescription %}{% book_title book %}. {{ block.super }}{% endblock %}
8
9 {% block bodyid %}book-detail{% endblock %}
10
11 {% block body %}
12     <h1>{% book_title book %}</h1>
13
14     <div id="books-list">
15         <div id='breadcrumbs'>
16             {% if categories.author %}
17                 {% for tag in categories.author %}
18                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
19                 {% endfor %}
20                 &#187; 
21             {% endif %}
22             {% for parent in parents %}
23                 <a href="{{ parent.get_absolute_url }}">{{ parent }}</a> &#187; 
24             {% endfor %}
25         </div>
26
27         {% if extra_info.license %}
28         <p>{% trans "Work is licensed under " %} <a href="{{ extra_info.license }}">{{ extra_info.license_description }}</a>.</p>
29         {% endif %}
30         <p>{% trans "Based on" %}: {{ extra_info.source_name }}</p>
31         {% if book.has_description %}
32             <div id="description">
33                 <div id='description-long'>{{ book.description|safe }}</div>
34                 <div id='description-short'>{{ book.description|safe|truncatewords_html:30 }}</div>
35             </div>
36             <div id="toggle-description"><p></p></div>
37         {% endif %}
38         <div id="formats">
39             <p class="change-sets">{% trans "Put a book" %} <span><a href="{% url catalogue.views.book_sets book.slug %}" class="jqm-trigger">{% trans "on the shelf!" %}</a></span></p>
40             <div class="clearboth"></div>
41             <div class="wrap">
42                 {% if book.has_html_file %}
43                     <a class="online" href="{% url book_text book.slug %}">{% trans "Read online" %}</a>
44                 {% endif %}
45                 <div class="download">
46                     {% if book.pdf_file %}
47                         <a href="{{ book.pdf_file.url }}"><img src="{{ STATIC_URL }}img/pdf.png" title="{% trans "Download PDF" %} &ndash; {% trans "for reading" %} {% trans "and printing using" %} Adobe Reader" %}" alt="{% trans "Download PDF" %}" /></a>
48                     {% endif %}
49                     {% if book.epub_file %}
50                         <a href="{{ book.epub_file.url }}"><img src="{{ STATIC_URL }}img/epub.png" title="{% trans "Download EPUB" %} &ndash; {% trans "for reading" %} {% trans "on mobile devices" %}" alt="{% trans "Download EPUB" %}" /></a>
51                     {% endif %}
52                     {% if book.mobi_file %}
53                         <a href="{{ book.mobi_file.url }}"><img src="{{ STATIC_URL }}img/mobi.png" title="{% trans "Download MOBI" %} &ndash; {% trans "for reading" %} {% trans "on mobile devices" %}" alt="{% trans "Download MOBI" %}" /></a>
54                     {% endif %}
55                     {% if book.txt_file %}
56                         <a href="{{ book.txt_file.url }}"><img src="{{ STATIC_URL }}img/txt.png" title="{% trans "Download TXT" %} &ndash; {% trans "for reading" %} {% trans "on small displays, for example mobile phones" %}" alt="{% trans "Download TXT" %}" /></a>
57                     {% endif %}
58                         
59                     {% if book.pdf_file %}
60                         <br/><a href="#" id="custom-pdf-link">{% trans "Dowload customized PDF" %}</a>.
61                     {% endif %}
62                         <div style="display: none" class="custom-pdf">
63                           <form action="{% url catalogue.views.download_custom_pdf book.slug %}" method="GET">
64                             {{custom_pdf_form.as_p}}
65                             <input type="submit" value="{% trans "Download" %}"/>
66                           </form>
67                         </div>
68                 </div>
69             </div>
70         </div>
71
72         {% if book_children %}
73         {% autopaginate book_children 10 %}
74         <div id="book-children">
75             <ol>
76             {% for book in book_children %}
77                 <li>{{ book.short_html }}</li>
78             {% endfor %}
79             </ol>
80         </div>
81         {% paginate %}
82         {% endif %}
83
84     </div>
85
86     <div id="tags-list">
87         <div id="book-info">
88             <h2>{% trans "Details" %}</h2>
89             <ul>
90                 <li>
91                     {% trans "Author" %}:
92                     {% for tag in categories.author %}
93                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
94                     {% endfor %}
95                 </li>
96                 <li>
97                     {% trans "Epoch" %}:
98                     {% for tag in categories.epoch %}
99                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
100                     {% endfor %}
101                 </li>
102                 <li>
103                     {% trans "Kind" %}:
104                     {% for tag in categories.kind %}
105                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
106                     {% endfor %}
107                 </li>
108                 <li>
109                     {% trans "Genre" %}:
110                     {% for tag in categories.genre %}
111                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
112                     {% endfor %}
113                 </li>              
114             </ul>
115             <h2>{% trans "Other resources" %}</h2>
116             <ul>
117                 {% if extra_info.source_url %}
118                 <li><a href="{{ extra_info.source_url }}">{% trans "Source of the book" %}</a></li>
119                 {% endif %}
120                 {% if extra_info.about and not hide_about %}
121                 <li><a href="{{ extra_info.about }}">{% trans "Book on the Editor's Platform" %}</a></li>
122                 {% endif %}
123                 {% if book.gazeta_link %}
124                 <li><a href="{{ book.gazeta_link }}">{% trans "Book description on Lektury.Gazeta.pl" %}</a></li>
125                 {% endif %}
126                 {% if book.wiki_link %}
127                 <li><a href="{{ book.wiki_link }}">{% trans "Book description on Wikipedia" %}</a></li>
128                 {% endif %}
129             </ul>
130             <p><a href="{{ book.xml_file.url }}">{% trans "View XML source" %}</a></p>
131             <p><a href="{% url poem_from_book book.slug %}">Miksuj ten utwór</a></p>
132         </div>
133         <div id="themes-list">
134             <h2>{% trans "Work's themes " %}</h2>
135             <ul>
136             {% for theme in book_themes %}
137                 <li><a href="{% url book_fragments book.slug theme.slug %}">{{ theme }} ({{ theme.count }})</a></li>
138             {% endfor %}
139             </ul>
140         </div>
141         <div class="clearboth"></div>
142     </div>
143 {% endblock %}