diff --git a/bookwyrm/templates/snippets/book_tiles.html b/bookwyrm/templates/snippets/book_tiles.html index 4fc7df31..85f685a8 100644 --- a/bookwyrm/templates/snippets/book_tiles.html +++ b/bookwyrm/templates/snippets/book_tiles.html @@ -1,16 +1,11 @@ -
+
{% for book in books %} - {% if forloop.counter0|divisibleby:"4" %} -
-
- {% endif %}
{% include 'snippets/book_cover.html' with book=book %} - {% include 'snippets/rate_action.html' with user=request.user book=book %} - {% include 'snippets/shelve_button.html' with book=book %} + {% include 'snippets/shelve_button.html' with book=book switch_mode=True %}
{% endfor %} diff --git a/bookwyrm/templates/snippets/shelve_button.html b/bookwyrm/templates/snippets/shelve_button.html index afbdc970..b5470044 100644 --- a/bookwyrm/templates/snippets/shelve_button.html +++ b/bookwyrm/templates/snippets/shelve_button.html @@ -4,6 +4,10 @@ {% with book.id|uuid as uuid %} {% active_shelf book as active_shelf %}
+ {% 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' %}
+ {% endif %}
{% endwith %} {% endif %} diff --git a/bookwyrm/templates/snippets/switch_edition_button.html b/bookwyrm/templates/snippets/switch_edition_button.html index 9771535a..685aed7c 100644 --- a/bookwyrm/templates/snippets/switch_edition_button.html +++ b/bookwyrm/templates/snippets/switch_edition_button.html @@ -1,5 +1,5 @@
{% csrf_token %} - +