diff --git a/bookwyrm/templates/reading_progress/finish.html b/bookwyrm/templates/reading_progress/finish.html index a9f60f04..ca69128e 100644 --- a/bookwyrm/templates/reading_progress/finish.html +++ b/bookwyrm/templates/reading_progress/finish.html @@ -9,6 +9,6 @@ Finish "{{ book_title }}" {% block content %} -{% include "snippets/shelve_button/finish_reading_modal.html" with book=book active=True %} +{% include "snippets/reading_modals/finish_reading_modal.html" with book=book active=True %} {% endblock %} diff --git a/bookwyrm/templates/reading_progress/start.html b/bookwyrm/templates/reading_progress/start.html index 9c457947..e24a0e05 100644 --- a/bookwyrm/templates/reading_progress/start.html +++ b/bookwyrm/templates/reading_progress/start.html @@ -9,6 +9,6 @@ Start "{{ book_title }}" {% block content %} -{% include "snippets/shelve_button/start_reading_modal.html" with book=book active=True %} +{% include "snippets/reading_modals/start_reading_modal.html" with book=book active=True %} {% endblock %} diff --git a/bookwyrm/templates/reading_progress/want.html b/bookwyrm/templates/reading_progress/want.html index e0353193..6122ade3 100644 --- a/bookwyrm/templates/reading_progress/want.html +++ b/bookwyrm/templates/reading_progress/want.html @@ -9,6 +9,6 @@ Want to Read "{{ book_title }}" {% block content %} -{% include "snippets/shelve_button/want_to_read_modal.html" with book=book active=True %} +{% include "snippets/reading_modals/want_to_read_modal.html" with book=book active=True %} {% endblock %} diff --git a/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html new file mode 100644 index 00000000..fdb5d7bb --- /dev/null +++ b/bookwyrm/templates/snippets/reading_modals/finish_reading_modal.html @@ -0,0 +1,34 @@ +{% extends 'snippets/reading_modals/layout.html' %} +{% load i18n %} +{% load utilities %} + +{% block modal-title %} +{% blocktrans trimmed with book_title=book|book_title %} +Finish "{{ book_title }}" +{% endblocktrans %} +{% endblock %} + +{% block modal-form-open %} +
+{% endblock %} + +{% block reading-dates %} +
+
+
+ + +
+
+
+
+ + +
+
+
+{% endblock %} diff --git a/bookwyrm/templates/snippets/reading_modals/form.html b/bookwyrm/templates/snippets/reading_modals/form.html new file mode 100644 index 00000000..da2aad93 --- /dev/null +++ b/bookwyrm/templates/snippets/reading_modals/form.html @@ -0,0 +1,9 @@ +{% extends "snippets/create_status/layout.html" %} +{% load i18n %} + +{% block form_open %}{% endblock %} + +{% block initial_fields %} + + +{% endblock %} diff --git a/bookwyrm/templates/snippets/reading_modals/layout.html b/bookwyrm/templates/snippets/reading_modals/layout.html new file mode 100644 index 00000000..877f14ef --- /dev/null +++ b/bookwyrm/templates/snippets/reading_modals/layout.html @@ -0,0 +1,26 @@ +{% extends 'components/modal.html' %} +{% load i18n %} +{% load utilities %} + +{% block modal-body %} + +{% block reading-dates %}{% endblock %} + +{% with 0|uuid as local_uuid %} +
+ + +
+ +
+ + {% include "snippets/reading_modals/form.html" %} +
+{% endwith %} + +{% endblock %} diff --git a/bookwyrm/templates/snippets/shelve_button/progress_update_modal.html b/bookwyrm/templates/snippets/reading_modals/progress_update_modal.html similarity index 100% rename from bookwyrm/templates/snippets/shelve_button/progress_update_modal.html rename to bookwyrm/templates/snippets/reading_modals/progress_update_modal.html diff --git a/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html b/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html new file mode 100644 index 00000000..08191c79 --- /dev/null +++ b/bookwyrm/templates/snippets/reading_modals/start_reading_modal.html @@ -0,0 +1,22 @@ +{% extends 'snippets/reading_modals/layout.html' %} +{% load i18n %} +{% load utilities %} + +{% block modal-title %} +{% blocktrans trimmed with book_title=book|book_title %} +Start "{{ book_title }}" +{% endblocktrans %} +{% endblock %} + +{% block modal-form-open %} + +{% endblock %} + +{% block reading-dates %} +
+ + +
+{% endblock %} diff --git a/bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html b/bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html new file mode 100644 index 00000000..5669610c --- /dev/null +++ b/bookwyrm/templates/snippets/reading_modals/want_to_read_modal.html @@ -0,0 +1,13 @@ +{% extends 'snippets/reading_modals/layout.html' %} +{% load i18n %} +{% load utilities %} + +{% block modal-title %} +{% blocktrans trimmed with book_title=book|book_title %} +Want to Read "{{ book_title }}" +{% endblocktrans %} +{% endblock %} + +{% block modal-form-open %} + +{% endblock %} diff --git a/bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html b/bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html deleted file mode 100644 index 36addc7b..00000000 --- a/bookwyrm/templates/snippets/shelve_button/finish_reading_modal.html +++ /dev/null @@ -1,48 +0,0 @@ -{% extends 'components/modal.html' %} -{% load i18n %} - -{% block modal-title %} -{% blocktrans with book_title=book.title %}Finish "{{ book_title }}"{% endblocktrans %} -{% endblock %} - - -{% block modal-form-open %} - -{% endblock %} - -{% block modal-body %} - -{% endblock %} - -{% block modal-footer %} -
-
- - {% include 'snippets/privacy_select.html' %} -
-
- - {% trans "Cancel" as button_text %} - {% include 'snippets/toggle/close_button.html' with text=button_text controls_text="finish-reading" controls_uid=uuid %} -
-
-{% endblock %} -{% block modal-form-close %}
{% endblock %} diff --git a/bookwyrm/templates/snippets/shelve_button/shelve_button.html b/bookwyrm/templates/snippets/shelve_button/shelve_button.html index 40a9f6e7..18941812 100644 --- a/bookwyrm/templates/snippets/shelve_button/shelve_button.html +++ b/bookwyrm/templates/snippets/shelve_button/shelve_button.html @@ -19,13 +19,13 @@ {% endif %} -{% include 'snippets/shelve_button/want_to_read_modal.html' with book=active_shelf.book controls_text="want_to_read" controls_uid=uuid %} +{% include 'snippets/reading_modals/want_to_read_modal.html' with book=active_shelf.book controls_text="want_to_read" controls_uid=uuid %} -{% include 'snippets/shelve_button/start_reading_modal.html' with book=active_shelf.book controls_text="start_reading" controls_uid=uuid %} +{% include 'snippets/reading_modals/start_reading_modal.html' with book=active_shelf.book controls_text="start_reading" controls_uid=uuid %} -{% include 'snippets/shelve_button/finish_reading_modal.html' with book=active_shelf.book controls_text="finish_reading" controls_uid=uuid readthrough=readthrough %} +{% include 'snippets/reading_modals/finish_reading_modal.html' with book=active_shelf.book controls_text="finish_reading" controls_uid=uuid readthrough=readthrough %} -{% include 'snippets/shelve_button/progress_update_modal.html' with book=active_shelf_book.book controls_text="progress_update" controls_uid=uuid readthrough=readthrough %} +{% include 'snippets/reading_modals/progress_update_modal.html' with book=active_shelf_book.book controls_text="progress_update" controls_uid=uuid readthrough=readthrough %} {% endwith %} {% endif %} diff --git a/bookwyrm/templates/snippets/shelve_button/start_reading_modal.html b/bookwyrm/templates/snippets/shelve_button/start_reading_modal.html deleted file mode 100644 index 1858313b..00000000 --- a/bookwyrm/templates/snippets/shelve_button/start_reading_modal.html +++ /dev/null @@ -1,42 +0,0 @@ -{% extends 'components/modal.html' %} -{% load i18n %} - -{% block modal-title %} -{% blocktrans trimmed with book_title=book.title %} -Start "{{ book_title }}" -{% endblocktrans %} -{% endblock %} - -{% block modal-form-open %} -
-{% endblock %} - -{% block modal-body %} - -{% endblock %} - -{% block modal-footer %} -
-
- - {% include 'snippets/privacy_select.html' %} -
-
- - {% trans "Cancel" as button_text %} - {% include 'snippets/toggle/toggle_button.html' with text=button_text controls_text="start-reading" controls_uid=uuid %} -
-
-{% endblock %} -{% block modal-form-close %}
{% endblock %} diff --git a/bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html b/bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html deleted file mode 100644 index 643e4a20..00000000 --- a/bookwyrm/templates/snippets/shelve_button/want_to_read_modal.html +++ /dev/null @@ -1,33 +0,0 @@ -{% extends 'components/modal.html' %} -{% load i18n %} - -{% block modal-title %} -{% blocktrans with book_title=book.title %}Want to Read "{{ book_title }}"{% endblocktrans %} -{% endblock %} - -{% block modal-form-open %} -
- {% csrf_token %} - - -{% endblock %} - -{% block modal-footer %} -
-
- - {% include 'snippets/privacy_select.html' %} -
-
- - {% trans "Cancel" as button_text %} - {% include 'snippets/toggle/toggle_button.html' with text=button_text controls_text="want-to-read" controls_uid=uuid %} -
-
-{% endblock %} -{% block modal-form-close %}
{% endblock %}