fix
[wolnelektury.git] / src / catalogue / templates / catalogue / book_text.html
index f697e4e..3953e6a 100644 (file)
@@ -1,8 +1,9 @@
 {% extends "catalogue/viewer_base.html" %}
 {% load i18n %}
-{% load catalogue_tags ssify %}
+{% load catalogue_tags %}
+{% load chunks %}
 {% load thumbnail %}
-{% load cache %}
+{% load annoy_banners from annoy %}
 
 
 {% block title %}{{ book.pretty_title }}{% endblock %}
@@ -59,8 +60,9 @@
 
 
 {% block big-pane %}
+
   <article id="main-text">
-    <!--#include file='{{ book.html_url }}'-->
+    {{ book_text|safe }}
   </article>
 
   <article id="other-text">
               <a class="display-other"
                  data-other="{{ other_version.html_url }}"
                  href="{% url 'book_text' other_version.slug %}">
-                {% cache 86400 book_mini_box other_version.pk %}
-                  {% include 'catalogue/book_mini_box.html' with book=other_version no_link=True %}
-                {% endcache %}
-                {#% ssi_include 'catalogue_book_mini_nolink' pk=other_version.pk %#}
+                {{ other_version.mini_box_nolink }}
               </a>
             </li>
           {% endfor %}
   </div>
 
   <div class="box" id="book-short">
-    {% cache 86400 catalogue_book_short book.pk book|status:user %}
-      {% include 'catalogue/book_short.html' %}
-    {% endcache %}
+    {% include 'catalogue/book_short.html' %}
+  </div>
+
+  <div id="annoy-stubs">
+    {% annoy_banners 'book-text-intermission' %}
+
+    {% for insert in inserts %}
+      {% with text=insert.choose %}
+        <div class="dynamic-insert{% if text.image %} with-image{% endif %}" style="{% if text.background_color %}background-color: {{ text.background_color }};{% endif %}" data-paragraphs="{{ insert.paragraphs }}">
+          <a href="{% url 'club' %}">
+            <div class="text" style="{% if text.text_color %}color:{{ text.text_color }}{% endif %}">
+              {{ text.text|safe|linebreaks }}
+            </div>
+            {% if text.image %}
+              <img src="{% thumbnail text.image '120x120' as thumb %}{{ thumb.url }}{% empty %}{{ text.image.url }}{% endthumbnail %}">
+            {% endif %}
+          </a>
+        </div>
+      {% endwith %}
+    {% endfor %}
   </div>
 {% endblock footer %}