From e2476d1ad36a1c55685703574461385454ac6b05 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 10 Mar 2022 08:38:06 -0800 Subject: [PATCH 01/17] Move content warning toggle out of post options block --- .../snippets/create_status/post_options_block.html | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/bookwyrm/templates/snippets/create_status/post_options_block.html b/bookwyrm/templates/snippets/create_status/post_options_block.html index 171315320..652f8adbd 100644 --- a/bookwyrm/templates/snippets/create_status/post_options_block.html +++ b/bookwyrm/templates/snippets/create_status/post_options_block.html @@ -1,8 +1,6 @@ {% load i18n %} -
-
- {% include "snippets/create_status/content_warning_toggle.html" %} -
+
+
{% if type == 'direct' %} @@ -13,13 +11,11 @@ {% include 'snippets/privacy_select.html' with current=reply_parent.privacy %} {% endif %} {% endif %} -
-
+
- From a922b8fd04b6f7188e58153fc15f1a9ea8f72536 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 10 Mar 2022 09:03:24 -0800 Subject: [PATCH 02/17] Uses details to show/hide content warning field --- .../create_status/content_warning_field.html | 49 ++++++++++++------- .../create_status/content_warning_toggle.html | 17 ------- .../snippets/create_status/layout.html | 4 +- 3 files changed, 32 insertions(+), 38 deletions(-) delete mode 100644 bookwyrm/templates/snippets/create_status/content_warning_toggle.html diff --git a/bookwyrm/templates/snippets/create_status/content_warning_field.html b/bookwyrm/templates/snippets/create_status/content_warning_field.html index 14428f30d..2a2161f71 100644 --- a/bookwyrm/templates/snippets/create_status/content_warning_field.html +++ b/bookwyrm/templates/snippets/create_status/content_warning_field.html @@ -1,22 +1,33 @@ {% load i18n %} -
- - +
+ + + + {% trans "Include spoiler alert" %} + + + + + +
+ +
+
diff --git a/bookwyrm/templates/snippets/create_status/content_warning_toggle.html b/bookwyrm/templates/snippets/create_status/content_warning_toggle.html deleted file mode 100644 index a5c41cbcb..000000000 --- a/bookwyrm/templates/snippets/create_status/content_warning_toggle.html +++ /dev/null @@ -1,17 +0,0 @@ -{% load i18n %} - -
- - {% trans "Include spoiler alert" as button_text %} - {% firstof draft.content_warning status.content_warning as pressed %} - {% firstof local_uuid '' as local_uuid %} - {% include 'snippets/toggle/toggle_button.html' with text=button_text icon="warning is-size-4" controls_text="spoilers" controls_uid=uuid|add:local_uuid focus="id_content_warning" checkbox="id_show_spoilers" class="toggle-button" pressed=pressed %} -
diff --git a/bookwyrm/templates/snippets/create_status/layout.html b/bookwyrm/templates/snippets/create_status/layout.html index 0585638d9..915e5114b 100644 --- a/bookwyrm/templates/snippets/create_status/layout.html +++ b/bookwyrm/templates/snippets/create_status/layout.html @@ -37,8 +37,6 @@ reply_parent: the Status object this post will be in reply to, if applicable {% endif %} {% endblock %} - {% include "snippets/create_status/content_warning_field.html" %} - {# fields that go between the content warnings and the content field (ie, quote) #} {% block pre_content_additions %}{% endblock %} @@ -55,6 +53,8 @@ reply_parent: the Status object this post will be in reply to, if applicable {# additional fields that go after the content block (ie, progress) #} {% block post_content_additions %}{% endblock %} + {% include "snippets/create_status/content_warning_field.html" %} + {% block options_block %} {# cw, post privacy, and submit button #} {% include "snippets/create_status/post_options_block.html" %} From bcd83ee802970ce092364c41c48dfcaa311b2da7 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 10 Mar 2022 09:16:44 -0800 Subject: [PATCH 03/17] Fixes list notes icon --- bookwyrm/templates/lists/list.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookwyrm/templates/lists/list.html b/bookwyrm/templates/lists/list.html index 1d5abd89e..2e01bfb17 100644 --- a/bookwyrm/templates/lists/list.html +++ b/bookwyrm/templates/lists/list.html @@ -117,7 +117,7 @@ {% trans "Add notes" %} - + {% include "lists/edit_item_form.html" with book=item.book %} From cc2b774fb579d248537dd9deaa0ae63833524c2c Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 10 Mar 2022 09:16:50 -0800 Subject: [PATCH 04/17] Updates wording on content warning field --- .../snippets/create_status/content_warning_field.html | 4 ++-- bookwyrm/views/status.py | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) diff --git a/bookwyrm/templates/snippets/create_status/content_warning_field.html b/bookwyrm/templates/snippets/create_status/content_warning_field.html index 2a2161f71..2c34136ce 100644 --- a/bookwyrm/templates/snippets/create_status/content_warning_field.html +++ b/bookwyrm/templates/snippets/create_status/content_warning_field.html @@ -8,14 +8,14 @@ {% trans "Include spoiler alert" %} - +
Date: Thu, 10 Mar 2022 09:30:39 -0800 Subject: [PATCH 05/17] Updates verification modal button positions --- .../templates/book/file_links/verification_modal.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bookwyrm/templates/book/file_links/verification_modal.html b/bookwyrm/templates/book/file_links/verification_modal.html index 81685da0f..01f17f965 100644 --- a/bookwyrm/templates/book/file_links/verification_modal.html +++ b/bookwyrm/templates/book/file_links/verification_modal.html @@ -17,13 +17,13 @@ Is that where you'd like to go? {% block modal-footer %} -{% trans "Continue" %} - - {% if request.user.is_authenticated %} -
+ + + +{% trans "Continue" %} {% endif %} {% endblock %} From d7eb118a071de95ccd0475b59aa6abbbfa3fbf62 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 10 Mar 2022 09:35:05 -0800 Subject: [PATCH 06/17] Updates readthrough modal --- bookwyrm/templates/readthrough/readthrough_modal.html | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/readthrough/readthrough_modal.html b/bookwyrm/templates/readthrough/readthrough_modal.html index 73f445f61..0f03d9386 100644 --- a/bookwyrm/templates/readthrough/readthrough_modal.html +++ b/bookwyrm/templates/readthrough/readthrough_modal.html @@ -69,8 +69,10 @@ {% endblock %} {% block modal-footer %} - - +
+ + +
{% endblock %} {% block modal-form-close %} From 672eee9c9c382e4af1c6d0b82ea82b0091b36c6d Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 10 Mar 2022 09:41:32 -0800 Subject: [PATCH 07/17] Updates add file link modal --- bookwyrm/templates/book/file_links/add_link_modal.html | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/bookwyrm/templates/book/file_links/add_link_modal.html b/bookwyrm/templates/book/file_links/add_link_modal.html index d5b3fcd0d..67b437bd7 100644 --- a/bookwyrm/templates/book/file_links/add_link_modal.html +++ b/bookwyrm/templates/book/file_links/add_link_modal.html @@ -55,8 +55,10 @@ {% endblock %} {% block modal-footer %} - - - +
+ + +
{% endblock %} + {% block modal-form-close %}{% endblock %} From cbcd5c7a5749b539f390925c0f84379baed001c0 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 10 Mar 2022 09:49:17 -0800 Subject: [PATCH 08/17] Adds elided page range to editions --- bookwyrm/views/books/editions.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/bookwyrm/views/books/editions.py b/bookwyrm/views/books/editions.py index 81d073224..865f54805 100644 --- a/bookwyrm/views/books/editions.py +++ b/bookwyrm/views/books/editions.py @@ -58,8 +58,12 @@ class Editions(View): ) paginated = Paginator(editions, PAGE_LENGTH) + page = paginated.get_page(request.GET.get("page")) data = { - "editions": paginated.get_page(request.GET.get("page")), + "editions": page, + "page_range": paginated.get_elided_page_range( + page.number, on_each_side=2, on_ends=1 + ), "work": work, "languages": languages, "formats": set( From 8b4c9483ea57bfb181e2364f6c8f752a6fbbe4a7 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 10 Mar 2022 09:49:27 -0800 Subject: [PATCH 09/17] Udates sync modals --- bookwyrm/templates/author/sync_modal.html | 6 ++++-- bookwyrm/templates/book/sync_modal.html | 6 ++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/bookwyrm/templates/author/sync_modal.html b/bookwyrm/templates/author/sync_modal.html index a6e032cbf..44b85ef4e 100644 --- a/bookwyrm/templates/author/sync_modal.html +++ b/bookwyrm/templates/author/sync_modal.html @@ -19,8 +19,10 @@ {% endblock %} {% block modal-footer %} - - +
+ + +
{% endblock %} {% block modal-form-close %}{% endblock %} diff --git a/bookwyrm/templates/book/sync_modal.html b/bookwyrm/templates/book/sync_modal.html index 6e5df0c0f..81ad8db92 100644 --- a/bookwyrm/templates/book/sync_modal.html +++ b/bookwyrm/templates/book/sync_modal.html @@ -19,8 +19,10 @@ {% endblock %} {% block modal-footer %} - - +
+ + +
{% endblock %} {% block modal-form-close %}{% endblock %} From 20453a997744606f2ff1f0761bf20e3f60e8af8f Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 10 Mar 2022 09:57:55 -0800 Subject: [PATCH 10/17] Delete readthrough and add cover modals --- bookwyrm/templates/book/cover_add_modal.html | 6 ++++-- .../readthrough/delete_readthrough_modal.html | 18 +++++++++++++----- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/bookwyrm/templates/book/cover_add_modal.html b/bookwyrm/templates/book/cover_add_modal.html index e8207ff44..8ca5bf2a8 100644 --- a/bookwyrm/templates/book/cover_add_modal.html +++ b/bookwyrm/templates/book/cover_add_modal.html @@ -28,8 +28,10 @@ {% endblock %} {% block modal-footer %} - - +
+ + +
{% endblock %} {% block modal-form-close %}{% endblock %} diff --git a/bookwyrm/templates/readthrough/delete_readthrough_modal.html b/bookwyrm/templates/readthrough/delete_readthrough_modal.html index 5b3a74cc5..88ebf53c2 100644 --- a/bookwyrm/templates/readthrough/delete_readthrough_modal.html +++ b/bookwyrm/templates/readthrough/delete_readthrough_modal.html @@ -14,12 +14,20 @@ {% endblock %} {% block modal-footer %} -
+ {% csrf_token %} - - + +
+ + +
{% endblock %} From d4be0ca58be99cc4187b87b928dd718998957252 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 10 Mar 2022 10:02:18 -0800 Subject: [PATCH 11/17] Report modal --- bookwyrm/templates/snippets/report_modal.html | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/bookwyrm/templates/snippets/report_modal.html b/bookwyrm/templates/snippets/report_modal.html index 64e0c298c..e80dd1f5e 100644 --- a/bookwyrm/templates/snippets/report_modal.html +++ b/bookwyrm/templates/snippets/report_modal.html @@ -48,10 +48,10 @@ {% block modal-footer %} - - - - +
+ + +
{% endblock %} {% block modal-form-close %}{% endblock %} From 9977b33a8d9262b94516d49479df0a79bc113d89 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 10 Mar 2022 10:49:33 -0800 Subject: [PATCH 12/17] Group, list, and shelve form buttons --- bookwyrm/templates/groups/create_form.html | 2 +- .../templates/groups/delete_group_modal.html | 12 +++++++----- bookwyrm/templates/groups/form.html | 17 ++++++++++------- bookwyrm/templates/lists/add_item_modal.html | 18 ++++++++++-------- .../templates/lists/delete_list_modal.html | 16 +++++++++------- bookwyrm/templates/lists/form.html | 2 +- .../link_domains/edit_domain_modal.html | 6 ++++-- .../templates/shelf/create_shelf_form.html | 2 +- bookwyrm/templates/shelf/form.html | 2 +- 9 files changed, 44 insertions(+), 33 deletions(-) diff --git a/bookwyrm/templates/groups/create_form.html b/bookwyrm/templates/groups/create_form.html index dbb8ad88b..5aace9d1d 100644 --- a/bookwyrm/templates/groups/create_form.html +++ b/bookwyrm/templates/groups/create_form.html @@ -2,7 +2,7 @@ {% load i18n %} {% block header %} -{% trans "Create Group" %} +{% trans "Create group" %} {% endblock %} {% block form %} diff --git a/bookwyrm/templates/groups/delete_group_modal.html b/bookwyrm/templates/groups/delete_group_modal.html index 592a861fd..f166eec21 100644 --- a/bookwyrm/templates/groups/delete_group_modal.html +++ b/bookwyrm/templates/groups/delete_group_modal.html @@ -8,13 +8,15 @@ {% endblock %} {% block modal-footer %} -
+ {% csrf_token %} - - +
+ + +
{% endblock %} diff --git a/bookwyrm/templates/groups/form.html b/bookwyrm/templates/groups/form.html index 6767d1b10..a0d057582 100644 --- a/bookwyrm/templates/groups/form.html +++ b/bookwyrm/templates/groups/form.html @@ -16,18 +16,21 @@
{% if group.id %} -
+
{% endif %} -
-
- {% include 'snippets/privacy_select_no_followers.html' with current=group.privacy %} -
-
- + +
+
+
+ {% include 'snippets/privacy_select_no_followers.html' with current=group.privacy %} +
+
+ +
diff --git a/bookwyrm/templates/lists/add_item_modal.html b/bookwyrm/templates/lists/add_item_modal.html index 5c210d462..2c586b308 100644 --- a/bookwyrm/templates/lists/add_item_modal.html +++ b/bookwyrm/templates/lists/add_item_modal.html @@ -32,14 +32,16 @@ {% endblock %} {% block modal-footer %} - - +
+ + +
{% endblock %} {% block modal-form-close %}{% endblock %} diff --git a/bookwyrm/templates/lists/delete_list_modal.html b/bookwyrm/templates/lists/delete_list_modal.html index aad879529..88e04423c 100644 --- a/bookwyrm/templates/lists/delete_list_modal.html +++ b/bookwyrm/templates/lists/delete_list_modal.html @@ -8,15 +8,17 @@ {% endblock %} {% block modal-footer %} -
+ {% csrf_token %} - - +
+ + +
{% endblock %} diff --git a/bookwyrm/templates/lists/form.html b/bookwyrm/templates/lists/form.html index c8383d9c8..3558d8cc0 100644 --- a/bookwyrm/templates/lists/form.html +++ b/bookwyrm/templates/lists/form.html @@ -114,7 +114,7 @@
-
+
{% if list.id %}
- +
+ + +
{% endblock %} {% block modal-form-close %}{% endblock %} diff --git a/bookwyrm/templates/shelf/create_shelf_form.html b/bookwyrm/templates/shelf/create_shelf_form.html index c3d2b5faa..3bf171998 100644 --- a/bookwyrm/templates/shelf/create_shelf_form.html +++ b/bookwyrm/templates/shelf/create_shelf_form.html @@ -2,7 +2,7 @@ {% load i18n %} {% block header %} -{% trans "Create Shelf" %} +{% trans "Create shelf" %} {% endblock %} {% block form %} diff --git a/bookwyrm/templates/shelf/form.html b/bookwyrm/templates/shelf/form.html index ff7f8b5ee..a25330109 100644 --- a/bookwyrm/templates/shelf/form.html +++ b/bookwyrm/templates/shelf/form.html @@ -17,7 +17,7 @@
-
+
{% include 'snippets/privacy_select.html' with current=privacy %}
From dbf925f17664b593efdb141e53f4321a6e01840c Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Thu, 10 Mar 2022 10:52:39 -0800 Subject: [PATCH 13/17] Removes trailing whitespace --- bookwyrm/templates/snippets/register_form.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bookwyrm/templates/snippets/register_form.html b/bookwyrm/templates/snippets/register_form.html index dd8cff3a8..214e514c1 100644 --- a/bookwyrm/templates/snippets/register_form.html +++ b/bookwyrm/templates/snippets/register_form.html @@ -53,12 +53,12 @@ id="id_password_register" aria-describedby="desc_password_register" > - + {% include 'snippets/form_errors.html' with errors_list=register_form.password.errors id="desc_password_register" %}
-
+