mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-08-20 14:29:51 -04:00
Merge branch 'main' of https://github.com/GSA/notifications-admin into 2135-send-message-flow-h1-changes
This commit is contained in:
@@ -30,15 +30,13 @@ from notifications_utils.url_safe_token import generate_token
|
||||
# Hook to check for feature flags
|
||||
@main.before_request
|
||||
def check_feature_flags():
|
||||
if (
|
||||
request.path.startswith("/guides/best-practices")
|
||||
and not current_app.config.get("FEATURE_BEST_PRACTICES_ENABLED", False)
|
||||
if request.path.startswith("/guides/best-practices") and not current_app.config.get(
|
||||
"FEATURE_BEST_PRACTICES_ENABLED", False
|
||||
):
|
||||
abort(404)
|
||||
|
||||
if (
|
||||
request.path.startswith("/about")
|
||||
and not current_app.config.get("FEATURE_ABOUT_PAGE_ENABLED", False)
|
||||
if request.path.startswith("/about") and not current_app.config.get(
|
||||
"FEATURE_ABOUT_PAGE_ENABLED", False
|
||||
):
|
||||
abort(404)
|
||||
|
||||
@@ -294,7 +292,6 @@ def benchmark_performance():
|
||||
)
|
||||
|
||||
|
||||
@main.route("/using-notify/guidance")
|
||||
@main.route("/guides/using-notify/guidance")
|
||||
@user_is_logged_in
|
||||
def guidance_index():
|
||||
@@ -315,6 +312,14 @@ def about_notify():
|
||||
)
|
||||
|
||||
|
||||
@main.route("/about/security")
|
||||
def about_security():
|
||||
return render_template(
|
||||
"views/about/security.html",
|
||||
navigation_links=about_notify_nav(),
|
||||
)
|
||||
|
||||
|
||||
@main.route("/about/why-text-messaging")
|
||||
def why_text_messaging():
|
||||
return render_template(
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
from flask import current_app
|
||||
|
||||
|
||||
def features_nav():
|
||||
return [
|
||||
{
|
||||
@@ -22,46 +25,20 @@ def features_nav():
|
||||
|
||||
|
||||
def using_notify_nav():
|
||||
return [
|
||||
{
|
||||
"name": "Get started",
|
||||
"link": "main.get_started",
|
||||
},
|
||||
{
|
||||
"name": "Guides",
|
||||
"link": "main.best_practices",
|
||||
},
|
||||
{
|
||||
"name": "Trial mode",
|
||||
"link": "main.trial_mode_new",
|
||||
},
|
||||
{
|
||||
"name": "Tracking usage",
|
||||
"link": "main.pricing",
|
||||
},
|
||||
{
|
||||
"name": "Delivery status",
|
||||
"link": "main.message_status",
|
||||
},
|
||||
{
|
||||
"name": "Guidance",
|
||||
"link": "main.guidance_index",
|
||||
# "sub_navigation_items": [
|
||||
# {
|
||||
# "name": "Formatting",
|
||||
# "link": "main.edit_and_format_messages",
|
||||
# },
|
||||
# {
|
||||
# "name": "Send files by email",
|
||||
# "link": "main.send_files_by_email",
|
||||
# },
|
||||
# ]
|
||||
# {
|
||||
# "name": "API documentation",
|
||||
# "link": "main.documentation",
|
||||
# },
|
||||
},
|
||||
nav_items = [
|
||||
{"name": "Get started", "link": "main.get_started"},
|
||||
{"name": "Guides", "link": "main.best_practices"},
|
||||
{"name": "Trial mode", "link": "main.trial_mode_new"},
|
||||
{"name": "Tracking usage", "link": "main.pricing"},
|
||||
{"name": "Delivery Status", "link": "main.message_status"},
|
||||
{"name": "Guidance", "link": "main.guidance_index"},
|
||||
]
|
||||
if not current_app.config.get("FEATURE_BEST_PRACTICES_ENABLED"):
|
||||
nav_items = [
|
||||
item for item in nav_items if item["link"] != "main.best_practices"
|
||||
]
|
||||
|
||||
return nav_items
|
||||
|
||||
|
||||
def best_practices_nav():
|
||||
@@ -131,6 +108,10 @@ def about_notify_nav():
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
"name": "Security",
|
||||
"link": "main.about_security",
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user