From cd50dedd9046ee3a676bf9e1af57c5b0767bad8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jose=20Garc=C3=ADa?= Date: Mon, 4 Nov 2024 16:22:35 +0100 Subject: [PATCH] Configuration to display an application banner (#8416) * Add configuration to display an application banner * Add configuration to display an application banner - use translations for the message * Application banner - update style --- .../resources/catalog/locales/en-admin.json | 3 +++ .../resources/catalog/style/gn_search.less | 9 +++++++++ .../templates/admin/settings/system.html | 1 - .../views/default/directives/directive.js | 19 +++++++++++++++++++ .../partials/applicationBanner.html | 3 +++ .../views/default/templates/index.html | 2 ++ .../setup/sql/data/data-db-default.sql | 3 +++ .../sql/migrate/v446/migrate-default.sql | 2 ++ 8 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 web-ui/src/main/resources/catalog/views/default/directives/partials/applicationBanner.html diff --git a/web-ui/src/main/resources/catalog/locales/en-admin.json b/web-ui/src/main/resources/catalog/locales/en-admin.json index 7f3cd11fd34..18eba6e7a79 100644 --- a/web-ui/src/main/resources/catalog/locales/en-admin.json +++ b/web-ui/src/main/resources/catalog/locales/en-admin.json @@ -850,6 +850,9 @@ "system/xlinkResolver/localXlinkEnable-help": "Local XLinks are using local:/// URL to make references to related sections instead of HTTP URL. Local XLinks are usually faster than HTTP XLinks.", "system/xlinkResolver/ignore": "Elements to ignore by XLink resolution", "system/xlinkResolver/ignore-help": "Comma separated list of elements to ignore by XLink resolution", + "system/banner": "Application banner", + "system/banner/enable": "Enable", + "system/banner/enable-help": "If set, an application banner is displayed with the message configured. To configure the message, go to Language and translations and configure a translation with the key application-banner", "metadata/workflow": "Metadata workflow", "metadata/workflow/automaticUnpublishInvalidMd": "Automatic unpublication of invalid metadata", "metadata/workflow/automaticUnpublishInvalidMd-help": " Automatically unpublishes metadata that is edited that becomes not valid according to xsd or schematron rules.", diff --git a/web-ui/src/main/resources/catalog/style/gn_search.less b/web-ui/src/main/resources/catalog/style/gn_search.less index 990fb699d59..88a286e9383 100644 --- a/web-ui/src/main/resources/catalog/style/gn_search.less +++ b/web-ui/src/main/resources/catalog/style/gn_search.less @@ -608,6 +608,15 @@ } } +.application-banner { + background-color: #fff8c5; + border: 1px solid #d4a72c66; + margin: 15px; + padding: 15px; + border-radius: 4px; + color: #000; +} + button:focus [role="tooltip"], button:hover [role="tooltip"] { clip: auto; diff --git a/web-ui/src/main/resources/catalog/templates/admin/settings/system.html b/web-ui/src/main/resources/catalog/templates/admin/settings/system.html index 6adfb7f93a1..cb22bbd21c2 100644 --- a/web-ui/src/main/resources/catalog/templates/admin/settings/system.html +++ b/web-ui/src/main/resources/catalog/templates/admin/settings/system.html @@ -397,7 +397,6 @@

{{section2.name | translate}}

> {{s.value}} -