2021-01-31 20:07:54 +00:00
|
|
|
{% extends 'lists/list_layout.html' %}
|
2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2021-01-31 20:07:54 +00:00
|
|
|
{% block panel %}
|
|
|
|
|
|
|
|
<section class="content block">
|
2021-02-28 02:48:10 +00:00
|
|
|
<h2>{% trans "Pending Books" %}</h2>
|
|
|
|
<p><a href="{% url 'list' list.id %}">{% trans "Go to list" %}</a></p>
|
2021-01-31 20:07:54 +00:00
|
|
|
{% if not pending.exists %}
|
2021-02-28 02:48:10 +00:00
|
|
|
<p>{% trans "You're all set!" %}</p>
|
2021-01-31 20:07:54 +00:00
|
|
|
{% else %}
|
|
|
|
<table class="table is-striped">
|
|
|
|
<tr>
|
|
|
|
<th></th>
|
2021-02-28 02:48:10 +00:00
|
|
|
<th>{% trans "Book" %}</th>
|
|
|
|
<th>{% trans "Suggested by" %}</th>
|
2021-01-31 20:07:54 +00:00
|
|
|
<th></th>
|
|
|
|
</tr>
|
|
|
|
{% for item in pending %}
|
|
|
|
<tr>
|
|
|
|
<td>
|
|
|
|
<a href="{{ book.local_path }}">{% include 'snippets/book_cover.html' with book=item.book size="small" %}</a>
|
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
{% include 'snippets/book_titleby.html' with book=item.book %}
|
|
|
|
</td>
|
|
|
|
<td>
|
2021-02-04 22:27:26 +00:00
|
|
|
{% include 'snippets/username.html' with user=item.user %}
|
2021-01-31 20:07:54 +00:00
|
|
|
</td>
|
|
|
|
<td>
|
|
|
|
<div class="field has-addons">
|
|
|
|
<form class="control" method="POST" action="{% url 'list-curate' list.id %}">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="item" value="{{ item.id }}">
|
|
|
|
<input type="hidden" name="approved" value="true">
|
2021-02-28 02:48:10 +00:00
|
|
|
<button class="button">{% trans "Approve" %}</button>
|
2021-01-31 20:07:54 +00:00
|
|
|
</form>
|
|
|
|
<form class="control" method="POST" action="{% url 'list-curate' list.id %}">
|
|
|
|
{% csrf_token %}
|
|
|
|
<input type="hidden" name="item" value="{{ item.id }}">
|
|
|
|
<input type="hidden" name="approved" value="false">
|
2021-02-28 02:48:10 +00:00
|
|
|
<button class="button is-danger is-light">{% trans "Discard" %}</button>
|
2021-01-31 20:07:54 +00:00
|
|
|
</div>
|
|
|
|
</form>
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
{% endfor %}
|
|
|
|
</table>
|
|
|
|
{% endif %}
|
|
|
|
</section>
|
|
|
|
{% endblock %}
|