Add helpful/unhelpful buttons to reviews

This commit is contained in:
Koen Bolhuis 2018-10-09 21:44:32 +02:00
parent a59b88a5a6
commit a119b9c85d
1 changed files with 4 additions and 0 deletions

View File

@ -16,6 +16,10 @@
<div class="review-block-description">{{ review.content }}</div>
<div>
<p>Was this review helpful?
<a data-review-id="{{ review.pk }}" class="btn btn-light btn-sm vote-up"><span class="glyphicon glyphicon-thumbs-up"></span> Yes</a>
<a data-review-id="{{ review.pk }}" class="btn btn-light btn-sm vote-down"><span class="glyphicon glyphicon-thumbs-down"></span> No</a>
</p>
<span title="{{ review.getHelpfulVoteCount }} people found this review helpful">{{ review.getHelpfulVoteCount }} <span class="glyphicon glyphicon-thumbs-up"></span></span> /
<span title="{{ review.getUnhelpfulVoteCount }} people found this review unhelpful">{{ review.getUnhelpfulVoteCount }} <span class="glyphicon glyphicon-thumbs-down"></span></span>
</div>