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 %}
|
|
|
|
|
2021-04-24 13:49:30 +00:00
|
|
|
<section class="block">
|
|
|
|
<div class="columns is-mobile is-multiline is-align-items-baseline">
|
|
|
|
<div class="column is-narrow">
|
|
|
|
<h2 class="title is-4">{% trans "Pending Books" %}</h2>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<p class="column is-narrow"><a href="{% url 'list' list.id %}">{% trans "Go to list" %}</a></p>
|
|
|
|
</div>
|
|
|
|
|
2021-01-31 20:07:54 +00:00
|
|
|
{% if not pending.exists %}
|
2021-04-24 13:49:30 +00:00
|
|
|
<p>{% trans "You're all set!" %}</p>
|
2021-01-31 20:07:54 +00:00
|
|
|
{% else %}
|
2021-04-24 13:49:30 +00:00
|
|
|
|
|
|
|
<dl>
|
2021-01-31 20:07:54 +00:00
|
|
|
{% for item in pending %}
|
2021-04-24 13:49:30 +00:00
|
|
|
{% with book=item.book %}
|
|
|
|
<div
|
|
|
|
class="
|
|
|
|
columns is-gapless
|
|
|
|
is-vcentered is-justify-content-space-between
|
|
|
|
mb-6
|
|
|
|
"
|
|
|
|
>
|
2021-04-27 12:58:30 +00:00
|
|
|
<dt class="column mr-auto">
|
2021-04-24 13:49:30 +00:00
|
|
|
<div class="columns is-mobile is-gapless is-vcentered">
|
|
|
|
<a
|
2021-04-27 12:58:30 +00:00
|
|
|
class="column is-cover"
|
2021-04-24 13:49:30 +00:00
|
|
|
href="{{ book.local_path }}"
|
|
|
|
aria-hidden="true"
|
|
|
|
>
|
2021-04-27 12:58:30 +00:00
|
|
|
{% include 'snippets/book_cover.html' with cover_class='is-w-xs-mobile is-w-s is-h-xs-mobile is-h-s' %}
|
2021-04-24 13:49:30 +00:00
|
|
|
</a>
|
|
|
|
|
2021-04-27 12:58:30 +00:00
|
|
|
<div class="column ml-3">
|
2021-04-24 13:49:30 +00:00
|
|
|
{% include 'snippets/book_titleby.html' %}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</dt>
|
|
|
|
|
2021-04-27 12:58:30 +00:00
|
|
|
<dd class="column is-4-tablet mx-3-tablet my-3-mobile">
|
2021-04-24 13:49:30 +00:00
|
|
|
{% trans "Suggested by" %}
|
|
|
|
|
|
|
|
<a href="{{ item.user.local_path }}">
|
|
|
|
{{ item.user.display_name }}
|
|
|
|
</a>
|
|
|
|
</dd>
|
|
|
|
|
|
|
|
<dd class="column is-narrow 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">
|
|
|
|
<button class="button">{% trans "Approve" %}</button>
|
|
|
|
</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">
|
|
|
|
<button class="button is-danger is-light">{% trans "Discard" %}</button>
|
|
|
|
</form>
|
|
|
|
</dd>
|
|
|
|
</div>
|
|
|
|
{% endwith %}
|
2021-01-31 20:07:54 +00:00
|
|
|
{% endfor %}
|
2021-04-24 13:49:30 +00:00
|
|
|
</dl>
|
2021-01-31 20:07:54 +00:00
|
|
|
{% endif %}
|
|
|
|
</section>
|
|
|
|
{% endblock %}
|