Menu list for shelf button options

This commit is contained in:
Mouse Reeve
2021-01-30 11:43:40 -08:00
parent 9b7c10ce6c
commit e5746d6117
5 changed files with 24 additions and 36 deletions

View File

@ -10,22 +10,7 @@
</div>
{% else %}
<div class="control">
{% if active_shelf.shelf.identifier == 'read' %}
<button class="button is-small" disabled>
<span>Read</span> <span class="icon icon-check"></span>
</button>
{% elif active_shelf.shelf.identifier == 'reading' %}
{% include 'snippets/toggle/toggle_button.html' with class="is-small" text="I'm done!" controls_text="finish-reading" controls_uid=uuid focus="modal-title-finish-reading" %}
{% elif active_shelf.shelf.identifier == 'to-read' %}
{% include 'snippets/toggle/toggle_button.html' with class="is-small" text="Start reading" controls_text="start-reading" controls_uid=uuid focus="modal-title-start-reading" %}
{% else %}
<form name="shelve" action="/shelve/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ active_shelf.book.id }}">
<input type="hidden" name="shelf" value="to-read">
<button class="button is-small" type="submit">Want to read</button>
</form>
{% endif %}
{% include 'snippets/shelve_button_options.html' with class="shelf-option is-small" shelves=request.user.shelf_set.all active_shelf=active_shelf %}
</div>
{% include 'snippets/shelve_button_dropdown.html' with class="is-small" button_uuid=uuid%}
{% endif %}