From ec39346e67228b1e4d8fb0b84f6f74b679d2441a Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Tue, 16 Nov 2021 19:26:49 +1100 Subject: [PATCH] check shelf.editable instead of custom filter --- bookwyrm/templates/book/book.html | 10 +++++----- bookwyrm/templates/snippets/shelf_selector.html | 2 +- bookwyrm/templatetags/bookwyrm_tags.py | 11 ----------- 3 files changed, 6 insertions(+), 17 deletions(-) diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html index a1a73135a..936212bee 100644 --- a/bookwyrm/templates/book/book.html +++ b/bookwyrm/templates/book/book.html @@ -161,12 +161,12 @@ {% for shelf in user_shelfbooks %}
  • {% blocktrans with path=shelf.shelf.local_path shelf_name=shelf.shelf.name %}{{ shelf_name }}{% endblocktrans %} - {% if shelf.shelf.identifier|is_shelf_type:"readthrough" %} - {% include 'snippets/shelve_button/shelve_button.html' %} + {% if shelf.shelf.editable %} +
    + {% include 'snippets/shelf_selector.html' with current=shelf.shelf class="is-small" %} +
    {% else %} -
    - {% include 'snippets/shelf_selector.html' with current=shelf.shelf class="is-small" %} -
    + {% include 'snippets/shelve_button/shelve_button.html' %} {% endif %}
  • {% endfor %} diff --git a/bookwyrm/templates/snippets/shelf_selector.html b/bookwyrm/templates/snippets/shelf_selector.html index ef5bf5bcd..e43d8ca1d 100644 --- a/bookwyrm/templates/snippets/shelf_selector.html +++ b/bookwyrm/templates/snippets/shelf_selector.html @@ -9,7 +9,7 @@ {% block dropdown-list %} {% for shelf in user_shelves %} -{% if shelf.identifier|is_shelf_type:"custom" %} +{% if shelf.editable %}