search ui draft
[wolnelektury.git] / wolnelektury / templates / catalogue / book_mini_box.html
index 4ef82e1..9b61283 100755 (executable)
@@ -1,8 +1,15 @@
-{% load i18n %}
+{% load thumbnail %}
 <div class="book-mini-box">
     <a href="{{ book.get_absolute_url }}">
-        <img src="{{ STATIC_URL }}img/cover.png"
-                alt="{% trans "Book cover" %}" />
+        {% if book.cover %}
+            <img src="
+                {% thumbnail book.cover "216x288" as thumb %}
+                    {{ thumb.url }}
+                {% empty %}
+                    {{ book.cover.url }}
+                {% endthumbnail %}
+            " alt="Cover" />
+        {% endif %}
         {% for author in authors %}
             <div class="mono author">{{ author }}</div>
             {{ book.title }}