From 63f8d79e608e5692984ef1015df3f54d3f09cd85 Mon Sep 17 00:00:00 2001 From: Jessica Woolford Date: Tue, 6 Nov 2018 14:09:57 -0500 Subject: [PATCH] LP#1801999: Add an alert message for the public catalog. This is an additional message to the maintenance message. Example use case: ILL delivery service temporarily unavailable. Includes release notes. Signed-off-by: Jessica Woolford --- Open-ILS/src/templates/opac/css/style.css.tt2 | 7 +++++++ Open-ILS/src/templates/opac/parts/config.tt2 | 4 ++++ Open-ILS/src/templates/opac/parts/topnav.tt2 | 3 +++ docs/RELEASE_NOTES_NEXT/OPAC/additional-alert-message.adoc | 4 ++++ 4 files changed, 18 insertions(+) create mode 100644 docs/RELEASE_NOTES_NEXT/OPAC/additional-alert-message.adoc diff --git a/Open-ILS/src/templates/opac/css/style.css.tt2 b/Open-ILS/src/templates/opac/css/style.css.tt2 index 31bd8171fd..1eea76c2de 100644 --- a/Open-ILS/src/templates/opac/css/style.css.tt2 +++ b/Open-ILS/src/templates/opac/css/style.css.tt2 @@ -2540,6 +2540,13 @@ a.preflib_change { text-align: center; } +#alert_message { + padding: 5px; + width: 100%; + background-color: [% css_colors.text_attention %]; + text-align: center; +} + #search-box > span { margin: 0 1em; } diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index ac85bdfa3a..6f09cdbe76 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -194,6 +194,10 @@ ctx.google_books_preview = 0; # Set a maintenance message to display in the catalogue # # ctx.maintenance_message = "The system will not be available February 29, 2104."; +# +# Set an alert message to display in the catalogue +# +# ctx.alert_message = "This is an important message that all users should see."; ############################################################################## # Depth Button/Checkbox diff --git a/Open-ILS/src/templates/opac/parts/topnav.tt2 b/Open-ILS/src/templates/opac/parts/topnav.tt2 index f8dd9edc8b..03e039c3f1 100644 --- a/Open-ILS/src/templates/opac/parts/topnav.tt2 +++ b/Open-ILS/src/templates/opac/parts/topnav.tt2 @@ -1,6 +1,9 @@ [%- IF ctx.maintenance_message -%]
[% ctx.maintenance_message %]
[%- END -%] +[%- IF ctx.alert_message -%] +
[% ctx.alert_message %]
+[%- END -%] [% IF !ctx.is_staff %]