moviewyrm/fedireads/templates/snippets/shelve_button.html

28 lines
1.1 KiB
HTML
Raw Normal View History

2020-02-21 23:39:25 +00:00
{% load fr_display %}
{% if request.user.is_authenticated %}
<div class="pulldown-button">
<form name="shelve" action="/shelve/" method="post">
2020-02-21 23:39:25 +00:00
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="shelf" value="{% shelve_button_identifier book %}">
2020-04-11 17:35:13 +00:00
<button type="submit" style="">{% shelve_button_text book %}</button></form><div class="pulldown-container">
<button class="pulldown-toggle">
2020-04-11 17:35:13 +00:00
<span class="icon icon-arrow-down"><span class="hidden-text">More shelves</span></span>
</button>
2020-04-09 21:39:12 +00:00
<ul class="pulldown">
<form name="shelve" action="/shelve/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">
{% for shelf in request.user.shelf_set.all %}
2020-04-09 21:39:12 +00:00
<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>
2020-04-09 21:39:12 +00:00
</li>
{% endfor %}
</form>
2020-04-09 21:39:12 +00:00
</ul>
</div>
</div>
2020-02-21 23:39:25 +00:00
{% endif %}