2020-12-12 00:39:58 +00:00
{% load humanize %}
2021-01-18 04:19:09 +00:00
< div class = "content block" >
2021-01-17 18:10:59 +00:00
< div id = "hide-edit-readthrough-{{ readthrough.id }}" >
2021-01-07 02:34:21 +00:00
< dl class = "mb-1" >
2020-12-12 00:39:58 +00:00
{% if readthrough.start_date %}
2021-01-07 02:34:21 +00:00
< div class = "is-flex" >
< dt > Started reading:< / dt >
< dd > {{ readthrough.start_date | naturalday }}< / dd >
< / div >
2020-12-12 00:39:58 +00:00
{% endif %}
{% if readthrough.finish_date %}
2021-01-07 02:34:21 +00:00
< div class = "is-flex" >
< dt > Finished reading:< / dt >
< dd > {{ readthrough.finish_date | naturalday }}< / dd >
< / div >
2020-12-12 00:39:58 +00:00
{% endif %}
< / dl >
2021-01-17 18:10:59 +00:00
< div class = "field has-addons" >
< div class = "control" >
2021-01-18 17:03:21 +00:00
{% 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" %}
2021-01-17 18:10:59 +00:00
< / div >
< div class = "control" >
2021-01-18 17:03:21 +00:00
{% 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" %}
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 >
2021-01-18 04:19:09 +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 %}