</a></p>
<h2>{% trans "Literature" %}</h2>
- {% plain_list books by_author=True paged=False %}
+ {% plain_list books by_author=True paged=False initial_blocks=True %}
<h2>{% trans "Collections" %}</h2>
- {% plain_list collections paged=False %}
+ {% plain_list collections paged=False with_initials=False %}
<h2>{% trans "Gallery" %}</h2>
- {% plain_list pictures by_author=True paged=False %}
+ {% plain_list pictures by_author=True paged=False initial_blocks=True %}
</div>
<div class='{% if paged %}plain-list-paged {% endif %}plain-list-container white-box'>
<div class='plain-list' style=''>
{% for initial, object_list in names %}
+ {% if initial_blocks %}<div class="initial-block">{% endif %}
{% if initial %}
<p class="header">{{ initial }}</p>
{% endif %}
{% for item in object_list %}
<p><a href="{% if book %}{% url 'book_fragments' book.slug item.slug %}{% elif choice %}{% if gallery %}{% catalogue_url_gallery choice item %}{% else %}{% catalogue_url choice item %}{% endif %}{% elif gallery %}{{ item.get_absolute_gallery_url }}{% else %}{{ item.get_absolute_url }}{% endif %}">{{ item }}{% if item.count %} ({{ item.count}}){% endif %}</a></p>
{% endfor %}
+ {% if initial_blocks %}</div>{% endif %}
{% endfor %}
</div>
<div class="pager"></div>
@register.inclusion_tag('catalogue/plain_list.html', takes_context=True)
def plain_list(context, object_list, with_initials=True, by_author=False, choice=None, book=None, gallery=False,
- paged=True):
+ paged=True, initial_blocks=False):
names = [('', [])]
last_initial = None
for obj in object_list:
break-after: avoid;
}
}
+
+ .initial-block {
+ display: inline-block;
+ }
}
.pager {