From 794b47d119f7a9b5c8ce1bfe429969628df41614 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Mon, 29 Mar 2021 12:27:12 -0700 Subject: [PATCH] Unshelve option in shelve button menu --- .../snippets/shelve_button/shelve_button.html | 2 +- .../shelve_button/shelve_button_options.html | 17 +++++++++++++++++ 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/bookwyrm/templates/snippets/shelve_button/shelve_button.html b/bookwyrm/templates/snippets/shelve_button/shelve_button.html index 586d7d9d1..dc07fb64b 100644 --- a/bookwyrm/templates/snippets/shelve_button/shelve_button.html +++ b/bookwyrm/templates/snippets/shelve_button/shelve_button.html @@ -3,6 +3,7 @@ {% with book.id|uuid as uuid %} {% active_shelf book as active_shelf %} +{% latest_read_through book request.user as readthrough %}
{% if switch_mode and active_shelf.book != book %}
@@ -20,7 +21,6 @@ {% include 'snippets/shelve_button/start_reading_modal.html' with book=active_shelf.book controls_text="start-reading" controls_uid=uuid %} -{% latest_read_through book request.user as readthrough %} {% include 'snippets/shelve_button/finish_reading_modal.html' with book=active_shelf.book controls_text="finish-reading" controls_uid=uuid readthrough=readthrough %} {% include 'snippets/shelve_button/progress_update_modal.html' with book=shelf_book.book controls_text="progress-update" controls_uid=uuid readthrough=readthrough %} diff --git a/bookwyrm/templates/snippets/shelve_button/shelve_button_options.html b/bookwyrm/templates/snippets/shelve_button/shelve_button_options.html index 56783b2cc..a002917f4 100644 --- a/bookwyrm/templates/snippets/shelve_button/shelve_button_options.html +++ b/bookwyrm/templates/snippets/shelve_button/shelve_button_options.html @@ -28,6 +28,8 @@ {% if dropdown %}{% endif %} {% endfor %} {% if dropdown %} + +{% if readthrough and active_shelf.shelf.identifier != 'read' %}
  • {% endif %} + +{% if active_shelf.shelf %} +
  • + +
  • +{% endif %} + +{% endif %}