From 729e50de63f52e9b863c7815b970242880db0f00 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 16 Dec 2020 09:15:26 -0800 Subject: [PATCH] Show consistent book status regardless of edition --- bookwyrm/templates/snippets/shelve_button.html | 18 +++++++++--------- bookwyrm/templatetags/bookwyrm_tags.py | 9 +++++---- bookwyrm/views.py | 2 +- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/bookwyrm/templates/snippets/shelve_button.html b/bookwyrm/templates/snippets/shelve_button.html index d452169e..afbdc970 100644 --- a/bookwyrm/templates/snippets/shelve_button.html +++ b/bookwyrm/templates/snippets/shelve_button.html @@ -4,24 +4,24 @@ {% with book.id|uuid as uuid %} {% active_shelf book as active_shelf %}
- {% if active_shelf.identifier == 'read' %} + {% if active_shelf.shelf.identifier == 'read' %} - {% elif active_shelf.identifier == 'reading' %} + {% elif active_shelf.shelf.identifier == 'reading' %} - {% include 'snippets/finish_reading_modal.html' %} - {% elif active_shelf.identifier == 'to-read' %} + {% include 'snippets/finish_reading_modal.html' with book=active_shelf.book %} + {% elif active_shelf.shelf.identifier == 'to-read' %} - {% include 'snippets/start_reading_modal.html' %} + {% include 'snippets/start_reading_modal.html' with book=active_shelf.book %} {% else %}
{% csrf_token %} - +
@@ -40,17 +40,17 @@