forked from mirrors/bookwyrm
Make progress updates toggle-able
Also move into their own section
This commit is contained in:
parent
c9b2b4efac
commit
ff7d87b1c4
2 changed files with 12 additions and 4 deletions
|
@ -78,10 +78,6 @@
|
|||
<dt>On page:</dt>
|
||||
<dd>{{ readthrough.pages_read }} of {{ book.pages }}</dd>
|
||||
{% endif %}
|
||||
{% for progress_update in readthrough.progress_updates %}
|
||||
<dt>On {{ progress_update.date | naturalday }} you were on:</dt>
|
||||
<dd>{{ progress_update.progress }} of {{ book.pages }}</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
<div class="field is-grouped">
|
||||
<label class="button is-small" for="edit-readthrough-{{ readthrough.id }}" role="button" tabindex="0">
|
||||
|
@ -95,6 +91,17 @@
|
|||
</span>
|
||||
</label>
|
||||
</div>
|
||||
{% if show_progress %}
|
||||
Progress Updates:
|
||||
<dl class="progress-updates">
|
||||
{% for progress_update in readthrough.progress_updates %}
|
||||
<dt>{{ progress_update.date | naturalday }}:</dt>
|
||||
<dd>{{ progress_update.progress }} of {{ book.pages }}</dd>
|
||||
{% endfor %}
|
||||
</dl>
|
||||
{% elif readthrough.progress_updates|length %}
|
||||
<a href="?showprogress">Show {{ readthrough.progress_updates|length }} Progress Updates</a>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
@ -581,6 +581,7 @@ def book_page(request, book_id):
|
|||
'tags': tags,
|
||||
'user_tags': user_tags,
|
||||
'readthroughs': readthroughs,
|
||||
'show_progress': ('showprogress' in request.GET),
|
||||
'path': '/book/%s' % book_id,
|
||||
'info_fields': [
|
||||
{'name': 'ISBN', 'value': book.isbn_13},
|
||||
|
|
Loading…
Reference in a new issue