fixes
[wolnelektury.git] / src / catalogue / templates / catalogue / collection_box.html
index 0e27338..ec79ca6 100644 (file)
@@ -1,23 +1,19 @@
 {% spaceless %}
   {% load i18n %}
-  {% load ssi_include from ssify %}
-  {% load cache %}
+  {% load thumbnail %}
   <div class="collection-box white-box">
-    <h2><a href="{{ collection.get_absolute_url }}">{% trans "Collection" %}: {{ collection }}</a></h2>
+    <h2><a href="{{ collection.get_absolute_url }}">{{ collection }}</a></h2>
+    <div class="description">
     {% if collection.description %}
       {{ collection.description|safe|truncatewords_html:40 }}
     {% endif %}
-    {% for book in collection.get_books|slice:":5" %}
-      {% cache 86400 book_mini_box book.pk %}
-        {% include 'catalogue/book_mini_box.html' %}
-      {% endcache %}
-    {% 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 %}
+    </div>
+    <div class="covers">
+      {% for book in collection.get_books|slice:":6" %}
+        <a href="{{ book.get_absolute_url }}">
+          <img src="{% thumbnail book.cover_clean '139x193' as th %}{{ th.url }}{% endthumbnail %}" alt="{{ book.pretty_title }}" title="{{ book.pretty_title }}">
         </a>
-      {% endif %}
-    {% endwith %}
+      {% endfor %}
+    </div>
   </div>
 {% endspaceless %}