X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/96017ff51fb12f96cbe960a37042cff5eae60e14..13f2f447ee06e5a95b86ee6d027b17d209518fdd:/src/catalogue/templates/catalogue/book_detail.html diff --git a/src/catalogue/templates/catalogue/book_detail.html b/src/catalogue/templates/catalogue/book_detail.html index 4baec4b8e..d2bfda7e4 100644 --- a/src/catalogue/templates/catalogue/book_detail.html +++ b/src/catalogue/templates/catalogue/book_detail.html @@ -1,8 +1,8 @@ {% extends "base/base.html" %} {% load i18n %} -{% load common_tags catalogue_tags %} -{% load ssify %} +{% load catalogue_tags %} {% load build_absolute_uri from fnp_common %} +{% load annoy_banner from annoy %} {% load cache %} {% block titleextra %}{{ book.pretty_title }}{% endblock %} @@ -12,10 +12,9 @@ {% block bodyid %}book-detail{% endblock %} + {% block body %} - {% cache 86400 book_wide book.pk %} {# book|status:user #} - {% include 'catalogue/book_wide.html' %} - {% endcache %} + {% include 'catalogue/book_wide.html' %} {% work_list book_children %} @@ -24,14 +23,13 @@ {% trans "Other versions" %}: {% for rel in book.other_versions %} - {% cache 86400 book_mini_box rel.pk %} - {% include 'catalogue/book_mini_box.html' with book=rel %} - {% endcache %} - {#% ssi_include 'catalogue_book_mini' pk=rel.pk %#} + {{ rel.mini_box }} {% endfor %} {% endif %} + {% annoy_banner 'book-page' %} + {% trans "See also" %}: {% related_books book taken=book.other_versions|length %} @@ -47,22 +45,34 @@ {% trans "Information about the work" %} - {% for tag in tags %} + {% for author in book.authors %} - - {% ssi_include 'catalogue_tag_box' pk=tag.pk %} + + {% cache 86400 catalogue_tag_box author.pk %} + {% include 'catalogue/tag_box.html' with tag=author %} + {% endcache %} {% endfor %} - {% if extra_info.source_url %} - - {% trans "Source" %} {% trans "of the book" %} - {% trans "in" %} {% source_name extra_info.source_url %} - + {% with extra_info=book.get_extra_info_json %} + {% for source_url in extra_info.source_urls %} + + {% trans "Source" %} {% trans "of the book" %} + {% trans "in" %} {% source_name source_url %} + + {% empty %} + {% if extra_info.source_url %} + + {% trans "Source" %} {% trans "of the book" %} + {% trans "in" %} {% source_name extra_info.source_url %} + + {% endif %} + {% endfor %} + {% if book|status:user != 'closed' %} + {% trans "Source XML file" %} {% endif %} - {% trans "Source XML file" %} {% if extra_info.about and not hide_about %} {% trans "Book on" %} {% trans "Editor's Platform" %} @@ -76,5 +86,6 @@ {% trans "Mix this book" %} +{% endwith %} {% endblock %}