From c65e165aeb1d36921da1ff110c695c1bfa890f5a Mon Sep 17 00:00:00 2001 From: Ross Chapman Date: Tue, 5 Dec 2023 19:37:29 -0800 Subject: [PATCH] Hides filter if shelf empty --- bookwyrm/templates/shelf/search_filter_field.html | 2 +- bookwyrm/templates/shelf/shelf.html | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/shelf/search_filter_field.html b/bookwyrm/templates/shelf/search_filter_field.html index 591e6aaa9..5641bae85 100644 --- a/bookwyrm/templates/shelf/search_filter_field.html +++ b/bookwyrm/templates/shelf/search_filter_field.html @@ -4,6 +4,6 @@ {% block filter %}
- +
{% endblock %} diff --git a/bookwyrm/templates/shelf/shelf.html b/bookwyrm/templates/shelf/shelf.html index ea5d2343c..4fb78ba6f 100644 --- a/bookwyrm/templates/shelf/shelf.html +++ b/bookwyrm/templates/shelf/shelf.html @@ -127,7 +127,10 @@ {% endwith %} - {% include 'shelf/search_filters.html' with user=user query=query %} + {% if books|length > 0 %} + {% include 'shelf/search_filters.html' with user=user query=query %} + {% endif %} + {% if is_self and shelf.id %}