Add books to lists from the book page

This commit is contained in:
Mouse Reeve
2021-03-15 14:44:03 -07:00
parent 6e6417cb91
commit f0a936f15e
4 changed files with 27 additions and 6 deletions

View File

@ -83,9 +83,10 @@
</div>
<div class="column">
<p>{% include 'snippets/book_titleby.html' with book=book %}</p>
<form name="add-book" method="post" action="{% url 'list-add-book' list.id %}">
<form name="add-book" method="post" action="{% url 'list-add-book' %}">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.id }}">
<input type="hidden" name="list" value="{{ list.id }}">
<button type="submit" class="button is-small is-link">{% if list.curation == 'open' or request.user == list.user %}{% trans "Add" %}{% else %}{% trans "Suggest" %}{% endif %}</button>
</form>
</div>