
This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "Evergreen ILS". The branch, main has been updated via c1d85e778bcec8a99dd085ab8f7946ff5faae747 (commit) from 7d48946e9136cdd9d41c5c6a985ca5fe40fa0f9e (commit) Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below. - Log ----------------------------------------------------------------- commit c1d85e778bcec8a99dd085ab8f7946ff5faae747 Author: Terran McCanna <tmccanna@georgialibraries.org> Date: Wed Mar 19 14:38:21 2025 -0400 LP2103646 Improve OPAC Alert library setting functionality As a follow-up to moving control of the OPAC alert banner from config.tt2 to a group of library settings that was merged for inclusion in 3.15: - Allow HTML to be added into the OPAC Alert Banner: Text library setting, but prevent scripts from running if inserted - Prevent empty banner from displaying if OPAC Alert Banner: Display is enabled but the text isn't populated Release-note: Allows basic HTML in OPAC alert banner. Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org> Signed-off-by: Michele Morgan <mmorgan@noblenet.org> diff --git a/Open-ILS/src/templates-bootstrap/opac/parts/topnav.tt2 b/Open-ILS/src/templates-bootstrap/opac/parts/topnav.tt2 index 3b6436c6a7..21bc934139 100755 --- a/Open-ILS/src/templates-bootstrap/opac/parts/topnav.tt2 +++ b/Open-ILS/src/templates-bootstrap/opac/parts/topnav.tt2 @@ -1,10 +1,12 @@ <header> -[% IF ctx.get_org_setting(ctx.physical_loc || ctx.aou_tree.id, 'opac.alert_banner_show') %] +[% IF ctx.get_org_setting(ctx.physical_loc || ctx.aou_tree.id, 'opac.alert_banner_show') + && ctx.get_org_setting(ctx.physical_loc || ctx.aou_tree.id, 'opac.alert_banner_text') + && ctx.get_org_setting(ctx.physical_loc || ctx.aou_tree.id, 'opac.alert_banner_type') %] <div class="alert alert-[% ctx.get_org_setting(ctx.physical_loc || ctx.aou_tree.id, 'opac.alert_banner_type') | html %] <button type="button" class="close" data-dismiss="alert" aria-label="Close"> <span aria-hidden="true">×</span> </button> - [% ctx.get_org_setting(ctx.physical_loc || ctx.aou_tree.id, 'opac.alert_banner_text') | html %] + [% ctx.defang_string(ctx.get_org_setting(ctx.physical_loc || ctx.aou_tree.id, 'opac.alert_banner_text')) %] </div> [%- END -%] ----------------------------------------------------------------------- Summary of changes: Open-ILS/src/templates-bootstrap/opac/parts/topnav.tt2 | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) hooks/post-receive -- Evergreen ILS