fixes
[wolnelektury.git] / src / catalogue / templates / catalogue / book_detail.html
index de1b45a..d2bfda7 100644 (file)
@@ -2,6 +2,7 @@
 {% load i18n %}
 {% load catalogue_tags %}
 {% load build_absolute_uri from fnp_common %}
+{% load annoy_banner from annoy %}
 {% load cache %}
 
 {% block titleextra %}{{ book.pretty_title }}{% endblock %}
@@ -27,6 +28,8 @@
       </section>
     {% endif %}
 
+    {% annoy_banner 'book-page' %}
+
     <section class="see-also">
       <h2>{% trans "See also" %}:</h2>
       {% related_books book taken=book.other_versions|length %}
   {% endfor %}
 
 
-  {% if extra_info.source_url %}
-    <div class="white-box">
-      <a href="{{ extra_info.source_url }}">{% trans "Source" %}</a> {% trans "of the book" %}
-      {% trans "in" %} {% source_name extra_info.source_url %}
-    </div>
-  {% endif %}
+  {% with extra_info=book.get_extra_info_json %}
+    {% for source_url in extra_info.source_urls %}
+      <div class="white-box">
+        <a href="{{ source_url }}">{% trans "Source" %}</a> {% trans "of the book" %}
+        {% trans "in" %} {% source_name source_url %}
+      </div>
+    {% empty %}
+      {% if extra_info.source_url %}
+        <div class="white-box">
+          <a href="{{ extra_info.source_url }}">{% trans "Source" %}</a> {% trans "of the book" %}
+          {% trans "in" %} {% source_name extra_info.source_url %}
+        </div>
+      {% endif %}
+    {% endfor %}
   {% if book|status:user != 'closed' %}
     <div class="white-box"><a href="{{ book.xml_url }}">{% trans "Source XML file" %}</a></div>
   {% endif %}
@@ -75,5 +86,6 @@
   <div class="white-box">
     <a href="{% url 'poem_from_book' book.slug %}">{% trans "Mix this book" %}</a>
   </div>
+{% endwith %}
 
 {% endblock %}