handle work/edition concepts in ui

This commit is contained in:
Mouse Reeve
2020-03-30 15:03:21 -07:00
parent f7fb9dde99
commit defd026ed0
6 changed files with 69 additions and 28 deletions

View File

@ -14,13 +14,12 @@
{% endif %}
</h2>
<div>
{% if book.parent_work %}<p>Edition of <a href="/book/{{ book.parent_work.fedireads_key }}">{{ book.parent_work.title }}</a></p>{% endif %}
<div class="book-preview">
{% include 'snippets/book_cover.html' with book=book size=large %}
<p>{{ active_tab }} rating: {{ rating | stars }}</p>
{% if book.description %}
<blockquote>{{ book.description | description }}</blockquote>
{% if book.parent_work.description %}
<blockquote>{{ book.parent_work.description | description }}</blockquote>
{% endif %}
<div>
<div id="tag-cloud">
@ -29,6 +28,7 @@
{% endfor %}
</div>
</div>
<p><a href="/editions/{{ book.parent_work.id }}">{{ book.parent_work.edition_set.count }} other editions</a></p>
{% include 'snippets/shelve_button.html' %}

View File

@ -0,0 +1,18 @@
{% extends 'layout.html' %}
{% load fr_display %}
{% block content %}
<div class="content-container">
<h2>Editions of <a href="/book/{{ work.fedireads_key }}">"{{ work.title }}"</a></h2>
<div class="book-grid row wrap">
{% for book in editions %}
<div class="book-preview">
<a href="{{ book.absolute_id }}">
{% include 'snippets/book_cover.html' with book=book %}
</a>
{% include 'snippets/shelve_button.html' with book=book %}
</div>
{% endfor %}
</div>
</div>
{% endblock %}