From c6a2de3bbca83411b92b817f5796e2dd7e3ca298 Mon Sep 17 00:00:00 2001 From: Hugh Rundle Date: Sat, 20 Nov 2021 10:29:17 +1100 Subject: [PATCH] pass readthrough id to shelf_selector - allows user to move book from a shelf to the 'Read' shelf using the move button. --- bookwyrm/templates/book/book.html | 2 +- bookwyrm/templates/snippets/shelf_selector.html | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html index c8c509784..1eb08001d 100644 --- a/bookwyrm/templates/book/book.html +++ b/bookwyrm/templates/book/book.html @@ -162,7 +162,7 @@
  • {% blocktrans with path=shelf.shelf.local_path shelf_name=shelf.shelf.name %}{{ shelf_name }}{% endblocktrans %}
    - {% include 'snippets/shelf_selector.html' with current=shelf.shelf class="is-small" %} + {% include 'snippets/shelf_selector.html' with current=shelf.shelf class="is-small" readthrough=readthrough %}
  • {% endfor %} diff --git a/bookwyrm/templates/snippets/shelf_selector.html b/bookwyrm/templates/snippets/shelf_selector.html index 34077dc1e..1a2c46d01 100644 --- a/bookwyrm/templates/snippets/shelf_selector.html +++ b/bookwyrm/templates/snippets/shelf_selector.html @@ -11,6 +11,8 @@ {% block dropdown-list %} {% with book.id|uuid as uuid %} {% active_shelf book as active_shelf %} +{% latest_read_through book request.user as readthrough %} + {% for shelf in user_shelves %} {% if shelf.editable %} @@ -67,7 +69,5 @@ {% include 'snippets/reading_modals/finish_reading_modal.html' with book=active_shelf.book controls_text="finish_reading" controls_uid=uuid move_from=current.id readthrough=readthrough %} -{% include 'snippets/reading_modals/progress_update_modal.html' with book=active_shelf.book controls_text="progress_update" controls_uid=uuid move_from=current.id readthrough=readthrough %} - {% endwith %} {% endblock %}