fixes
[wolnelektury.git] / src / catalogue / templates / catalogue / book_detail.html
index 6e875bd..d2bfda7 100644 (file)
   {% 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 %}
@@ -78,5 +86,6 @@
   <div class="white-box">
     <a href="{% url 'poem_from_book' book.slug %}">{% trans "Mix this book" %}</a>
   </div>
+{% endwith %}
 
 {% endblock %}