forked from mirrors/bookwyrm
curation ui
This commit is contained in:
parent
846489e88e
commit
a6c5341ad1
2 changed files with 46 additions and 0 deletions
|
@ -20,6 +20,51 @@
|
|||
{% include 'lists/form.html' %}
|
||||
</form>
|
||||
|
||||
{% if pending.exists %}
|
||||
<div class="block">
|
||||
<div>
|
||||
<p>{{ pending.count }} book{{pending.count | pluralize }} awaiting your approval</p>
|
||||
{% include 'snippets/toggle/open_button.html' with text="Curate suggestions" controls_text="pending-books" class="is-small" %}
|
||||
</div>
|
||||
<div class="box content hidden" id="pending-books">
|
||||
<header class="columns is-mobile">
|
||||
<h2 class="column">Pending Books</h2>
|
||||
<div class="column is-narrow">
|
||||
{% include 'snippets/toggle/toggle_button.html' with label="close" class="delete" nonbutton=True controls_text="pending-books" %}
|
||||
</div>
|
||||
</header>
|
||||
<table class="table is-striped">
|
||||
<tr>
|
||||
<th></th>
|
||||
<th>Book</th>
|
||||
<th>Suggested by</th>
|
||||
<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>
|
||||
{% include 'snippets/username.html' with user=item.added_by %}
|
||||
</td>
|
||||
<td class="field has-addons">
|
||||
<div class="control">
|
||||
<button class="button">Approve</button>
|
||||
</div>
|
||||
<div class="control">
|
||||
<button class="button is-danger is-light">Reject</button>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="columns content">
|
||||
<section class="column is-three-quarters">
|
||||
|
|
|
@ -76,6 +76,7 @@ class List(View):
|
|||
'title': '%s | Lists' % book_list.name,
|
||||
'list': book_list,
|
||||
'items': book_list.listitem_set.filter(approved=True),
|
||||
'pending': book_list.listitem_set.filter(approved=False),
|
||||
'suggested_books': suggestions,
|
||||
'list_form': forms.ListForm(instance=book_list),
|
||||
'query': query or ''
|
||||
|
|
Loading…
Reference in a new issue