From 5d654e1e7104d2ce86ec1b9fe52865a7dca4b4be Mon Sep 17 00:00:00 2001 From: Hasan Ramezani Date: Fri, 24 Jan 2020 16:31:40 +0100 Subject: [PATCH] Refs #27888 -- Removed redundant {% if %} in admin changelist filters. --- django/contrib/admin/templates/admin/change_list.html | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/django/contrib/admin/templates/admin/change_list.html b/django/contrib/admin/templates/admin/change_list.html index 4dc9ed52d7..aebd12b957 100644 --- a/django/contrib/admin/templates/admin/change_list.html +++ b/django/contrib/admin/templates/admin/change_list.html @@ -60,11 +60,9 @@ {% if cl.has_filters %}

{% translate 'Filter' %}

- {% if cl.has_filters or cl.search_fields %} - {% if cl.preserved_filters %}

- ✖ {% translate "Clear all filters" %} -

{% endif %} - {% endif %} + {% if cl.preserved_filters %}

+ ✖ {% translate "Clear all filters" %} +

{% endif %} {% for spec in cl.filter_specs %}{% admin_list_filter cl spec %}{% endfor %}
{% endif %}