cb5dee0d98eeb3344dc37b3441af6fe5333929c4
[wolnelektury.git] / wolnelektury / templates / catalogue / book_detail.html
1 {% extends "base.html" %}
2 {% load i18n %}
3 {% load catalogue_tags pagination_tags %}
4
5 {% block title %}{{ book.title }} {% trans "on WolneLektury.pl" %}{% endblock %}
6
7 {% block bodyid %}book-detail{% endblock %}
8
9 {% block body %}
10     <h1>{% book_title book %}</h1>
11     <form action="{% url search %}" method="get" accept-charset="utf-8" id="search-form">
12         <p>{{ form.q }} <input type="submit" value="{% trans "Search" %}" /> <strong>{% trans "or" %}</strong> <a href="{% url main_page %}">{% trans "return to main page" %}</a></p>
13     </form>
14
15     <div id="books-list">
16         {% if parents %}
17             <div id='breadcrumbs'>
18                 {% for parent in parents %}
19                     <a href="{{ parent.get_absolute_url }}">{{ parent }}</a>
20                     {% if not forloop.last %}&#187;{% endif %}
21                 {% endfor %}
22             </div>
23         {% endif %}
24
25         {% if extra_info.license %}
26         <p>{% trans "Work is licensed under " %} <a href="{{ extra_info.license }}">{{ extra_info.license_description }}</a>.</p>
27         {% endif %}
28         <p>{% trans "Based on" %}: {{ extra_info.source_name }}</p>
29         {% if book.has_description %}
30             <div id="description">
31                 <div id='description-long'>{{ book.description|safe }}</div>
32                 <div id='description-short'>{{ book.description|safe|truncatewords_html:30 }}</div>
33             </div>
34             <div id="toggle-description"><p></p></div>
35         {% endif %}
36         <div id="formats">
37             <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>
38             <div class="clearboth"></div>
39             <div class="wrap">
40             {% if book.html_file %}
41                 <a href="{% url book_text book.slug %}">{% trans "Read online" %}</a>
42             {% endif %}
43             {% if book.pdf_file %}
44                 <a href="{{ book.pdf_file.url }}">{% trans "Download PDF" %}</a>
45             {% endif %}
46             {% if book.epub_file %}
47                 <a href="{{ book.epub_file.url }}">{% trans "Download EPUB" %}</a>
48             {% endif %}
49             {% if book.odt_file %}
50                 <a href="{{ book.odt_file.url }}">{% trans "Download ODT" %}</a>
51             {% endif %}
52             {% if book.txt_file %}
53                 <a href="{{ book.txt_file.url }}">{% trans "Download TXT" %}</a>
54             {% endif %}
55             {% if book.mp3_file %}
56                 <div id="czytamy-sluchajac-info">
57                     <a href="http://czytamysluchajac.pl/" id="czytamysluchajac-logo"><img src="{{ STATIC_URL }}img/czytamysluchajac-logo-small.png" /></a>
58                     <p>{% trans "Artist" %}: {{ book.get_extra_info_value.artist_name }}</p>
59                                         {% if book.get_extra_info_value.director_name %}
60                         <p>{% trans "Director" %}: {{ book.get_extra_info_value.director_name }}</p>
61                                         {% endif %}
62                 </div>
63             {% endif %}
64             {% if book.mp3_file %}<a href="{{ book.mp3_file.url }}">{% trans "Download MP3" %}</a>{% endif %}
65             {% if book.ogg_file %}<a href="{{ book.ogg_file.url }}">{% trans "Download Ogg Vorbis" %}</a>{% endif %}
66             {% if book.mp3_file %}
67             <object type="application/x-shockwave-flash" style="margin-top: 0.5em" data="{{ STATIC_URL }}player.swf" width="426" height="20">
68                 <param name="movie" value="{{ STATIC_URL }}player.swf" />
69                 <param name="bgcolor" value="#ffffff" />
70                 <param name="FlashVars" value="mp3={{ book.mp3_file.url }}&amp;width=426&amp;showvolume=1&amp;bgcolor1=eeeeee&amp;bgcolor2=eeeeee&amp;buttoncolor=666666" />
71             </object>
72             {% endif %}
73             </div>
74         </div>
75
76         {% if book_children %}
77         {% autopaginate book_children 10 %}
78         <div id="book-children">
79             <ol>
80             {% for book in book_children %}
81                 <li>{{ book.short_html }}</li>
82             {% endfor %}
83             </ol>
84         </div>
85         {% paginate %}
86         {% endif %}
87
88     </div>
89
90     <div id="tags-list">
91         <div id="book-info">
92             <h2>{% trans "Details" %}</h2>
93             <ul>
94                 <li>
95                         
96                     {% trans "Author" %}:
97                     {% for tag in categories.author %}
98                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
99                     {% endfor %}
100                 </li>
101                 <li>
102                     {% trans "Epoch" %}:
103                     {% for tag in categories.epoch %}
104                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
105                     {% endfor %}
106                 </li>
107                 <li>
108                     {% trans "Kind" %}:
109                     {% for tag in categories.kind %}
110                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
111                     {% endfor %}
112                 </li>
113                 <li>
114                     {% trans "Genre" %}:
115                     {% for tag in categories.genre %}
116                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>{% if not forloop.last %}, {% endif %}
117                     {% endfor %}
118                 </li>
119             </ul>
120             <h2>{% trans "Other resources" %}</h2>
121             <ul>
122                 <li><a href="{{ extra_info.about }}">{% trans "Book on project's wiki" %}</a></li>
123                 <li><a href="{{ extra_info.source_url }}">{% trans "Source of the book" %}</a></li>
124                 {% if book.gazeta_link %}
125                 <li><a href="{{ book.gazeta_link }}">{% trans "Book description on Lektury.Gazeta.pl" %}</a></li>
126                 {% endif %}
127                 {% if book.wiki_link %}
128                 <li><a href="{{ book.wiki_link }}">{% trans "Book description on Wikipedia" %}</a></li>
129                 {% endif %}
130             </ul>
131         </div>
132         <div id="themes-list">
133             <h2>{% trans "Work's themes " %}</h2>
134             <ul>
135             {% for theme in book_themes %}
136                 <li><a href="{% url book_fragments book.slug,theme.slug %}">{{ theme }} ({{ theme.count }})</a></li>
137             {% endfor %}
138             </ul>
139         </div>
140         <div class="clearboth"></div>
141     </div>
142     <div id="set-window">
143         <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
144         <div class="target">
145             <p><img src="{{ STATIC_URL }}img/indicator.gif" alt="*"/> {% trans "Loading" %}</p>
146         </div>
147     </div>
148 {% endblock %}