moviewyrm/fedireads/templates/book.html

71 lines
2.6 KiB
HTML
Raw Normal View History

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 %}
<div id="sidebar">
2020-01-29 01:23:38 +00:00
<div>
2020-03-07 06:56:44 +00:00
<h2><q>{{ book.title }}</q> and You</h2>
<p>{% if shelf %}On shelf <q>{{ shelf.name }}</q>{% endif %}</p>
{% include 'snippets/shelve-button.html' with book=book pulldown=True %}
2020-02-21 06:19:19 +00:00
<div id="tag-cloud">
{% for tag in user_tags %}
{% include 'snippets/tag.html' with tag=tag user=request.user user_tags=user_tag_names %}
2020-02-21 06:19:19 +00:00
{% endfor %}
</div>
<form class="tag-form" name="tag" action="/tag/" method="post">
{% csrf_token %}
<input type="hidden" name="book" value="{{ book.openlibrary_key }}"></input>
{{ tag_form.as_p }}
<button type="submit">Add tag</button>
</form>
2020-02-23 22:57:31 +00:00
{% for review in user_reviews %}
2020-03-10 00:27:54 +00:00
{% include 'snippets/status.html' with status=review hide_book=True depth=1 %}
2020-02-23 22:57:31 +00:00
{% endfor %}
2020-02-21 06:19:19 +00:00
</div>
</div>
<div id="content">
<div>
2020-03-07 06:56:44 +00:00
<h2><q>{{ book.title }}</q> by
{% include 'snippets/authors.html' with book=book %}</h2>
2020-03-07 06:56:44 +00:00
{% if book.parent_work %}<p>Edition of <a href="/book/{{ book.parent_work.openlibrary_key }}">{{ book.parent_work.title }}</a></p>{% endif %}
<div class="book-preview">
2020-03-07 06:56:44 +00:00
{% include 'snippets/book_cover.html' with book=book size=large %}
<p>{{ active_tab }} rating: {{ rating | stars }}</p>
2020-03-10 00:27:54 +00:00
{% if book.description %}
2020-03-07 06:56:44 +00:00
<blockquote>{{ book.description | description }}</blockquote>
{% 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>
</div>
</div>
{% include 'snippets/tabs.html' with tabs=feed_tabs active_tab=active_tab path=path %}
2020-02-21 06:19:19 +00:00
<div class="reviews">
<h2>Reviews</h2>
{% if not reviews %}
<p>No reviews yet!</p>
{% endif %}
2020-01-29 23:32:43 +00:00
<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>
<p>Average rating: {{ rating | stars }}</p>
2020-01-28 02:47:54 +00:00
{% for review in reviews %}
2020-03-10 00:27:54 +00:00
{% include 'snippets/status.html' with status=review hide_book=True depth=1 %}
2020-01-28 02:47:54 +00:00
{% endfor %}
</div>
</div>
{% endblock %}