2020-01-28 02:47:54 +00:00
|
|
|
{% extends 'layout.html' %}
|
2020-01-29 23:10:32 +00:00
|
|
|
{% load fr_display %}
|
2020-01-28 02:47:54 +00:00
|
|
|
{% block content %}
|
2020-03-28 22:06:16 +00:00
|
|
|
<div class="content-container user-profile">
|
2020-03-17 00:19:38 +00:00
|
|
|
<h2><q>{{ book.title }}</q> by
|
2020-03-28 22:06:16 +00:00
|
|
|
{% include 'snippets/authors.html' with book=book %}
|
|
|
|
|
|
|
|
{% if request.user.is_authenticated %}
|
|
|
|
<a href="{{ book.fedireads_key }}/edit" class="edit-link">edit
|
|
|
|
<span class="icon icon-pencil">
|
|
|
|
<span class="hidden-text">Edit Book</span>
|
|
|
|
</span>
|
|
|
|
</a>
|
|
|
|
{% endif %}
|
|
|
|
</h2>
|
2020-01-29 01:23:38 +00:00
|
|
|
<div>
|
2020-02-23 22:26:03 +00:00
|
|
|
<div class="book-preview">
|
2020-03-07 06:56:44 +00:00
|
|
|
|
2020-02-23 22:26:03 +00:00
|
|
|
{% include 'snippets/book_cover.html' with book=book size=large %}
|
|
|
|
<p>{{ active_tab }} rating: {{ rating | stars }}</p>
|
2020-03-30 22:03:21 +00:00
|
|
|
{% if book.parent_work.description %}
|
|
|
|
<blockquote>{{ book.parent_work.description | description }}</blockquote>
|
2020-02-23 22:26:03 +00:00
|
|
|
{% endif %}
|
|
|
|
<div>
|
|
|
|
<div id="tag-cloud">
|
|
|
|
{% for tag in tags %}
|
|
|
|
{% include 'snippets/tag.html' with tag=tag user=request.user user_tags=user_tag_names %}
|
|
|
|
{% endfor %}
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-03-30 22:03:21 +00:00
|
|
|
<p><a href="/editions/{{ book.parent_work.id }}">{{ book.parent_work.edition_set.count }} other editions</a></p>
|
2020-02-23 22:26:03 +00:00
|
|
|
|
2020-03-27 15:36:57 +00:00
|
|
|
{% include 'snippets/shelve_button.html' %}
|
|
|
|
|
2020-02-23 22:26:03 +00:00
|
|
|
</div>
|
2020-03-28 22:06:16 +00:00
|
|
|
<div>
|
|
|
|
{% if request.user.is_authenticated and not book.cover %}
|
|
|
|
<form name="add-cover" method="POST" action="/upload_cover/{{book.id}}" enctype="multipart/form-data">
|
|
|
|
{% csrf_token %}
|
|
|
|
{{ cover_form.as_p }}
|
|
|
|
<button type="submit">Add cover</button>
|
|
|
|
</form>
|
|
|
|
{% endif %}
|
|
|
|
</div>
|
2020-02-23 22:26:03 +00:00
|
|
|
</div>
|
2020-03-17 00:19:38 +00:00
|
|
|
</div>
|
2020-02-23 22:26:03 +00:00
|
|
|
|
2020-03-27 15:05:27 +00:00
|
|
|
{% if request.user.is_authenticated %}
|
2020-03-17 00:19:38 +00:00
|
|
|
<div class="content-container">
|
|
|
|
<h2>Leave a review</h2>
|
|
|
|
<form class="review-form" name="review" action="/review/" method="post">
|
|
|
|
{% csrf_token %}
|
2020-03-27 23:36:52 +00:00
|
|
|
<input type="hidden" name="book" value="{{ book.fedireads_key }}"></input>
|
2020-03-17 00:19:38 +00:00
|
|
|
{{ review_form.as_p }}
|
|
|
|
<button type="submit">Post review</button>
|
|
|
|
</form>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content-container tabs">
|
2020-02-23 22:26:03 +00:00
|
|
|
{% include 'snippets/tabs.html' with tabs=feed_tabs active_tab=active_tab path=path %}
|
2020-01-28 02:47:54 +00:00
|
|
|
</div>
|
2020-03-27 15:05:27 +00:00
|
|
|
{% endif %}
|
2020-03-17 00:19:38 +00:00
|
|
|
|
|
|
|
{% if not reviews %}
|
|
|
|
<div class="content-container">
|
|
|
|
<p>No reviews yet!</p>
|
|
|
|
</div>
|
|
|
|
{% endif %}
|
|
|
|
|
|
|
|
{% for review in reviews %}
|
|
|
|
<div class="content-container">
|
|
|
|
{% include 'snippets/status.html' with status=review hide_book=True depth=1 %}
|
|
|
|
</div>
|
|
|
|
{% endfor %}
|
2020-01-28 02:47:54 +00:00
|
|
|
{% endblock %}
|
|
|
|
|