mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-12-16 05:06:32 +00:00
Adds shelve buttons to books on author page
This commit is contained in:
parent
3eb3225d2c
commit
de93beca84
2 changed files with 2 additions and 1 deletions
|
@ -110,6 +110,7 @@
|
|||
{% for book in books %}
|
||||
<div class="column is-one-fifth">
|
||||
{% include 'landing/small-book.html' with book=book %}
|
||||
{% include 'snippets/shelve_button/shelve_button.html' with book=book %}
|
||||
</div>
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
|
|
@ -29,7 +29,7 @@ class Author(View):
|
|||
).order_by("-edition_rank")
|
||||
|
||||
books = (
|
||||
models.Edition.objects.filter(
|
||||
models.Edition.viewer_aware_objects(request.user).filter(
|
||||
Q(authors=author) | Q(parent_work__authors=author)
|
||||
)
|
||||
.annotate(default_id=Subquery(default_editions.values("id")[:1]))
|
||||
|
|
Loading…
Reference in a new issue