mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-09-10 10:03:21 -04:00
making sub nav items conditional on feature flag
This commit is contained in:
@@ -292,7 +292,6 @@ def benchmark_performance():
|
|||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
@main.route("/using-notify/guidance")
|
|
||||||
@main.route("/guides/using-notify/guidance")
|
@main.route("/guides/using-notify/guidance")
|
||||||
@user_is_logged_in
|
@user_is_logged_in
|
||||||
def guidance_index():
|
def guidance_index():
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
from flask import (
|
||||||
|
current_app,
|
||||||
|
)
|
||||||
|
|
||||||
def features_nav():
|
def features_nav():
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
@@ -22,46 +26,19 @@ def features_nav():
|
|||||||
|
|
||||||
|
|
||||||
def using_notify_nav():
|
def using_notify_nav():
|
||||||
return [
|
nav_items = [
|
||||||
{
|
{"name": "Get started", "link": "main.get_started"},
|
||||||
"name": "Get started",
|
{"name": "Guides", "link": "main.best_practices"},
|
||||||
"link": "main.get_started",
|
{"name": "Trial mode", "link": "main.trial_mode_new"},
|
||||||
},
|
{"name": "Tracking usage", "link": "main.pricing"},
|
||||||
{
|
{"name": "Delivery Status", "link": "main.message_status"},
|
||||||
"name": "Guides",
|
{"name": "Guidance", "link": "main.guidance_index"},
|
||||||
"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",
|
|
||||||
# },
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
|
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():
|
def best_practices_nav():
|
||||||
|
|||||||
Reference in New Issue
Block a user