Skip to content

Commit

Permalink
Put research banner behind an env var [DAH-692] (#1432)
Browse files Browse the repository at this point in the history
* Add show/hide version section env var [DAH-692]

Co-authored-by: James Wills <[email protected]>
  • Loading branch information
software-project and james-wills-sf authored Feb 9, 2021
1 parent 99edf4e commit 3db55f5
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 1 deletion.
1 change: 1 addition & 0 deletions .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ S3_ACCESS_KEY=''
S3_ACCESS_KEY_ID=''
ADVERTISE_DALP=false
DALP_PROGRAM_INFO='The 2021 Downpayment Assistance Loan Program (DALP) will begin accepting applications on February 26, 2021.'
SHOW_RESEARCH_BANNER=false
COVID_UPDATE=false

SALESFORCE_USERNAME=''
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,9 @@ This script will:
- ADVERTISE_DALP -> If set to 'true', the Sales directory page will display info about applying to DALP in a "Help with downpayments" section. Otherwise it'll show the plain "Get help" section
- DALP_PROGRAM_INFO -> If provided, we will override the default DALP text of "The 2021 Downpayment Assistance Loan Program (DALP) will begin accepting applications on February 26, 2021." with whatever is in this env var.
### Other
- SHOW_RESEARCH_BANNER - If set to 'true', it displays research banner.
- COVID_UPDATE -> If set to 'true', shows COVID-19 update info in the apply section and hides pre lottery info

## Contributing changes

Use the engineering workflow and coding style standards established below. :smiley:
Expand Down
3 changes: 3 additions & 0 deletions app.json
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,9 @@
"DALP_PROGRAM_INFO": {
"required": false
},
"SHOW_RESEARCH_BANNER": {
"required": false
},
"COVID_UPDATE": {
"required": false
}
Expand Down
3 changes: 2 additions & 1 deletion app/views/layouts/application.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ html lang="en" ng-app="dahlia" ng-strict-di="" ng-controller="SharedController"
.skiptranslate
section(ui-view="alert")
section(ui-view="translate")
section(ui-view="version")
- if ENV['SHOW_RESEARCH_BANNER'] == 'true'
section(ui-view="version")
section(ui-view="navigation")
.loading-overlay(bs-loading-overlay)
section#main-content.main-content(ui-view="container")
Expand Down

0 comments on commit 3db55f5

Please sign in to comment.