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