2021-01-29 16:51:36 +00:00
|
|
|
{% extends 'components/dropdown.html' %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2021-11-15 09:59:22 +00:00
|
|
|
{% load bookwyrm_tags %}
|
|
|
|
|
2021-01-17 19:09:49 +00:00
|
|
|
{% block dropdown-trigger %}
|
2021-03-31 16:22:23 +00:00
|
|
|
<span>{% trans "Move book" %}</span>
|
2021-01-17 19:09:49 +00:00
|
|
|
<span class="icon icon-arrow-down" aria-hidden="true"></span>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block dropdown-list %}
|
2021-05-23 00:58:08 +00:00
|
|
|
{% for shelf in user_shelves %}
|
2021-11-16 08:26:49 +00:00
|
|
|
{% if shelf.editable %}
|
2021-04-21 17:35:50 +00:00
|
|
|
<li role="menuitem" class="dropdown-item p-0">
|
|
|
|
<form name="shelve" action="/shelve/" method="post">
|
2021-01-17 19:09:49 +00:00
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="book" value="{{ book.id }}">
|
2021-03-31 22:00:49 +00:00
|
|
|
<input type="hidden" name="change-shelf-from" value="{{ current.identifier }}">
|
2021-01-17 19:09:49 +00:00
|
|
|
<input type="hidden" name="shelf" value="{{ shelf.identifier }}">
|
2021-04-21 17:36:11 +00:00
|
|
|
<button class="button is-fullwidth is-small shelf-option is-radiusless is-white" type="submit" {% if shelf.identifier == current.identifier %}disabled{% endif %}><span>{{ shelf.name }}</span></button>
|
2021-01-17 19:09:49 +00:00
|
|
|
</form>
|
|
|
|
</li>
|
2021-11-15 09:59:22 +00:00
|
|
|
{% endif %}
|
2021-01-17 19:09:49 +00:00
|
|
|
{% endfor %}
|
2021-04-21 17:35:50 +00:00
|
|
|
<li class="navbar-divider" role="separator"></li>
|
|
|
|
<li role="menuitem" class="dropdown-item p-0">
|
|
|
|
<form name="shelve" action="/unshelve/" method="post">
|
2021-01-17 19:09:49 +00:00
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="book" value="{{ book.id }}">
|
|
|
|
<input type="hidden" name="shelf" value="{{ current.id }}">
|
2021-04-21 17:36:11 +00:00
|
|
|
<button class="button is-fullwidth is-small is-radiusless is-danger is-light" type="submit">{% trans "Remove" %}</button>
|
2021-01-17 19:09:49 +00:00
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
{% endblock %}
|