From: Mike Rylander Date: Wed, 10 Jan 2018 19:44:48 +0000 (-0500) Subject: LP#1744385: Allow highlight disabling globally via config.tt2 X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f5c6bffd3645e538d6908d5967004b5648b5478f;p=evergreen%2Fjoelewis.git LP#1744385: Allow highlight disabling globally via config.tt2 Also, add CC0 highlighter icon from https://pixabay.com/en/highlight-highlighter-highlighting-2022407/ and provide highlight en/dis-able. Signed-off-by: Mike Rylander Signed-off-by: Kathy Lussier Signed-off-by: Dan Wells --- diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index 28f730cdeb..ac731cd28b 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -181,6 +181,9 @@ search.basic_config = { # Make metarecord search the default. #search.metarecord_default = 1; +# Disable search term highlighting +#search.no_highlight = 1; + ############################################################################## # Show Google Book Previews # Set to 1 or 'true' to enable diff --git a/Open-ILS/src/templates/opac/parts/misc_util.tt2 b/Open-ILS/src/templates/opac/parts/misc_util.tt2 index 2d48ccc53f..ba507bd6eb 100644 --- a/Open-ILS/src/templates/opac/parts/misc_util.tt2 +++ b/Open-ILS/src/templates/opac/parts/misc_util.tt2 @@ -108,7 +108,7 @@ args.display_fields = {}; args.hl = {}; - IF !CGI.param('no_highlight'); + IF !CGI.param('no_highlight') && !search.no_highlight; args.display_field_list = ctx.fetch_display_fields(args.df_bib_list.list); FOR df IN args.display_field_list; diff --git a/Open-ILS/src/templates/opac/parts/record/summary.tt2 b/Open-ILS/src/templates/opac/parts/record/summary.tt2 index 20b7d368a3..15d2a37fb0 100644 --- a/Open-ILS/src/templates/opac/parts/record/summary.tt2 +++ b/Open-ILS/src/templates/opac/parts/record/summary.tt2 @@ -138,6 +138,18 @@ [% END %] + [% IF !search.no_highlight %] + + [% END %] [%- IF ctx.is_staff %] [% IF ctx.bookbag %]
diff --git a/Open-ILS/web/images/highlight.png b/Open-ILS/web/images/highlight.png new file mode 100644 index 0000000000..d550b46c8d Binary files /dev/null and b/Open-ILS/web/images/highlight.png differ