From 2765b5d217054ef33901a4e4e35f76076c696f1c Mon Sep 17 00:00:00 2001 From: Rebecca Cremona Date: Wed, 2 Oct 2024 11:07:22 -0400 Subject: [PATCH] Split "settings" views into a separate module. --- .../perma/templates/docs/developer/index.html | 4 +- perma_web/perma/templates/docs/index.html | 2 +- .../templates/docs/perma-link-creation.html | 2 +- .../templates/includes/upper_right_menu.html | 10 +- .../perma/templates/settings-layout.html | 10 +- .../settings-affiliations.html | 0 ...settings-organizations-change-privacy.html | 4 +- .../settings-password.html | 0 .../settings-profile.html | 2 +- .../settings-subscription-cancel-confirm.html | 0 .../settings-subscription-update.html | 0 .../settings-tools.html | 0 .../settings-usage-plan-unavailable.html | 0 .../settings-usage-plan.html | 0 .../user_management/create-link.html | 12 +- .../manage_single_organization.html | 4 +- .../user_management/user_leave_confirm.html | 2 +- perma_web/perma/tests/test_permissions.py | 6 +- .../perma/tests/test_views_user_management.py | 114 ++++---- perma_web/perma/urls.py | 24 +- perma_web/perma/views/user_management.py | 247 +----------------- perma_web/perma/views/user_settings.py | 234 +++++++++++++++++ 22 files changed, 343 insertions(+), 334 deletions(-) rename perma_web/perma/templates/{user_management => settings}/settings-affiliations.html (100%) rename perma_web/perma/templates/{user_management => settings}/settings-organizations-change-privacy.html (78%) rename perma_web/perma/templates/{user_management => settings}/settings-password.html (100%) rename perma_web/perma/templates/{user_management => settings}/settings-profile.html (96%) rename perma_web/perma/templates/{user_management => settings}/settings-subscription-cancel-confirm.html (100%) rename perma_web/perma/templates/{user_management => settings}/settings-subscription-update.html (100%) rename perma_web/perma/templates/{user_management => settings}/settings-tools.html (100%) rename perma_web/perma/templates/{user_management => settings}/settings-usage-plan-unavailable.html (100%) rename perma_web/perma/templates/{user_management => settings}/settings-usage-plan.html (100%) create mode 100644 perma_web/perma/views/user_settings.py diff --git a/perma_web/perma/templates/docs/developer/index.html b/perma_web/perma/templates/docs/developer/index.html index bbd6509e7..31f4068fb 100644 --- a/perma_web/perma/templates/docs/developer/index.html +++ b/perma_web/perma/templates/docs/developer/index.html @@ -34,10 +34,10 @@

API Overview

Authentication

Many of the endpoints require you to authenticate with an API key.

{% if request.user.get_api_key %} -

Your API Key is {{ request.user.get_api_key }}.

+

Your API Key is {{ request.user.get_api_key }}.

{% else %}

- Find your API key in Settings > Tools. Click the Generate an API key button to create a new key. + Find your API key in Settings > Tools. Click the Generate an API key button to create a new key.

Screenshot of Settings > Tools page. A button labeled 'Generate an API key' appears near the bottom of the page. {% endif %} diff --git a/perma_web/perma/templates/docs/index.html b/perma_web/perma/templates/docs/index.html index eedde4f81..02919063f 100644 --- a/perma_web/perma/templates/docs/index.html +++ b/perma_web/perma/templates/docs/index.html @@ -90,7 +90,7 @@

Usage Plans

We also offer a variety of paid usage plans for other groups and for individuals. To learn more about paid usage plans, please visit the Accounts and Usage Plans portion of our user guide.

-

To preserve a web page, log in to your account, enter the URL of the page you want to preserve and click the "Create Perma Link" button, or try one of our Browser Tools. Perma will visit the web page at your direction and create a record of the contents of that page.

+

To preserve a web page, log in to your account, enter the URL of the page you want to preserve and click the "Create Perma Link" button, or try one of our Browser Tools. Perma will visit the web page at your direction and create a record of the contents of that page.

A screenshot of the Create a Perma Link page. A large input field for the target URL and a 'Create Perma Link' button appear prominently at the top of the page. diff --git a/perma_web/perma/templates/docs/perma-link-creation.html b/perma_web/perma/templates/docs/perma-link-creation.html index 7f728a8b6..5277b0aad 100644 --- a/perma_web/perma/templates/docs/perma-link-creation.html +++ b/perma_web/perma/templates/docs/perma-link-creation.html @@ -71,7 +71,7 @@

Creating Perma Records and Links

For example, this Perma Link - http://perma.cc/9265-T4NB - points to a Perma Record of the White House homepage on November 18, 2015.

Preservation Methods

-

To preserve a web page, login to your account, enter the URL of the page you want to preserve and click the "Create Perma Link" button, or try one of our Browser Tools.

+

To preserve a web page, login to your account, enter the URL of the page you want to preserve and click the "Create Perma Link" button, or try one of our Browser Tools.

A screenshot of the Create a Perma Link page. A large input field for the target URL and a 'Create Perma Link' button appear prominently at the top of the page.

Perma visits the URL, fetches the contents of the page, makes a record of those contents - a Perma Record - and deposits that record into the permanent collection. Perma also gives you a unique URL - a Perma Link - that's associated with the new Perma Record.

When the capture process is done, Perma shows you the Perma Record so you can verify it.

diff --git a/perma_web/perma/templates/includes/upper_right_menu.html b/perma_web/perma/templates/includes/upper_right_menu.html index 4e34d533a..9c8a2b84f 100644 --- a/perma_web/perma/templates/includes/upper_right_menu.html +++ b/perma_web/perma/templates/includes/upper_right_menu.html @@ -53,14 +53,14 @@

Main Menu

{% endif %}
  • diff --git a/perma_web/perma/templates/settings-layout.html b/perma_web/perma/templates/settings-layout.html index f8a036cf1..761f78fc2 100644 --- a/perma_web/perma/templates/settings-layout.html +++ b/perma_web/perma/templates/settings-layout.html @@ -18,18 +18,18 @@

    Settings