- {% 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 %}
{% for shelf in request.user.shelf_set.all %}
-
- {% if shelf.identifier == 'to-read' %}
+ {% if active_shelf.shelf.identifier == 'to-read' and shelf.identifier == 'reading' %}
- {% include 'snippets/start_reading_modal.html' %}
+ {% include 'snippets/start_reading_modal.html' with book=active_shelf.book %}
{% else %}