mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-17 21:56:36 +00:00
parent
3479185f67
commit
d51006b908
2 changed files with 17 additions and 13 deletions
|
@ -15,7 +15,7 @@
|
||||||
<label for="book-{{ book.id }}-radio">
|
<label for="book-{{ book.id }}-radio">
|
||||||
{% include 'snippets/book_cover.html' with book=book %}
|
{% include 'snippets/book_cover.html' with book=book %}
|
||||||
</label>
|
</label>
|
||||||
{% include 'snippets/shelve_button.html' with book=book %}
|
{% include 'snippets/shelve_button.html' with book=book hide_pulldown=True %}
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -6,22 +6,26 @@
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="book" value="{{ book.id }}">
|
<input type="hidden" name="book" value="{{ book.id }}">
|
||||||
<input type="hidden" name="shelf" value="{% shelve_button_identifier book %}">
|
<input type="hidden" name="shelf" value="{% shelve_button_identifier book %}">
|
||||||
<button type="submit" style="">{% shelve_button_text book %}</button></form><div class="pulldown-container">
|
<button type="submit" style="">{% shelve_button_text book %}</button>
|
||||||
|
</form>
|
||||||
|
{% if not hide_pulldown %}
|
||||||
|
<div class="pulldown-container">
|
||||||
<button class="pulldown-toggle">
|
<button class="pulldown-toggle">
|
||||||
<span class="icon icon-arrow-down"><span class="hidden-text">More shelves</span></span>
|
<span class="icon icon-arrow-down"><span class="hidden-text">More shelves</span></span>
|
||||||
</button>
|
</button>
|
||||||
<ul class="pulldown">
|
<ul class="pulldown">
|
||||||
<form name="shelve" action="/shelve/" method="post">
|
<form name="shelve" action="/shelve/" method="post">
|
||||||
{% csrf_token %}
|
{% csrf_token %}
|
||||||
<input type="hidden" name="book" value="{{ book.id }}">
|
<input type="hidden" name="book" value="{{ book.id }}">
|
||||||
{% for shelf in request.user.shelf_set.all %}
|
{% for shelf in request.user.shelf_set.all %}
|
||||||
<li>
|
<li>
|
||||||
<button name="shelf" type="submit" value="{{ shelf.identifier }}" {% if shelf in book.shelf_set.all %} disabled {% endif %}>{{ shelf.name }} {% if shelf in book.shelf_set.all %} ✓ {% endif %}</button>
|
<button name="shelf" type="submit" value="{{ shelf.identifier }}" {% if shelf in book.shelf_set.all %} disabled {% endif %}>{{ shelf.name }} {% if shelf in book.shelf_set.all %} ✓ {% endif %}</button>
|
||||||
</li>
|
</li>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</form>
|
</form>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue