Django 2.2
[wolnelektury.git] / src / catalogue / templates / catalogue / book_detail.html
index e3f4d73..eeecbf0 100644 (file)
@@ -1,7 +1,6 @@
 {% extends "base/base.html" %}
 {% load i18n %}
-{% load common_tags catalogue_tags %}
-{% load ssify %}
+{% load catalogue_tags %}
 {% load build_absolute_uri from fnp_common %}
 {% load cache %}
 
 
 {% block bodyid %}book-detail{% endblock %}
 
+{% block extrahead %}
+{{ block.super }}
+{% if request.path == '/katalog/lektura/pan-tadeusz/' %}
+{% include "hotjar.html" %}
+{% endif %}
+{% endblock %}
+
+
 {% block body %}
-  {% ssi_include 'catalogue_book_wide' pk=book.pk %}
+  {% include 'catalogue/book_wide.html' %}
 
   {% work_list book_children %}
 
       <section class="see-also">
         <h1>{% trans "Other versions" %}:</h1>
         {% 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 %}
       </section>
     {% endif %}
 
 
   <h2>{% trans "Information about the work" %}</h2>
-  {% for tag in tags %}
+  {% for author in book.authors %}
     <div class="white-box">
-      <a style="display:block" href="{{ tag.get_absolute_url }}">
-        {% ssi_include 'catalogue_tag_box' pk=tag.pk %}
+      <a style="display:block" href="{{ author.get_absolute_url }}">
+       {% cache 86400 catalogue_tag_box author.pk %}
+          {% include 'catalogue/tag_box.html' with tag=author %}
+       {% endcache %}
       </a>
     </div>
   {% endfor %}
@@ -60,7 +66,9 @@
       {% trans "in" %} {% source_name extra_info.source_url %}
     </div>
   {% endif %}
-  <div class="white-box"><a href="{{ book.xml_file.url }}">{% trans "Source XML file" %}</a></div>
+  {% if book|status:user != 'closed' %}
+    <div class="white-box"><a href="{{ book.xml_url }}">{% trans "Source XML file" %}</a></div>
+  {% endif %}
   {% if extra_info.about and not hide_about %}
     <div class="white-box">
       {% trans "Book on" %} <a href="{{ extra_info.about }}">{% trans "Editor's Platform" %}</a>