From c7863ec8f0ef1375eef8a23907f17a5e279f3f55 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 31 Mar 2021 15:00:49 -0700 Subject: [PATCH] Fixes re-shelving books from all books view --- bookwyrm/templates/snippets/shelf_selector.html | 2 +- bookwyrm/templates/user/shelf.html | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/snippets/shelf_selector.html b/bookwyrm/templates/snippets/shelf_selector.html index 1bc448ec..edc291e0 100644 --- a/bookwyrm/templates/snippets/shelf_selector.html +++ b/bookwyrm/templates/snippets/shelf_selector.html @@ -12,7 +12,7 @@ diff --git a/bookwyrm/templates/user/shelf.html b/bookwyrm/templates/user/shelf.html index 8d23dce4..d1de6e00 100644 --- a/bookwyrm/templates/user/shelf.html +++ b/bookwyrm/templates/user/shelf.html @@ -111,7 +111,12 @@ {% endif %} {% if shelf.user == request.user %} - {% include 'snippets/shelf_selector.html' with current=shelf %} + {% if not shelf.id %} + {% active_shelf book as current %} + {% include 'snippets/shelf_selector.html' with current=current.shelf class="is-small" %} + {% else %} + {% include 'snippets/shelf_selector.html' with current=shelf class="is-small" %} + {% endif %} {% endif %}