reformat templates
[wolnelektury.git] / src / catalogue / templates / catalogue / collection_box.html
1 {% spaceless %}
2   {% load i18n %}
3   {% load ssi_include from ssify %}
4   {% load cache %}
5   <div class="collection-box white-box">
6     <h2><a href="{{ obj.get_absolute_url }}">{% trans "Collection" %}: {{ obj }}</a></h2>
7     {% if obj.description %}
8       {{ obj.description|safe|truncatewords_html:40 }}
9     {% endif %}
10     {% for book in obj.get_books|slice:":5" %}
11       {% cache 86400 book_mini_box book.pk %}
12         {% include 'catalogue/book_mini_box.html' %}
13       {% endcache %}
14       {#% ssi_include 'catalogue_book_mini' pk=book.pk %#}
15     {% endfor %}
16     {% with obj.get_books.count|add:-5 as more %}
17       {% if more > 0 %}
18         <a href="{{ obj.get_absolute_url }}">
19           {% blocktrans count c=more %}and one more{% plural %}and {{ c }} more{% endblocktrans %}
20         </a>
21       {% endif %}
22     {% endwith %}
23   </div>
24 {% endspaceless %}