bookwyrm-mastodon/bookwyrm/templates/snippets/shelve_button/shelve_button.html

32 lines
1.4 KiB
HTML
Raw Normal View History

2020-12-12 21:25:04 -05:00
{% load bookwyrm_tags %}
2021-05-11 17:41:28 -04:00
{% load utilities %}
2021-05-11 18:14:42 -04:00
{% if request.user.is_authenticated %}
{% with book.id|uuid as uuid %}
{% active_shelf book as active_shelf %}
2021-03-29 15:27:12 -04:00
{% latest_read_through book request.user as readthrough %}
2021-03-20 20:18:18 -04:00
<div class="field has-addons mb-0">
2021-01-18 15:25:26 -05:00
{% if switch_mode and active_shelf.book != book %}
2021-01-17 13:40:40 -05:00
<div class="control">
{% include 'snippets/switch_edition_button.html' with edition=book size='is-small' %}
2021-01-18 15:25:26 -05:00
</div>
{% else %}
<div class="control">
{% include 'snippets/shelve_button/shelve_button_options.html' with class="shelf-option is-small" shelves=user_shelves active_shelf=active_shelf button_uuid=uuid %}
2021-01-18 15:25:26 -05:00
</div>
2021-01-30 19:01:36 -05:00
{% include 'snippets/shelve_button/shelve_button_dropdown.html' with class="is-small" button_uuid=uuid%}
2020-12-16 17:45:35 -05:00
{% endif %}
2020-11-05 19:48:15 -05:00
</div>
2021-01-17 13:10:59 -05:00
{% include 'snippets/shelve_button/want_to_read_modal.html' with book=active_shelf.book controls_text="want_to_read" controls_uid=uuid %}
{% include 'snippets/shelve_button/start_reading_modal.html' with book=active_shelf.book controls_text="start_reading" controls_uid=uuid %}
2021-01-17 13:10:59 -05:00
{% include 'snippets/shelve_button/finish_reading_modal.html' with book=active_shelf.book controls_text="finish_reading" controls_uid=uuid readthrough=readthrough %}
2021-01-17 13:10:59 -05:00
{% include 'snippets/shelve_button/progress_update_modal.html' with book=active_shelf_book.book controls_text="progress_update" controls_uid=uuid readthrough=readthrough %}
2021-03-20 20:18:18 -04:00
{% endwith %}
{% endif %}