From 9a8d8e12cf5c1a6931a1317eefebe73490f82132 Mon Sep 17 00:00:00 2001 From: alexjanousekGSA Date: Tue, 19 Nov 2024 09:41:08 -0500 Subject: [PATCH] Added new header button that is displayed in header --- app/__init__.py | 12 ++++++++++++ app/templates/components/header.html | 28 ++++++++++++++++++++-------- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index 64580fcc1..43a60abab 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -173,6 +173,18 @@ def create_app(application): ] return dict(FEATURE_BEST_PRACTICES_ENABLED=feature_best_practices_enabled) + @application.context_processor + def inject_feature_flags(): + feature_best_practices_enabled = application.config[ + "FEATURE_ABOUT_PAGE_ENABLED" + ] + return dict(FEATURE_ABOUT_PAGE_ENABLED=feature_best_practices_enabled) + + @application.context_processor + def inject_initial_signin_url(): + url = os.getenv("LOGIN_DOT_GOV_INITIAL_SIGNIN_URL") + return {'initial_signin_url': url} + notify_environment = os.environ["NOTIFY_ENVIRONMENT"] application.config.from_object(configs[notify_environment]) diff --git a/app/templates/components/header.html b/app/templates/components/header.html index 248abf250..012b3b9c1 100644 --- a/app/templates/components/header.html +++ b/app/templates/components/header.html @@ -43,18 +43,29 @@ secondary_navigation.is_selected('settings')},
-