Nicer collection boxes.
[wolnelektury.git] / src / catalogue / templates / catalogue / collection_box.html
index c32122f..214db8b 100644 (file)
@@ -2,18 +2,17 @@
   {% load i18n %}
   <div class="collection-box white-box">
     <h2><a href="{{ collection.get_absolute_url }}">{% trans "Collection" %}: {{ collection }}</a></h2>
+    <p>
     {% if collection.description %}
       {{ collection.description|safe|truncatewords_html:40 }}
     {% endif %}
-    {% for book in collection.get_books|slice:":5" %}
-      {{ book.mini_box }}
-    {% endfor %}
-    {% with collection.get_books.count|add:-5 as more %}
-      {% if more > 0 %}
-        <a href="{{ collection.get_absolute_url }}">
-          {% blocktrans count c=more %}and one more{% plural %}and {{ c }} more{% endblocktrans %}
+    </p>
+    <div class="covers">
+      {% for book in collection.get_books|slice:":5" %}
+        <a href="{{ book.get_absolute_url }}">
+          <img src="{{ book.cover_thumb.url }}" alt="{{ book.pretty_title }}" title="{{ book.pretty_title }}">
         </a>
-      {% endif %}
-    {% endwith %}
+      {% endfor %}
+    </div>
   </div>
 {% endspaceless %}