Fixed admin template bug: load before extends.
[wolnelektury.git] / wolnelektury / templates / catalogue / book_detail.html
1 {% load i18n %}
2 {% extends "base.html" %}
3 {% load catalogue_tags pagination_tags %}
4
5 {% block title %}{{ book.title }} w WolneLektury.pl{% endblock %}
6
7 {% block bodyid %}book-detail{% endblock %}
8
9 {% block body %}
10     <h1>{{ book.title }}, {{ categories.author|join:", " }}</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 homepage" %}</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                 {{ book.description|safe }}
23             </div>
24             <div id="toggle-description"><p>{% trans "Toggle description" %} ▲</p></div>
25         {% endif %}
26         <div id="formats">
27             <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>
28             <div class="clearboth"></div>
29             <div class="wrap">
30             {% if book.html_file %}
31                 <a href="{% url book_text book.slug %}">{% trans "Read online" %}</a>
32             {% endif %}
33             {% if book.pdf_file %}
34                 <a href="{{ book.pdf_file.url }}">{% trans "Download PDF" %}</a>
35             {% endif %}
36             {% if book.odt_file %}
37                 <a href="{{ book.odt_file.url }}">{% trans "Download ODT %}</a>
38             {% endif %}
39             {% if book.txt_file %}
40                 <a href="{{ book.txt_file.url }}">{% trans "Download TXT %}</a>
41             {% endif %}
42             {% if book.mp3_file %}
43                 <div id="czytamy-sluchajac-info">
44                     <a href="http://czytamysluchajac.pl/" id="czytamysluchajac-logo"><img src="/static/img/czytamysluchajac-logo-small.png" /></a>     
45                     <p>{% trans "Artist" %}: {{ book.get_extra_info_value.artist_name }}</p>
46                     <p>{% trans "Director" %}: {{ book.get_extra_info_value.director_name }}</p>
47                 </div>
48             {% endif %}
49             {% if book.mp3_file %}<a href="{{ book.mp3_file.url }}">{% trans "Download MP3" %}</a>{% endif %}
50             {% if book.ogg_file %}<a href="{{ book.ogg_file.url }}">{% trans "Download Ogg Vorbis" %}</a>{% endif %}
51             {% if book.mp3_file %}
52             <object type="application/x-shockwave-flash" style="margin-top: 0.5em" data="/static/player.swf" width="426" height="20">
53                 <param name="movie" value="/static/player.swf" />
54                 <param name="bgcolor" value="#ffffff" />
55                 <param name="FlashVars" value="mp3={{ book.mp3_file.url }}&amp;width=426&amp;showvolume=1&amp;bgcolor1=eeeeee&amp;bgcolor2=eeeeee&amp;buttoncolor=666666" />
56             </object>
57             {% endif %}
58             </div>
59         </div>
60     
61         {% if book_children %}
62         {% autopaginate book_children 10 %}
63         <div id="book-children">
64             <ol>
65             {% for book in book_children %}
66                 <li>{{ book.short_html }}</li>
67             {% endfor %}
68             </ol>
69         </div>
70         {% paginate %}
71         {% endif %}
72     
73     </div>
74         
75     <div id="tags-list">
76         <div id="book-info">
77             <h2>{% trans "Details" %}</h2>
78             <ul>
79                 <li>
80                     {% trans "Author" %}: 
81                     {% for tag in categories.author %}
82                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
83                     {% endfor %}
84                 </li>
85                 <li>
86                     {% trans "Epoch" %}:
87                     {% for tag in categories.epoch %}
88                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
89                     {% endfor %}
90                 </li>
91                 <li>
92                     {% trans "Kind" %}:
93                     {% for tag in categories.kind %}
94                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
95                     {% endfor %}
96                 </li>
97                 <li>
98                     {% trans "Genre" %}:
99                     {% for tag in categories.genre %}
100                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
101                     {% endfor %}
102                 </li>
103             </ul>
104             <h2>{% trans "Other resources" %}</h2>
105             <ul>
106                 <li><a href="{{ extra_info.about }}">{% trans "Book on project's wiki" %}</a></li>
107                 <li><a href="{{ extra_info.source_url }}">{% trans "Book in CBN Polona" %}</a></li>
108                 {% if book.gazeta_link %}
109                 <li><a href="{{ book.gazeta_link }}">{% trans "Book description on Lektury.Gazeta.pl" %}</a></li>
110                 {% endif %}
111                 {% if book.wiki_link %}
112                 <li><a href="{{ book.wiki_link }}">{% trans "Book description on Wikipedia" %}</a></li>
113                 {% endif %}
114             </ul>
115         </div>
116         <div id="themes-list">
117             <h2>{% trans "Work's themes " %}</h2>
118             <ul>
119             {% for theme in book_themes %}
120                 <li><a href="{% url book_fragments book.slug,theme.slug %}">{{ theme }} ({{ theme.count }})</a></li>
121             {% endfor %}
122             </ul>
123         </div>
124         <div class="clearboth"></div>
125     </div>
126     <div id="set-window">
127         <div class="header"><a href="#" class="jqmClose">{% trans "Close" %}</a></div>
128         <div class="target">
129             <p><img src="/static/img/indicator.gif" alt="*"/> {% trans "Loading" %}</p>
130         </div>
131     </div>
132 {% endblock %}