From 180fc533844ec3427c447f7040ea837520c4fe5d Mon Sep 17 00:00:00 2001 From: welpo Date: Wed, 27 Nov 2024 19:33:47 +0100 Subject: [PATCH] =?UTF-8?q?=E2=99=BB=EF=B8=8F=20refactor:=20only=20show=20?= =?UTF-8?q?project=20tag=20filter=20with=202=20or=20more=20tags?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prior to this change, the project filters would show up even with a single tag, which wasn't very useful for filtering. Now filters only appear when there are 2+ unique tags. --- templates/partials/filter_card_tags.html | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/templates/partials/filter_card_tags.html b/templates/partials/filter_card_tags.html index 4796fff..d40ec2d 100644 --- a/templates/partials/filter_card_tags.html +++ b/templates/partials/filter_card_tags.html @@ -12,7 +12,8 @@ {% endfor %} {#- Display unique terms -#} -{%- if all_terms -%} +{% set unique_terms = all_terms | unique | sort %} +{%- if unique_terms | length >= 2 -%}