From: Jan Szejko Date: Wed, 27 Jan 2016 16:08:18 +0000 (+0100) Subject: fix #3661: łamanie spisów na kolumny X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/4647cfaac7bf1193ae2280985f649abf3c1f470f fix #3661: łamanie spisów na kolumny --- diff --git a/src/catalogue/templates/catalogue/catalogue.html b/src/catalogue/templates/catalogue/catalogue.html index 6b6957852..f1b97f43f 100644 --- a/src/catalogue/templates/catalogue/catalogue.html +++ b/src/catalogue/templates/catalogue/catalogue.html @@ -18,13 +18,13 @@

{% trans "Literature" %}

- {% plain_list books by_author=True paged=False %} + {% plain_list books by_author=True paged=False initial_blocks=True %}

{% trans "Collections" %}

- {% plain_list collections paged=False %} + {% plain_list collections paged=False with_initials=False %}

{% trans "Gallery" %}

- {% plain_list pictures by_author=True paged=False %} + {% plain_list pictures by_author=True paged=False initial_blocks=True %} diff --git a/src/catalogue/templates/catalogue/plain_list.html b/src/catalogue/templates/catalogue/plain_list.html index 276e55e42..a9351843a 100644 --- a/src/catalogue/templates/catalogue/plain_list.html +++ b/src/catalogue/templates/catalogue/plain_list.html @@ -5,12 +5,14 @@
{% for initial, object_list in names %} + {% if initial_blocks %}
{% endif %} {% if initial %}

{{ initial }}

{% endif %} {% for item in object_list %}

{{ item }}{% if item.count %} ({{ item.count}}){% endif %}

{% endfor %} + {% if initial_blocks %}
{% endif %} {% endfor %}
diff --git a/src/catalogue/templatetags/catalogue_tags.py b/src/catalogue/templatetags/catalogue_tags.py index 941ab63c7..d5e7e059f 100644 --- a/src/catalogue/templatetags/catalogue_tags.py +++ b/src/catalogue/templatetags/catalogue_tags.py @@ -356,7 +356,7 @@ def work_list(context, object_list): @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: diff --git a/src/wolnelektury/static/scss/main/base.scss b/src/wolnelektury/static/scss/main/base.scss index 1a25dbdc9..210fd44c2 100755 --- a/src/wolnelektury/static/scss/main/base.scss +++ b/src/wolnelektury/static/scss/main/base.scss @@ -136,6 +136,10 @@ ul.plain { break-after: avoid; } } + + .initial-block { + display: inline-block; + } } .pager {