Added wolnelektury.wsgi to 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         <ol>
31             {# {% for tag in tags %} #}
32             {# <li class="category"><a href="{% catalogue_url tag %}">{{ tag }}</a> | <a href="{% catalogue_url tags -tag %}">x</a></li> #}
33             {# {% endfor %} #}
34             <li class="book-title">{{ book.title }} | <a href="{% url main_page %}">x</a></li>
35         </ol>
36     </form>
37     
38     <div id="books-list">
39         {% if book.has_description %}
40             <div id="description">
41                 {{ book.description|safe }}
42             </div>
43             <div id="toggle-description"><p>Zwiń opis ▲</p></div>
44         {% endif %}
45         <div id="formats">
46             <ul>
47             {% if book.pdf_file %}
48                 <li><a href="{{ book.pdf_file.url }}">Pobierz plik PDF</a></li>
49             {% endif %}
50             {% if book.odt_file %}
51                 <li><a href="{{ book.odt_file.url }}">Pobierz plik ODT</a></li>
52             {% endif %}
53             {% if book.html_file %}
54                 <li><a href="{{ book.html_file.url }}">Pobierz plik HTML</a></li>
55             {% endif %}
56             </ul>
57         </div>
58     
59         {% if book.children.all %}
60         <div id="book-children">
61             <h2>Utwory składające się na ten utwór:</h2>
62             {% for book in book.children.all %}
63                 <li><a href="{{ book.get_absolute_url }}">{{ book.title }}</a></li>
64             {% endfor %}
65         </div>
66         {% endif %}
67     
68     </div>
69         
70     <div id="tags-list">
71         <h2>O utworze</h2>
72         <ul>
73             <li>
74                 Autor: 
75                 {% for tag in categories.author %}
76                 <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
77                 {% endfor %}
78             </li>
79             <li>
80                 Epoka:
81                 {% for tag in categories.epoch %}
82                 <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
83                 {% endfor %}
84             </li>
85             <li>
86                 Rodzaj:
87                 {% for tag in categories.kind %}
88                 <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
89                 {% endfor %}
90             </li>
91             <li>
92                 Gatunek:
93                 {% for tag in categories.genre %}
94                 <a href="{{ tag.get_absolute_url }}">{{ tag }}</a>
95                 {% endfor %}
96             </li>
97         </ul>
98         {% if categories.theme %}
99             <h2>Motywy w utworze</h2>
100             <ul>
101             {% for theme in categories.theme %}
102                 <li>{{ theme }}</li>
103             {% endfor %}
104             </ul>
105         {% endif %}
106     </div>
107 {% endblock %}