From 3e7a4f78f3e9e32f393638941c955638db189f8b Mon Sep 17 00:00:00 2001 From: Jonathan Bobel Date: Thu, 12 Oct 2023 10:21:11 -0400 Subject: [PATCH 1/5] Committing before merge --- app/main/views/index.py | 20 ++++++------- app/navigation.py | 2 ++ app/templates/admin_template.html | 7 ++++- app/templates/service_navigation.html | 2 +- .../views/dashboard/write-first-messages.html | 4 +-- app/templates/views/user-profile.html | 6 ++-- app/templates/withoutnav_template.html | 4 +-- .../views/accounts/test_choose_accounts.py | 30 ++++++++++--------- tests/app/main/views/test_user_profile.py | 6 ++-- 9 files changed, 45 insertions(+), 36 deletions(-) diff --git a/app/main/views/index.py b/app/main/views/index.py index 9ad92a2857..5c13835f7b 100644 --- a/app/main/views/index.py +++ b/app/main/views/index.py @@ -227,7 +227,7 @@ def terms(): ) -@main.route("/features/using-notify") +@main.route("/features/using_notify") @user_is_logged_in def using_notify(): return ( @@ -236,7 +236,7 @@ def using_notify(): ) -@main.route("/using-notify/delivery-status") +@main.route("/using_notify/delivery-status") @user_is_logged_in def message_status(): return render_template( @@ -251,7 +251,7 @@ def get_started_old(): return redirect(url_for(".get_started"), 301) -@main.route("/using-notify/get-started") +@main.route("/using_notify/get-started") @user_is_logged_in def get_started(): return render_template( @@ -260,7 +260,7 @@ def get_started(): ) -@main.route("/using-notify/who-its-for") +@main.route("/using_notify/who-its-for") def who_its_for(): return redirect(url_for(".features"), 301) @@ -271,7 +271,7 @@ def trial_mode(): return redirect(url_for(".trial_mode_new"), 301) -@main.route("/using-notify/trial-mode") +@main.route("/using_notify/trial-mode") def trial_mode_new(): return render_template( "views/trial-mode.html", @@ -279,7 +279,7 @@ def trial_mode_new(): ) -@main.route("/using-notify/guidance") +@main.route("/using_notify/guidance") @user_is_logged_in def guidance_index(): return render_template( @@ -288,7 +288,7 @@ def guidance_index(): ) -@main.route("/using-notify/guidance/branding-and-customisation") +@main.route("/using_notify/guidance/branding-and-customisation") @user_is_logged_in def branding_and_customisation(): return render_template( @@ -297,7 +297,7 @@ def branding_and_customisation(): ) -@main.route("/using-notify/guidance/create-and-send-messages") +@main.route("/using_notify/guidance/create-and-send-messages") @user_is_logged_in def create_and_send_messages(): return render_template( @@ -306,7 +306,7 @@ def create_and_send_messages(): ) -@main.route("/using-notify/guidance/edit-and-format-messages") +@main.route("/using_notify/guidance/edit-and-format-messages") @user_is_logged_in def edit_and_format_messages(): return render_template( @@ -315,7 +315,7 @@ def edit_and_format_messages(): ) -@main.route("/using-notify/guidance/send-files-by-email") +@main.route("/using_notify/guidance/send-files-by-email") @user_is_logged_in def send_files_by_email(): return render_template( diff --git a/app/navigation.py b/app/navigation.py index 8fb06f7f58..a7317f4997 100644 --- a/app/navigation.py +++ b/app/navigation.py @@ -61,6 +61,8 @@ class HeaderNavigation(Navigation): "message_status", "guidance_index", }, + "accounts-or-dashboard": { + }, "pricing": { "how_to_pay", "billing_details", diff --git a/app/templates/admin_template.html b/app/templates/admin_template.html index 5e37462625..eb3bb6613d 100644 --- a/app/templates/admin_template.html +++ b/app/templates/admin_template.html @@ -75,6 +75,11 @@ ] %} {% else %} {% set navigation = [ + { + "href": url_for("main.show_accounts_or_dashboard"), + "text": "Current Service", + "active": header_navigation.is_selected('accounts-or-dashboard') + }, { "href": url_for('main.get_started'), "text": "Using Notify", @@ -92,7 +97,7 @@ }, { "href": url_for('main.user_profile'), - "text": current_user.name, + "text": "User Profile", "active": header_navigation.is_selected('user-profile') }, { diff --git a/app/templates/service_navigation.html b/app/templates/service_navigation.html index 28f26fda79..4cd23f252f 100644 --- a/app/templates/service_navigation.html +++ b/app/templates/service_navigation.html @@ -7,7 +7,7 @@ {% endmacro %} -