mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-14 20:26:32 +00:00
Switch edition from editions list page
This commit is contained in:
parent
8a1800ea26
commit
21b0bec8d7
3 changed files with 8 additions and 8 deletions
|
@ -1,16 +1,11 @@
|
||||||
<div class="columns">
|
<div class="columns is-multiline">
|
||||||
{% for book in books %}
|
{% for book in books %}
|
||||||
{% if forloop.counter0|divisibleby:"4" %}
|
|
||||||
</div>
|
|
||||||
<div class="columns">
|
|
||||||
{% endif %}
|
|
||||||
<div class="column is-narrow">
|
<div class="column is-narrow">
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<a href="/book/{{ book.id }}">
|
<a href="/book/{{ book.id }}">
|
||||||
{% include 'snippets/book_cover.html' with book=book %}
|
{% include 'snippets/book_cover.html' with book=book %}
|
||||||
</a>
|
</a>
|
||||||
{% include 'snippets/rate_action.html' with user=request.user book=book %}
|
{% include 'snippets/shelve_button.html' with book=book switch_mode=True %}
|
||||||
{% include 'snippets/shelve_button.html' with book=book %}
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
{% 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 is-grouped">
|
||||||
|
{% 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' %}
|
{% 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>
|
||||||
|
@ -62,6 +66,7 @@
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
{% endwith %}
|
{% endwith %}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
<form name="switch-edition" action="/switch-edition" method="POST">
|
<form name="switch-edition" action="/switch-edition" method="POST">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="edition" value="{{ edition.id }}">
|
<input type="hidden" name="edition" value="{{ edition.id }}">
|
||||||
<button class="button">Switch to this edition</button>
|
<button class="button {{ size }}">Switch to this edition</button>
|
||||||
</form>
|
</form>
|
||||||
|
|
Loading…
Reference in a new issue