Uses css has-addons for shelve button
This commit is contained in:
parent
ff743ed9d6
commit
c6e5b33970
|
@ -3,29 +3,31 @@
|
||||||
|
|
||||||
{% with book.id|uuid as uuid %}
|
{% with book.id|uuid as uuid %}
|
||||||
{% active_shelf book as active_shelf %}
|
{% active_shelf book as active_shelf %}
|
||||||
<div class="field is-grouped">
|
<div class="field has-addons">
|
||||||
{% if switch_mode and active_shelf.book != book %}
|
<div class="control">
|
||||||
{% include 'snippets/switch_edition_button.html' with edition=book size='is-small' %}
|
{% if switch_mode and active_shelf.book != book %}
|
||||||
{% else %}
|
{% include 'snippets/switch_edition_button.html' with edition=book size='is-small' %}
|
||||||
|
{% else %}
|
||||||
|
|
||||||
{% if active_shelf.shelf.identifier == 'read' %}
|
{% if active_shelf.shelf.identifier == 'read' %}
|
||||||
<button class="button is-small" disabled>
|
<button class="button is-small" disabled>
|
||||||
<span>Read</span> <span class="icon icon-check"></span>
|
<span>Read</span> <span class="icon icon-check"></span>
|
||||||
</button>
|
</button>
|
||||||
{% elif active_shelf.shelf.identifier == 'reading' %}
|
{% 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 %}
|
{% 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' %}
|
{% 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 %}
|
{% include 'snippets/toggle/toggle_button.html' with class="is-small" text="Start reading" controls_text="start-reading" controls_uid=uuid %}
|
||||||
{% else %}
|
{% else %}
|
||||||
<form name="shelve" action="/shelve/" method="post">
|
<form name="shelve" action="/shelve/" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="book" value="{{ active_shelf.book.id }}">
|
<input type="hidden" name="book" value="{{ active_shelf.book.id }}">
|
||||||
<input type="hidden" name="shelf" value="to-read">
|
<input type="hidden" name="shelf" value="to-read">
|
||||||
<button class="button is-small" type="submit">Want to read</button>
|
<button class="button is-small" type="submit">Want to read</button>
|
||||||
</form>
|
</form>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
</div>
|
||||||
|
|
||||||
<div class="dropdown">
|
<div class="dropdown control">
|
||||||
<div class="dropdown-trigger">
|
<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 }}">
|
<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">
|
<div class="button is-small">
|
||||||
|
|
Loading…
Reference in New Issue