From 4647cfaac7bf1193ae2280985f649abf3c1f470f Mon Sep 17 00:00:00 2001 From: Jan Szejko Date: Wed, 27 Jan 2016 17:08:18 +0100 Subject: [PATCH] =?utf8?q?fix=20#3661:=20=C5=82amanie=20spis=C3=B3w=20na?= =?utf8?q?=20kolumny?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/catalogue/templates/catalogue/catalogue.html | 6 +++--- src/catalogue/templates/catalogue/plain_list.html | 2 ++ src/catalogue/templatetags/catalogue_tags.py | 2 +- src/wolnelektury/static/scss/main/base.scss | 4 ++++ 4 files changed, 10 insertions(+), 4 deletions(-) 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 { -- 2.20.1