More annoying.
[wolnelektury.git] / src / catalogue / templates / catalogue / book_text.html
1 {% extends "catalogue/viewer_base.html" %}
2 {% load i18n %}
3 {% load catalogue_tags %}
4 {% load chunks %}
5 {% load thumbnail %}
6 {% load annoy_banners from annoy %}
7
8
9 {% block title %}{{ book.pretty_title }}{% endblock %}
10
11
12 {% block menu %}
13   <li>
14     <a href="{{ book.get_absolute_url }}" id="menu-book" data-box="book-short">
15       <img src="{% if book.cover_thumb %}{% thumbnail book.cover_thumb '240x332' as thumb %}{{ thumb.url }}{% empty %}{{ book.cover_thumb.url }}{% endthumbnail %}{% endif %}"
16            width="120" height="166"
17            alt="{{ book.pretty_title }}"
18            title="{{ book.pretty_title }}">
19     </a>
20   </li>
21
22   {% if book.other_versions.exists %}
23     <li id="menu-other">
24       <a href="#" data-box="other">
25         <span class="label">{% trans "Other versions" %}</span>
26       </a>
27     </li>
28   {% endif %}
29
30   <li id="menu-toc">
31     <a href="#" data-box="toc">
32       <span class="label">{% trans "Table of contents" %}</span>
33     </a>
34   </li>
35
36   <li id="menu-themes">
37     <a href="#" data-box="themes">
38       <span class="label">{% trans "Themes" %}</span>
39     </a>
40   </li>
41
42   <li id="menu-settings">
43     <a href="#" data-box="settings">
44       <span class="label">{% trans "Settings" %}</span>
45     </a>
46   </li>
47
48   <li id="menu-nota_red">
49     <a href="#" data-box="nota_red">
50       <span class="label">{% trans "Edit. note" %}</span>
51     </a>
52   </li>
53
54   <li id="menu-info">
55     <a href="#info" data-box="info">
56       <span class="label">{% trans "Infobox" %}</span>
57     </a>
58   </li>
59 {% endblock menu %}
60
61
62 {% block big-pane %}
63
64   <article id="main-text">
65     {{ book_text|safe }}
66   </article>
67
68   <article id="other-text">
69     <a class="other-text-close" href="#">{% trans "Close" %}</a>
70     <div id="other-text-waiter">{% trans "Please wait..." %}</div>
71     <div id="other-text-body" style="display: none;"></div>
72   </article>
73 {% endblock big-pane %}
74
75
76 {% block footer %}
77   <div id="info" class="box">
78       {% book_info book %}
79   </div>
80
81   {% if book.other_versions.exists %}
82     <div class="box" id="other">
83       <h2>{% trans "Other versions of the book" %}</h2>
84       <a class="other-text-close" href="#">{% trans "Close the other version" %}</a>
85       <ul>
86         {% spaceless %}
87           {% for other_version in book.other_versions %}
88             <li>
89               <a class="display-other"
90                  data-other="{{ other_version.html_url }}"
91                  href="{% url 'book_text' other_version.slug %}">
92                 {{ other_version.mini_box_nolink }}
93               </a>
94             </li>
95           {% endfor %}
96         {% endspaceless %}
97       </ul>
98     </div>
99   {% endif %}
100
101   <div class="box" id="settings">
102     <h2>{% trans "Settings" %}</h2>
103     <a href="#" class="settings-switch" id="settings-line-numbers"
104        data-setting="always-hide-line-numbers">{% trans "Display line numbers" %}</a><br/>
105     <a href="#" class="settings-switch" id="settings-themes"
106        data-setting="always-hide-themes">{% trans "Display themes" %}</a><br/>
107     <a href="#" class="settings-switch" id="settings-annotations"
108        data-setting="no-annotations">{% trans "Display footnotes" %}</a><br/>
109   </div>
110
111   <div class="box" id="book-short">
112     {% include 'catalogue/book_short.html' %}
113   </div>
114
115   <div id="annoy-stubs">
116     {% annoy_banners 'book-text-intermission' %}
117
118     {% for insert in inserts %}
119       {% include 'annoy/dynamic_insert.html' %}
120     {% endfor %}
121   </div>
122 {% endblock footer %}