mirror of
https://github.com/bookwyrm-social/bookwyrm.git
synced 2024-11-26 03:21:05 +00:00
36 lines
1.3 KiB
HTML
36 lines
1.3 KiB
HTML
{% extends 'layout.html' %}
|
|
{% load fr_display %}
|
|
{% block content %}
|
|
<div id="content">
|
|
<div>
|
|
<div class="book-preview">
|
|
<img class="book-cover" src="{% if book.cover %}/images/{{ book.cover }}{% else %}/static/images/no_cover.jpg{% endif %}">
|
|
<h1>{{ book.data.title }}</h1>
|
|
by {{ book.authors.first.data.name }}
|
|
{{ rating | stars }} {{ rating }}
|
|
<blockquote>{{ book.data.description | description }}</blockquote>
|
|
</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 %}
|
|
|