bookwyrm/fedireads/templates/book.html
2020-02-10 21:09:04 -08:00

32 lines
1 KiB
HTML

{% extends 'layout.html' %}
{% load fr_display %}
{% block content %}
<div id="content">
<div>
<div class="book-preview">
{% include 'book_snippet.html' with book=book size=large rating=rating description=True %}
</div>
</div>
<div class="reviews">
<h2>Reviews</h2>
{% if not reviews %}
<p>No reviews yet!</p>
{% endif %}
<form class="review-form" name="review" action="/review/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.openlibrary_key }}"></input>
{{ review_form.as_p }}
<button type="submit">Post review</button>
</form>
{% for review in reviews %}
<div class="review">
<h4>{{ review.name }}
<small>{{ review.rating | stars }} stars, by {{ review.user.username }}</small>
</h4>
<blockquote>{{ review.review_content }}</blockquote>
</div>
{% endfor %}
</div>
</div>
{% endblock %}