Skip to content

Commit

Permalink
Add AppConfig option to remove email link from temporaryMessages
Browse files Browse the repository at this point in the history
Closes #1525
  • Loading branch information
laurenwalker committed Nov 2, 2020
1 parent 34d4901 commit cd1bb8b
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 3 deletions.
9 changes: 9 additions & 0 deletions src/js/models/AppModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,15 @@ define(['jquery', 'underscore', 'backbone'],
*/
temporaryMessageContainer: "#Navbar",

/**
* If true, the temporary message will include a "Need help? Email us at..." email link
* at the end of the message. The email address will be set to {@link AppConfig#emailContact}
* @type {boolean}
* @default true
* @since 2.13.3
*/
temporaryMessageIncludeEmail: true,

/**
* Show or hide the source repository logo in the search result rows
* @type {boolean}
Expand Down
2 changes: 1 addition & 1 deletion src/js/themes/arctic/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ MetacatUI.AppConfig = Object.assign({
defaultSearchFilters: ["all", "attribute", "annotation", "creator", "dataYear", "pubYear", "id", "taxon", "spatial"],

//Temp message
temporaryMessage: "The Arctic Data Center will be unavailable between 11 p.m. PT on Monday, June 15 and 6:30 a.m. PT on Tuesday, June 16 due to upgrades. We apologize for the inconvenience.",
temporaryMessage: "",
temporaryMessageStartTime: null,
temporaryMessageEndTime: new Date("2020-06-16T13:30:00"),
temporaryMessageClasses: "warning",
Expand Down
2 changes: 1 addition & 1 deletion src/js/themes/knb/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ MetacatUI.AppConfig = Object.assign({
displayRepoLogosInSearchResults: true,

//Temp message
temporaryMessage: "The KNB will be unavailable between 11 p.m. PT on Monday, June 15 and 6:30 a.m. PT on Tuesday, June 16 due to upgrades. We apologize for the inconvenience.",
temporaryMessage: "",
temporaryMessageClasses: "warning auto-height-member",
temporaryMessageContainer: "#HeaderContainer",
temporaryMessageEndTime: new Date("2020-06-16T13:30:00"),
Expand Down
2 changes: 1 addition & 1 deletion src/js/views/AppView.js
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ define(['jquery',
$(container).prepend( _.template(alertTemplate)({
classes: classes,
msg: MetacatUI.appModel.get("temporaryMessage"),
includeEmail: true,
includeEmail: MetacatUI.appModel.get("temporaryMessageIncludeEmail"),
remove: true
}) );

Expand Down

0 comments on commit cd1bb8b

Please sign in to comment.