From 605897757d33452c19823f3cee3b7aace15e6874 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C4=81rti=C5=86=C5=A1=20=C5=A0ulcs?= Date: Wed, 29 Mar 2017 11:42:31 +0300 Subject: [PATCH] There could be filters but all of them horizontal. We still want to collapse vertical container. --- suit/templates/admin/change_list.html | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/suit/templates/admin/change_list.html b/suit/templates/admin/change_list.html index 44efe232..9b9853e8 100644 --- a/suit/templates/admin/change_list.html +++ b/suit/templates/admin/change_list.html @@ -4,14 +4,16 @@ {% block search %}{% suit_search_form cl %}{% endblock %} {% block filters %} - {% if cl.has_filters %} -
{% for spec in cl.filter_specs|suit_list_filter_vertical:cl %} - {% if forloop.first %} -

{% trans 'Filter' %}

- {% endif %} - {% admin_list_filter cl spec %} - {% endfor %}
- {% endif %} + {% with vertical_filters=cl.filter_specs|suit_list_filter_vertical:cl %} + {% if vertical_filters %} +
{% for spec in vertical_filters %} + {% if forloop.first %} +

{% trans 'Filter' %}

+ {% endif %} + {% admin_list_filter cl spec %} + {% endfor %}
+ {% endif %} + {% endwith %} {% endblock %} {% block footer %}