2021-01-29 16:51:36 +00:00
|
|
|
{% extends 'components/dropdown.html' %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2021-01-17 19:09:49 +00:00
|
|
|
{% block dropdown-trigger %}
|
2021-02-28 02:48:10 +00:00
|
|
|
<span>{% trans "Change shelf" %}</span>
|
2021-01-17 19:09:49 +00:00
|
|
|
<span class="icon icon-arrow-down" aria-hidden="true"></span>
|
|
|
|
{% endblock %}
|
|
|
|
|
|
|
|
{% block dropdown-list %}
|
|
|
|
{% for shelf in request.user.shelf_set.all %}
|
|
|
|
{% if shelf.identifier != current.identifier %}
|
|
|
|
<li role="menuitem">
|
|
|
|
<form class="dropdown-item pt-0 pb-0" name="shelve" action="/shelve/" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="book" value="{{ book.id }}">
|
2021-03-25 23:57:20 +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-01-18 00:48:05 +00:00
|
|
|
<button class="button is-fullwidth is-small" type="submit">{{ shelf.name }}</button>
|
2021-01-17 19:09:49 +00:00
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
{% endif %}
|
|
|
|
{% endfor %}
|
2021-03-03 19:10:09 +00:00
|
|
|
<li class="navbar-divider" role="presentation"></li>
|
2021-01-17 19:09:49 +00:00
|
|
|
<li>
|
|
|
|
<form class="dropdown-item pt-0 pb-0" name="shelve" action="/unshelve/" method="post">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="book" value="{{ book.id }}">
|
|
|
|
<input type="hidden" name="shelf" value="{{ current.id }}">
|
2021-02-28 02:48:10 +00:00
|
|
|
<button class="button is-fullwidth is-small is-danger is-light" type="submit">{% trans "Unshelve" %}</button>
|
2021-01-17 19:09:49 +00:00
|
|
|
</form>
|
|
|
|
</li>
|
|
|
|
{% endblock %}
|