X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/0bd6d7d8e87e1d538661b6167d0a5d99428dfc39..dce4cbe605cb926b5583f7ddd325704b527e7e5c:/src/catalogue/templates/catalogue/related_books.html diff --git a/src/catalogue/templates/catalogue/related_books.html b/src/catalogue/templates/catalogue/related_books.html old mode 100755 new mode 100644 index 03d779342..cd2f358ac --- a/src/catalogue/templates/catalogue/related_books.html +++ b/src/catalogue/templates/catalogue/related_books.html @@ -1,29 +1,24 @@ {% spaceless %} -{% load catalogue_random_book from catalogue_tags %} -{% load picture_random_picture from picture_tags %} -{% load ssi_include from ssify %} -{% load cache %} + {% load catalogue_random_book from catalogue_tags %} + {% load picture_random_picture from picture_tags %} -{% for pic in pics %} - {% ssi_include 'picture_mini' pk=pic.pk %} -{% endfor %} + {% for pic in pics %} + {{ 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 %#} -{% endfor %} + {% for book in books %} + {{ 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 }} -{% endif %} - -{% endspaceless %} \ No newline at end of file + {% if random %} + {% 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 %}