From 7ccb02f6356e59a03a4f2031521023f66fef91c6 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Tue, 11 Jan 2022 10:27:10 -0800 Subject: [PATCH] Use new modal for edits --- bookwyrm/templates/book/book.html | 2 +- .../templates/readthrough/readthrough.html | 2 +- .../readthrough/readthrough_list.html | 25 ++++++++----------- ...ough_modal.html => readthrough_modal.html} | 0 4 files changed, 12 insertions(+), 17 deletions(-) rename bookwyrm/templates/readthrough/{add_readthrough_modal.html => readthrough_modal.html} (100%) diff --git a/bookwyrm/templates/book/book.html b/bookwyrm/templates/book/book.html index 434881865..e4d13007c 100644 --- a/bookwyrm/templates/book/book.html +++ b/bookwyrm/templates/book/book.html @@ -245,7 +245,7 @@ - {% include "readthrough/add_readthrough_modal.html" with id="add-readthrough" %} + {% include "readthrough/readthrough_modal.html" with id="add-readthrough" %} {% if not readthroughs.exists %}

{% trans "You don't have any reading activity for this book." %}

diff --git a/bookwyrm/templates/readthrough/readthrough.html b/bookwyrm/templates/readthrough/readthrough.html index efd776834..bed59d29b 100644 --- a/bookwyrm/templates/readthrough/readthrough.html +++ b/bookwyrm/templates/readthrough/readthrough.html @@ -10,6 +10,6 @@ Add read dates for "{{ title }}" {% block content %} -{% include "readthrough/add_readthrough_modal.html" with book=book active=True static=True %} +{% include "readthrough/readthrough_modal.html" with book=book active=True static=True %} {% endblock %} diff --git a/bookwyrm/templates/readthrough/readthrough_list.html b/bookwyrm/templates/readthrough/readthrough_list.html index 21ce557cc..9f9db9a55 100644 --- a/bookwyrm/templates/readthrough/readthrough_list.html +++ b/bookwyrm/templates/readthrough/readthrough_list.html @@ -3,7 +3,7 @@ {% load tz %} {% load utilities %}
-
+
{% trans "Progress Updates:" %} @@ -58,7 +58,11 @@
{% trans "Edit read dates" as button_text %} - {% 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" %} +
{% trans "Delete these read dates" as button_text %} @@ -74,16 +78,7 @@
- -{% join "delete_readthrough" readthrough.id as modal_id %} -{% include 'readthrough/delete_readthrough_modal.html' with id=modal_id %} +{% join "edit_readthrough" readthrough.id as edit_modal_id %} +{% include "readthrough/readthrough_modal.html" with readthrough=readthrough id=edit_modal_id %} +{% join "delete_readthrough" readthrough.id as delete_modal_id %} +{% include 'readthrough/delete_readthrough_modal.html' with id=delete_modal_id %} diff --git a/bookwyrm/templates/readthrough/add_readthrough_modal.html b/bookwyrm/templates/readthrough/readthrough_modal.html similarity index 100% rename from bookwyrm/templates/readthrough/add_readthrough_modal.html rename to bookwyrm/templates/readthrough/readthrough_modal.html