One cover more in the box.
[wolnelektury.git] / src / catalogue / templates / catalogue / related_books.html
old mode 100755 (executable)
new mode 100644 (file)
index 74e680f..cd2f358
@@ -1,28 +1,24 @@
 {% spaceless %}
   {% load catalogue_random_book from catalogue_tags %}
   {% load picture_random_picture from picture_tags %}
-  {% load ssi_include from ssify %}
-  {% load cache %}
 
   {% for pic in pics %}
-    {% ssi_include 'picture_mini' pk=pic.pk %}
+    {{ pic.mini_box }}
   {% endfor %}
 
   {% for book in books %}
-    {% cache 86400 book_mini_box book.pk %}
-      {% include 'catalogue/book_mini_box.html' %}
-    {% endcache %}
-    {#% ssi_include 'catalogue_book_mini' pk=book.pk %#}
+    {{ book.mini_box }}    
   {% endfor %}
 
   {% if random %}
-    {% catalogue_random_book random_excluded_books as random_book_pk %}
-    {% picture_random_picture random_excluded_pics unless=random_book_pk as random_pic_pk %}
-    {{ random_book_pk.if }}
-      {% ssi_include 'catalogue_book_mini' pk=random_book_pk %}
-    {{ random_book_pk.endif }}
-    {{ random_pic_pk.if }}
-      {% ssi_include 'picture_mini' pk=random_pic_pk %}
-    {{ random_pic_pk.endif }}
+    {% catalogue_random_book random_excluded_books as random_book %}
+    {% if random_book %}
+      {{ random_book.mini_box }}
+    {% else %}
+      {% picture_random_picture random_excluded_pics as random_pic %}
+      {% if random_pic %}
+        {{ random_pic.mini_box }}
+      {% endif %}
+    {% endif %}
   {% endif %}
-{% endspaceless %}
\ No newline at end of file
+{% endspaceless %}