forked from mirrors/bookwyrm
Uses css has-addons for shelve button
This commit is contained in:
parent
ff743ed9d6
commit
c6e5b33970
1 changed files with 23 additions and 21 deletions
|
@ -3,29 +3,31 @@
|
|||
|
||||
{% with book.id|uuid as uuid %}
|
||||
{% active_shelf book as active_shelf %}
|
||||
<div class="field is-grouped">
|
||||
{% if switch_mode and active_shelf.book != book %}
|
||||
{% include 'snippets/switch_edition_button.html' with edition=book size='is-small' %}
|
||||
{% else %}
|
||||
<div class="field has-addons">
|
||||
<div class="control">
|
||||
{% if switch_mode and active_shelf.book != book %}
|
||||
{% include 'snippets/switch_edition_button.html' with edition=book size='is-small' %}
|
||||
{% else %}
|
||||
|
||||
{% 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 %}
|
||||
{% 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 %}
|
||||
{% 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 %}
|
||||
{% 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 %}
|
||||
{% 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 %}
|
||||
{% 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 %}
|
||||
</div>
|
||||
|
||||
<div class="dropdown">
|
||||
<div class="dropdown control">
|
||||
<div class="dropdown-trigger">
|
||||
<label for="shelf-select-dropdown-{{ uuid }}-toggle" role="button" aria-expanded="false" class="pulldown-menu" tabindex="0" aria-haspopup="true" aria-controls="shelf-select-{{ uuid }}">
|
||||
<div class="button is-small">
|
||||
|
|
Loading…
Reference in a new issue