2021-02-28 02:48:10 +00:00
|
|
|
{% load i18n %}
|
2020-12-12 00:39:58 +00:00
|
|
|
{% load humanize %}
|
2021-03-29 12:20:35 +00:00
|
|
|
{% load tz %}
|
2021-06-14 23:04:58 +00:00
|
|
|
<div class="content">
|
2021-08-09 01:40:47 +00:00
|
|
|
<div id="hide_edit_readthrough_{{ readthrough.id }}" class="box is-shadowless has-background-white-bis">
|
2021-01-22 20:51:23 +00:00
|
|
|
<div class="columns">
|
|
|
|
<div class="column">
|
2021-02-28 02:48:10 +00:00
|
|
|
{% trans "Progress Updates:" %}
|
2021-01-22 20:51:23 +00:00
|
|
|
<ul>
|
2021-01-30 02:06:17 +00:00
|
|
|
{% if readthrough.finish_date or readthrough.progress %}
|
2021-04-02 03:22:42 +00:00
|
|
|
<li>
|
|
|
|
{% if readthrough.finish_date %}
|
|
|
|
{{ readthrough.finish_date | localtime | naturalday }}: {% trans "finished" %}
|
|
|
|
{% else %}
|
|
|
|
|
|
|
|
{% if readthrough.progress_mode == 'PG' %}
|
|
|
|
{% include 'snippets/page_text.html' with page=readthrough.progress total_pages=book.pages %}
|
|
|
|
{% else %}
|
|
|
|
{{ readthrough.progress }}%
|
|
|
|
{% endif %}
|
|
|
|
{% endif %}
|
|
|
|
|
2021-01-30 02:06:17 +00:00
|
|
|
{% if readthrough.progress %}
|
2021-03-01 01:10:30 +00:00
|
|
|
{% trans "Show all updates" as button_text %}
|
|
|
|
{% include 'snippets/toggle/toggle_button.html' with text=button_text controls_text="updates" controls_uid=readthrough.id class="is-small" %}
|
2021-08-09 01:40:47 +00:00
|
|
|
<ul id="updates_{{ readthrough.id }}" class="is-hidden">
|
2021-01-22 20:51:23 +00:00
|
|
|
{% 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' %}
|
2021-04-02 03:22:42 +00:00
|
|
|
{% include 'snippets/page_text.html' with page=progress_update.progress total_pages=book.pages %}
|
2021-01-22 20:51:23 +00:00
|
|
|
{% else %}
|
|
|
|
{{ progress_update.progress }}%
|
|
|
|
{% endif %}
|
|
|
|
<input type="hidden" name="id" value="{{ progress_update.id }}"/>
|
2021-08-09 01:40:47 +00:00
|
|
|
<button type="submit" class="button is-small" for="delete_progressupdate_{{ progress_update.id }}" role="button" tabindex="0">
|
2021-01-22 20:51:23 +00:00
|
|
|
<span class="icon icon-x" title="Delete this progress update">
|
2021-02-28 02:48:10 +00:00
|
|
|
<span class="is-sr-only">{% trans "Delete this progress update" %}</span>
|
2021-01-22 20:51:23 +00:00
|
|
|
</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 %}
|
2021-04-30 19:07:59 +00:00
|
|
|
{% if readthrough.start_date %}
|
2021-03-29 12:20:35 +00:00
|
|
|
<li>{{ readthrough.start_date | localtime | naturalday }}: {% trans "started" %}</li>
|
2021-04-30 19:07:59 +00:00
|
|
|
{% endif %}
|
2021-01-22 20:51:23 +00:00
|
|
|
</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">
|
2021-03-01 01:10:30 +00:00
|
|
|
{% trans "Edit read dates" as button_text %}
|
2021-08-09 01:40:47 +00:00
|
|
|
{% include 'snippets/toggle/toggle_button.html' with class="is-small" text=button_text icon="pencil" controls_text="edit_readthrough" controls_uid=readthrough.id focus="edit_readthrough" %}
|
2021-01-22 20:51:23 +00:00
|
|
|
</div>
|
|
|
|
<div class="control">
|
2021-03-01 01:10:30 +00:00
|
|
|
{% trans "Delete these read dates" as button_text %}
|
2021-08-09 01:40:47 +00:00
|
|
|
{% include 'snippets/toggle/toggle_button.html' with class="is-small" text=button_text icon="x" controls_text="delete_readthrough" controls_uid=readthrough.id focus="modal_title_delete_readthrough" %}
|
2021-01-22 20:51:23 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2021-01-17 18:10:59 +00:00
|
|
|
</div>
|
2020-12-12 00:39:58 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
2021-08-09 01:40:47 +00:00
|
|
|
<div class="box is-hidden" id="edit_readthrough_{{ readthrough.id }}" tabindex="0">
|
2021-02-28 02:48:10 +00:00
|
|
|
<h3 class="title is-5">{% trans "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">
|
2021-02-28 02:48:10 +00:00
|
|
|
<button class="button is-primary" type="submit">{% trans "Save" %}</button>
|
2021-03-01 01:10:30 +00:00
|
|
|
{% trans "Cancel" as button_text %}
|
2021-08-09 01:40:47 +00:00
|
|
|
{% include 'snippets/toggle/close_button.html' with text=button_text 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-08-09 01:40:47 +00:00
|
|
|
{% include 'snippets/delete_readthrough_modal.html' with controls_text="delete_readthrough" controls_uid=readthrough.id no_body=True %}
|