2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2020-12-13 02:25:04 +00:00
|
|
|
{% load bookwyrm_tags %}
|
2021-01-05 00:50:58 +00:00
|
|
|
{% if request.user.is_authenticated %}
|
2021-02-28 02:48:10 +00:00
|
|
|
<span class="is-sr-only">{% trans "Leave a rating" %}</span>
|
2021-01-18 17:57:44 +00:00
|
|
|
<div class="block">
|
|
|
|
<form class="hidden-form" name="rate" action="/post/rating" method="POST">
|
2020-04-03 19:43:49 +00:00
|
|
|
{% csrf_token %}
|
2020-12-17 21:21:21 +00:00
|
|
|
<input type="hidden" name="user" value="{{ request.user.id }}">
|
2020-05-04 00:53:14 +00:00
|
|
|
<input type="hidden" name="book" value="{{ book.id }}">
|
2020-12-17 21:21:21 +00:00
|
|
|
<input type="hidden" name="privacy" value="public">
|
2021-01-18 17:57:44 +00:00
|
|
|
|
2021-04-04 16:05:21 +00:00
|
|
|
{% include 'snippets/form_rate_stars.html' with book=book classes='mb-1 has-text-warning-dark' default_rating=book|user_rating:request.user %}
|
2021-01-18 17:57:44 +00:00
|
|
|
|
|
|
|
<div class="field has-addons hidden">
|
|
|
|
<div class="control">
|
|
|
|
{% include 'snippets/privacy_select.html' with class="is-small" %}
|
|
|
|
</div>
|
|
|
|
<div class="control">
|
2021-02-28 02:48:10 +00:00
|
|
|
<button class="button is-small is-primary" type="submit">{% trans "Rate" %}</button>
|
2021-01-18 17:57:44 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2020-04-03 19:43:49 +00:00
|
|
|
</form>
|
|
|
|
</div>
|
2021-01-05 00:50:58 +00:00
|
|
|
{% endif %}
|