Merge pull request #2448 from bookwyrm-social/search-review-counts
Show review counts in search results
This commit is contained in:
commit
41d5102c72
2 changed files with 19 additions and 1 deletions
|
@ -1,5 +1,7 @@
|
|||
{% extends 'search/layout.html' %}
|
||||
{% load i18n %}
|
||||
{% load humanize %}
|
||||
{% load book_display_tags %}
|
||||
|
||||
{% block panel %}
|
||||
|
||||
|
@ -19,8 +21,17 @@
|
|||
</strong>
|
||||
</p>
|
||||
<p>
|
||||
{% with book_review_count=result|review_count %}
|
||||
{% blocktrans trimmed count counter=book_review_count with formatted_review_count=book_review_count|intcomma %}
|
||||
{{ formatted_review_count }} review
|
||||
{% plural %}
|
||||
{{ formatted_review_count }} reviews
|
||||
{% endblocktrans %}
|
||||
{% endwith %}
|
||||
|
||||
{% if result.first_published_date or result.published_date %}
|
||||
({% firstof result.first_published_date.year result.published_date.year %})
|
||||
{% firstof result.first_published_date.year result.published_date.year as pub_year %}
|
||||
{% blocktrans %}(published {{ pub_year }}){% endblocktrans %}
|
||||
{% endif %}
|
||||
</p>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue