Readthrough delete modal

This commit is contained in:
Mouse Reeve
2021-12-30 17:48:09 -08:00
parent c6b5ecc418
commit 7af4af278d
2 changed files with 24 additions and 12 deletions

View File

@ -1,6 +1,7 @@
{% load i18n %}
{% load humanize %}
{% load tz %}
{% load utilities %}
<div class="content">
<div id="hide_edit_readthrough_{{ readthrough.id }}" class="box is-shadowless has-background-white-bis">
<div class="columns">
@ -10,14 +11,14 @@
{% if readthrough.finish_date or readthrough.progress %}
<li>
{% if readthrough.finish_date %}
{{ readthrough.finish_date | localtime | naturalday }}: {% trans "finished" %}
{{ 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 %}
{% if readthrough.progress_mode == 'PG' %}
{% include 'snippets/page_text.html' with page=readthrough.progress total_pages=book.pages %}
{% else %}
{{ readthrough.progress }}%
{% endif %}
{% endif %}
{% if readthrough.progress %}
@ -47,6 +48,7 @@
{% endif %}
</li>
{% endif %}
{% if readthrough.start_date %}
<li>{{ readthrough.start_date | localtime | naturalday }}: {% trans "started" %}</li>
{% endif %}
@ -60,7 +62,11 @@
</div>
<div class="control">
{% trans "Delete these read dates" as button_text %}
{% 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" %}
<button class="button is-small" type="button" data-modal-open="delete_readthrough_{{ readthrough.id }}">
<span class="icon icon-x" title="{{ button_text }}">
<span class="is-sr-only">{{ button_text }}</span>
</span>
</button>
</div>
</div>
</div>
@ -79,4 +85,5 @@
</div>
</form>
</div>
{% include 'snippets/delete_readthrough_modal.html' with controls_text="delete_readthrough" controls_uid=readthrough.id no_body=True %}
{% join "delete_readthrough" readthrough.id as modal_id %}
{% include 'snippets/delete_readthrough_modal.html' with id=modal_id %}