Removed txt book files from repository.
[wolnelektury.git] / wolnelektury / templates / catalogue / book_detail.html
1 {% extends "base.html" %}
2 {% load catalogue_tags %}
3
4 {% block title %}Lektura {{ book.title }} w WolneLektury.pl{% endblock %}
5
6 {% block bodyid %}book-detail{% endblock %}
7
8 {% block extrahead %}
9     <script type="text/javascript">
10         $(function() {
11             $('#toggle-description').hover(
12                 function() { $(this).css({background: '#F3F3F3', cursor: 'pointer'}); },
13                 function() { $(this).css({background: '#EEE'}); }
14             ).click(function() {
15                 if ($('#description').hasClass('hidden')) {
16                     $('#description').slideDown('fast').removeClass('hidden');
17                     $('p', this).html('Zwiń opis ▲');
18                 } else {
19                     $('#description').slideUp('fast').addClass('hidden');
20                     $('p', this).html('Rozwiń opis ▼');
21                 }
22             });
23         });
24     </script>
25 {% endblock %}
26
27 {% block body %}
28     <h1>{{ book.title }}, {{ categories.author|join:", " }}</h1>
29     <form action="{% url main_page %}" method="get" accept-charset="utf-8" id="search-form">
30         <p>{{ form.q }} <input type="submit" value="Szukaj" /> <strong>lub</strong> <a href="{% url main_page %}">wróć do strony głównej</a></p>
31     </form>
32     
33     <div id="books-list">
34         {% if book.has_description %}
35             <div id="description">
36                 {{ book.description|safe }}
37             </div>
38             <div id="toggle-description"><p>Zwiń opis ▲</p></div>
39         {% endif %}
40         <div id="formats">
41             <ul>
42             {% if book.html_file %}
43                 <li><a href="{{ book.html_file.url }}">Czytaj online</a></li>
44             {% endif %}
45             {% if book.pdf_file %}
46                 <li><a href="{{ book.pdf_file.url }}">Pobierz plik PDF</a></li>
47             {% endif %}
48             {% if book.odt_file %}
49                 <li><a href="{{ book.odt_file.url }}">Pobierz plik ODT</a></li>
50             {% endif %}
51             {% if book.txt_file %}
52                 <li><a href="{{ book.txt_file.url }}">Pobierz plik TXT</a></li>
53             {% endif %}
54             </ul>
55         </div>
56     
57         {% if book.children.all %}
58         <div id="book-children">
59             <h2>Utwory składające się na ten utwór:</h2>
60             {% for book in book.children.all %}
61                 <li><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></li>
62             {% endfor %}
63         </div>
64         {% endif %}
65     
66     </div>
67         
68     <div id="tags-list">
69         <div id="book-info">
70             <h2>O utworze</h2>
71             <ul>
72                 <li>
73                     Autor: 
74                     {% for tag in categories.author %}
75                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
76                     {% endfor %}
77                 </li>
78                 <li>
79                     Epoka:
80                     {% for tag in categories.epoch %}
81                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
82                     {% endfor %}
83                 </li>
84                 <li>
85                     Rodzaj:
86                     {% for tag in categories.kind %}
87                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
88                     {% endfor %}
89                 </li>
90                 <li>
91                     Gatunek:
92                     {% for tag in categories.genre %}
93                     <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
94                     {% endfor %}
95                 </li>
96             </ul>
97         </div>
98         <div id="themes-list">
99             {% if categories.theme %}
100                 <h2>Motywy w utworze</h2>
101                 <ul>
102                 {% for theme in categories.theme %}
103                     <li>{{ theme }}</li>
104                 {% endfor %}
105                 </ul>
106             {% endif %}
107         </div>
108         <div class="clearboth"></div>
109     </div>
110 {% endblock %}