2020-12-12 00:39:58 +00:00
{% load humanize %}
< div class = "content block" >
2021-01-17 18:10:59 +00:00
< div id = "hide-edit-readthrough-{{ readthrough.id }}" >
2021-01-22 20:51:23 +00:00
< div class = "columns" >
< div class = "column" >
Progress Updates:
< / dl >
< ul >
2021-01-30 02:06:17 +00:00
{% if readthrough.finish_date or readthrough.progress %}
2021-01-22 20:54:25 +00:00
< li > {% if readthrough.finish_date %} {{ readthrough.finish_date | naturalday }}: finished {% else %}{% if readthrough.progress_mode == 'PG' %}on page {{ readthrough.progress }}{% if book.pages %} of {{ book.pages }}{% endif %}
{% else %}{{ readthrough.progress }}%{% endif %}{% endif %}
2021-01-30 02:06:17 +00:00
{% if readthrough.progress %}
{% include 'snippets/toggle/toggle_button.html' with text="Show all updates" controls_text="updates" controls_uid=readthrough.id class="is-small" %}
2021-01-22 20:51:23 +00:00
< ul id = "updates-{{ readthrough.id }}" class = "hidden" >
{% for progress_update in readthrough.progress_updates %}
< li >
< form name = "delete-update" action = "/delete-progressupdate" method = "POST" >
{% csrf_token %}
{{ progress_update.created_date | naturalday }}:
{% if progress_update.mode == 'PG' %}
page {{ progress_update.progress }} of {{ book.pages }}
{% else %}
{{ progress_update.progress }}%
{% endif %}
< input type = "hidden" name = "id" value = "{{ progress_update.id }}" / >
< button type = "submit" class = "button is-small" for = "delete-progressupdate-{{ progress_update.id }}" role = "button" tabindex = "0" >
< span class = "icon icon-x" title = "Delete this progress update" >
< span class = "is-sr-only" > Delete this progress update< / span >
< / span >
< / button >
< / form >
< / li >
{% endfor %}
< / ul >
2021-01-30 02:06:17 +00:00
{% endif %}
2021-01-22 20:51:23 +00:00
< / li >
{% endif %}
< li > {{ readthrough.start_date | naturalday }}: started< / li >
< / ul >
2021-01-17 18:10:59 +00:00
< / div >
2021-01-22 20:51:23 +00:00
< div class = "column is-narrow" >
< div class = "field has-addons" >
< div class = "control" >
{% include 'snippets/toggle/toggle_button.html' with class="is-small" text="Edit read dates" icon="pencil" controls_text="edit-readthrough" controls_uid=readthrough.id focus="edit-readthrough" %}
< / div >
< div class = "control" >
{% include 'snippets/toggle/toggle_button.html' with class="is-small" text="Delete these read dates" icon="x" controls_text="delete-readthrough" controls_uid=readthrough.id focus="modal-title-delete-readthrough" %}
< / div >
< / div >
2021-01-17 18:10:59 +00:00
< / div >
2020-12-12 00:39:58 +00:00
< / div >
< / div >
< / div >
2021-01-18 17:03:21 +00:00
< div class = "box hidden" id = "edit-readthrough-{{ readthrough.id }}" tabindex = "0" >
< h3 class = "title is-5" > Edit read dates< / h3 >
2021-01-17 18:10:59 +00:00
< form name = "edit-readthrough" action = "/edit-readthrough" method = "post" >
{% include 'snippets/readthrough_form.html' with readthrough=readthrough %}
< div class = "field is-grouped" >
< button class = "button is-primary" type = "submit" > Save< / button >
{% include 'snippets/toggle/close_button.html' with text="Cancel" controls_text="edit-readthrough" controls_uid=readthrough.id %}
2020-12-12 00:39:58 +00:00
< / div >
2021-01-17 18:10:59 +00:00
< / form >
2020-12-12 00:39:58 +00:00
< / div >
2021-01-17 18:10:59 +00:00
{% include 'snippets/delete_readthrough_modal.html' with controls_text="delete-readthrough" controls_uid=readthrough.id %}