From ac26a1b2569636646e30406b42f9375444713a1c Mon Sep 17 00:00:00 2001 From: Bo-Chun Louis Chen <louistw@uab.edu> Date: Thu, 1 Jun 2023 21:02:20 -0500 Subject: [PATCH 1/3] Pass doc url as variable to goodstanding page --- app/__init__.py | 1 + app/templates/account/good_standing.html | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/app/__init__.py b/app/__init__.py index 61c72f5..da1fdca 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -106,6 +106,7 @@ def create_app(config_name): return render_template( "account/good_standing.html", good_standing_msg=messages.good_standing_message, + docs_url=app_vars.docs_url, ) return render_template( diff --git a/app/templates/account/good_standing.html b/app/templates/account/good_standing.html index d81f0ad..b1b4dac 100644 --- a/app/templates/account/good_standing.html +++ b/app/templates/account/good_standing.html @@ -33,7 +33,7 @@ <div class="navbar-right"> <ul class="nav navbar-nav"> <li> - <a target="_blank" href="https://docs.uabgrid.uab.edu/wiki/Cheaha_GettingStarted"> + <a target="_blank" href="{{ docs_url }}"> <i class="fas fa-info-circle fa-fw"></i> Online Documentation </a> </li> -- GitLab From 56654331eac46d7b4a99e0dfc36b93f3b06b0f1d Mon Sep 17 00:00:00 2001 From: Bo-Chun Louis Chen <louistw@uab.edu> Date: Thu, 1 Jun 2023 22:10:13 -0500 Subject: [PATCH 2/3] Pass doc url as variable to other pages --- app/__init__.py | 4 ++++ app/templates/account/certify.html | 2 +- app/templates/account/hold.html | 2 +- app/templates/account/unauthorized.html | 2 +- app/templates/auth/SignUp.html | 2 +- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/__init__.py b/app/__init__.py index da1fdca..659bf45 100644 --- a/app/__init__.py +++ b/app/__init__.py @@ -76,12 +76,14 @@ def create_app(config_name): return render_template( "account/unauthorized.html", unauthorized_msg=messages.unauthorized_message, + docs_url=app_vars.docs_url, ) if rc_util.check_state(session["user"].get("username")) == "hold": return render_template( "account/hold.html", account_hold_msg=messages.account_hold_message, + docs_url=app_vars.docs_url, ) if ( @@ -101,6 +103,7 @@ def create_app(config_name): cancel_msg=messages.cancel_message, pre_certification_msg=messages.pre_certification_message, certification_msg=messages.certification_message, + docs_url=app_vars.docs_url, ) if rc_util.check_state(session["user"].get("username")) == "ok": return render_template( @@ -120,6 +123,7 @@ def create_app(config_name): welcome_msg=messages.welcome_message, cancel_msg=messages.cancel_message, error_msg=messages.error_message, + docs_url=app_vars.docs_url, ) # misc page error catching diff --git a/app/templates/account/certify.html b/app/templates/account/certify.html index 8afa6f4..c120c44 100644 --- a/app/templates/account/certify.html +++ b/app/templates/account/certify.html @@ -63,7 +63,7 @@ <div class="navbar-right"> <ul class="nav navbar-nav"> <li> - <a target="_blank" href="https://uabrc.github.io/"> + <a target="_blank" href="{[ docs_url }}"> <i class="fas fa-info-circle fa-fw"></i> Online Documentation </a> </li> diff --git a/app/templates/account/hold.html b/app/templates/account/hold.html index c8c9203..08341c4 100644 --- a/app/templates/account/hold.html +++ b/app/templates/account/hold.html @@ -33,7 +33,7 @@ <div class="navbar-right"> <ul class="nav navbar-nav"> <li> - <a target="_blank" href="https://uabrc.github.io/"> + <a target="_blank" href="{{ docs_url }}"> <i class="fas fa-info-circle fa-fw"></i> Online Documentation </a> </li> diff --git a/app/templates/account/unauthorized.html b/app/templates/account/unauthorized.html index 5dce0d2..c3d84a8 100644 --- a/app/templates/account/unauthorized.html +++ b/app/templates/account/unauthorized.html @@ -33,7 +33,7 @@ <div class="navbar-right"> <ul class="nav navbar-nav"> <li> - <a target="_blank" href="https://uabrc.github.io/"> + <a target="_blank" href="{{ docs_url }}"> <i class="fas fa-info-circle fa-fw"></i> Online Documentation </a> </li> diff --git a/app/templates/auth/SignUp.html b/app/templates/auth/SignUp.html index 26c1aaa..cea9ace 100644 --- a/app/templates/auth/SignUp.html +++ b/app/templates/auth/SignUp.html @@ -63,7 +63,7 @@ <div class="navbar-right"> <ul class="nav navbar-nav"> <li> - <a target="_blank" href="https://uabrc.github.io/"> + <a target="_blank" href="{{ docs_url }}"> <i class="fas fa-info-circle fa-fw"></i> Online Documentation </a> </li> -- GitLab From df7c6b39d461731d92cba0f88dade9ba878fdac0 Mon Sep 17 00:00:00 2001 From: Bo-Chun Louis Chen <louistw@uab.edu> Date: Fri, 2 Jun 2023 10:41:22 -0500 Subject: [PATCH 3/3] Fix typo --- app/templates/account/certify.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/templates/account/certify.html b/app/templates/account/certify.html index c120c44..3114a6a 100644 --- a/app/templates/account/certify.html +++ b/app/templates/account/certify.html @@ -63,7 +63,7 @@ <div class="navbar-right"> <ul class="nav navbar-nav"> <li> - <a target="_blank" href="{[ docs_url }}"> + <a target="_blank" href="{{ docs_url }}"> <i class="fas fa-info-circle fa-fw"></i> Online Documentation </a> </li> -- GitLab