forked from mirrors/bookwyrm
485b0fa0f3
- Create a snippet to regroup similar code. - Reduce and document tricky logic of CSS. - Add i18n strings.
24 lines
951 B
HTML
24 lines
951 B
HTML
{% load i18n %}
|
|
{% load bookwyrm_tags %}
|
|
{% if request.user.is_authenticated %}
|
|
<span class="is-sr-only">{% trans "Leave a rating" %}</span>
|
|
<div class="block">
|
|
<form class="hidden-form" name="rate" action="/post/rating" method="POST">
|
|
{% csrf_token %}
|
|
<input type="hidden" name="user" value="{{ request.user.id }}">
|
|
<input type="hidden" name="book" value="{{ book.id }}">
|
|
<input type="hidden" name="privacy" value="public">
|
|
|
|
{% include 'snippets/form_rate_stars.html' with book=book classes='mb-1 has-text-warning-dark' %}
|
|
|
|
<div class="field has-addons hidden">
|
|
<div class="control">
|
|
{% include 'snippets/privacy_select.html' with class="is-small" %}
|
|
</div>
|
|
<div class="control">
|
|
<button class="button is-small is-primary" type="submit">{% trans "Rate" %}</button>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
{% endif %}
|