X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/6e3e08e5354baaf82f7d46cbd88883e4c7426dce..af43a678694121f8b7c81a52a64d02c1b024fc57:/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 26fe1678c..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,21 +45,31 @@

{% 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 %} -
- {% endif %} + {% 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 %} @@ -78,5 +86,6 @@
{% trans "Mix this book" %}
+{% endwith %} {% endblock %}