From d63e7243f5f53033b7781efc1cf7a533e77ff3b7 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 8 Sep 2021 07:26:51 -0700 Subject: [PATCH 1/6] Adds tooltip component --- bookwyrm/templates/components/tooltip.html | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 bookwyrm/templates/components/tooltip.html diff --git a/bookwyrm/templates/components/tooltip.html b/bookwyrm/templates/components/tooltip.html new file mode 100644 index 00000000..153ce35c --- /dev/null +++ b/bookwyrm/templates/components/tooltip.html @@ -0,0 +1,8 @@ +{% load i18n %} + + From e13e13d3f3c282e65bc1eb870d6185b41b0d7d00 Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 8 Sep 2021 07:28:42 -0700 Subject: [PATCH 2/6] Move import templates into directory --- bookwyrm/templates/{ => import}/import.html | 1 + bookwyrm/templates/{ => import}/import_status.html | 0 bookwyrm/views/import_data.py | 4 ++-- 3 files changed, 3 insertions(+), 2 deletions(-) rename bookwyrm/templates/{ => import}/import.html (96%) rename bookwyrm/templates/{ => import}/import_status.html (100%) diff --git a/bookwyrm/templates/import.html b/bookwyrm/templates/import/import.html similarity index 96% rename from bookwyrm/templates/import.html rename to bookwyrm/templates/import/import.html index d2e40748..cac6fdce 100644 --- a/bookwyrm/templates/import.html +++ b/bookwyrm/templates/import/import.html @@ -28,6 +28,7 @@ + {% include 'components/tooltip.html' with controls_text="goodreads-tooltip" %}
{{ import_form.csv_file }} diff --git a/bookwyrm/templates/import_status.html b/bookwyrm/templates/import/import_status.html similarity index 100% rename from bookwyrm/templates/import_status.html rename to bookwyrm/templates/import/import_status.html diff --git a/bookwyrm/views/import_data.py b/bookwyrm/views/import_data.py index 9e2e817d..634940a0 100644 --- a/bookwyrm/views/import_data.py +++ b/bookwyrm/views/import_data.py @@ -28,7 +28,7 @@ class Import(View): """load import page""" return TemplateResponse( request, - "import.html", + "import/import.html", { "import_form": forms.ImportForm(), "jobs": models.ImportJob.objects.filter(user=request.user).order_by( @@ -94,7 +94,7 @@ class ImportStatus(View): items = [i for i in items if not i.fail_reason] return TemplateResponse( request, - "import_status.html", + "import/import_status.html", {"job": job, "items": items, "failed_items": failed_items, "task": task}, ) From 95bdf7b787b4d8457b67857bbba2c690567ca40c Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 8 Sep 2021 07:35:49 -0700 Subject: [PATCH 3/6] Adds goodreads data tooltip --- bookwyrm/templates/import/import.html | 2 +- bookwyrm/templates/import/tooltip.html | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 bookwyrm/templates/import/tooltip.html diff --git a/bookwyrm/templates/import/import.html b/bookwyrm/templates/import/import.html index cac6fdce..cf911f55 100644 --- a/bookwyrm/templates/import/import.html +++ b/bookwyrm/templates/import/import.html @@ -28,7 +28,7 @@
- {% include 'components/tooltip.html' with controls_text="goodreads-tooltip" %} + {% include 'import/tooltip.html' with controls_text="goodreads-tooltip" %}
{{ import_form.csv_file }} diff --git a/bookwyrm/templates/import/tooltip.html b/bookwyrm/templates/import/tooltip.html new file mode 100644 index 00000000..1cfe5a3b --- /dev/null +++ b/bookwyrm/templates/import/tooltip.html @@ -0,0 +1,8 @@ +{% extends 'components/tooltip.html' %} +{% load i18n %} + +{% block tooltip_content %} + +{% trans 'You can download your GoodReads data from the Import/Export page of your GoodReads account.' %} + +{% endblock %} From 1bf09459b55ffb677a54476c7dedf15ddbc7c10d Mon Sep 17 00:00:00 2001 From: Mouse Reeve Date: Wed, 8 Sep 2021 08:19:54 -0700 Subject: [PATCH 4/6] Changes tooltip paradigm --- bookwyrm/templates/components/tooltip.html | 11 +++++++---- bookwyrm/templates/import/import.html | 12 ++++++++---- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/bookwyrm/templates/components/tooltip.html b/bookwyrm/templates/components/tooltip.html index 153ce35c..35225b6f 100644 --- a/bookwyrm/templates/components/tooltip.html +++ b/bookwyrm/templates/components/tooltip.html @@ -1,8 +1,11 @@ {% load i18n %} -