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