mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-03 06:46:39 +00:00
27 lines
919 B
HTML
27 lines
919 B
HTML
{% load fr_display %}
|
|
{% if not pulldown %}
|
|
|
|
<form name="shelve" action="/shelve/" method="post">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="book" value="{{ book.id }}"></input>
|
|
<input type="hidden" name="shelf" value="{% shelve_button_identifier book %}"></input>
|
|
<button class="secondary" type="submit">{% shelve_button_text book %}</button>
|
|
</form>
|
|
|
|
{% else %}
|
|
|
|
<form name="shelve" action="/shelve/" method="post">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="book" value="{{ book.id }}"></input>
|
|
|
|
<select name="shelf">
|
|
{% for shelf in request.user.shelf_set.all %}
|
|
<option value="{{ shelf.identifier }}" {% if book in shelf.books.all %} selected {% endif %}>
|
|
{{ shelf.name }}{% if book in shelf.books.all %} ✓ {% endif %}
|
|
</option>
|
|
{% endfor %}
|
|
</select>
|
|
<button class="secondary" type="submit">Shelve</button>
|
|
</form>
|
|
|
|
{% endif %}
|