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 <miker@esilibrary.com>
Signed-off-by: Kathy Lussier <klussier@masslnc.org>
Signed-off-by: Dan Wells <dbw2@calvin.edu>
# 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
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;
</a>
</div>
[% END %]
+ [% IF !search.no_highlight %]
+ <div class="rdetail_aux_utils highlighting">
+ [% IF CGI.param('no_highlight') %]
+ <a href="[% mkurl('', {}, ['no_highlight']) %]" class="no-dec">
+ [% ELSE %]
+ <a href="[% mkurl('', {no_highlight => '1'}) %]" class="no-dec">
+ [% END %]
+ <img src="[% ctx.media_prefix %]/images/highlight.png[% ctx.cache_key %]" alt="[% l('Toggle highlighting') %]" />
+ [% CGI.param('no_highlight') ? l('Enable Highlighting') : l('Disable Highlighting') %]
+ </a>
+ </div>
+ [% END %]
[%- IF ctx.is_staff %]
<div class="rdetail_aux_utils clear_addedcontent_cache">
<a href="[% ctx.media_prefix %]/opac/extras/ac/clearcache/all/r/[% ctx.bre_id | uri %]" class="no-dec" target="_blank">
id='search_org_selector' show_loc_groups=1
-%]
</label>
- <span>
+ <span>
<input id="detail" type="hidden" name="detail_record_view" value="[% show_detail_view %]"/>
<input id='search-submit-go' type="submit" value="[% l('Search') %]" class="opac-button"
onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden";[% IF ctx.depth_sel_button AND NOT took_care_of_form %] $("search-submit-go-depth").className="hidden";[% END %]}, 2000)'/>
onclick='setTimeout(function(){$("search-submit-spinner").className=""; $("search-submit-go").className="hidden"; $("search-submit-go-depth").className="hidden";}, 2000)' title="[% ctx.depth_sel_tooltip | html %]">[% ctx.depth_sel_button_label | html %]</button>
[%- END %]
<img id='search-submit-spinner' src='[% ctx.media_prefix %]/opac/images/progressbar_green.gif[% ctx.cache_key %]' style='height:16px;width:16px;' class='hidden' alt='[% l("Search In Progress") %]'/>
- </span>
+ [%- IF took_care_of_form && !search.no_highlight %]
+ <label for="no_highlight">
+ <input type="checkbox" id="no_highlight" name="no_highlight" value="1"
+ onchange="search_modifier_onchange('no_highlight', this, true)"
+ [% CGI.param('no_highlight').size ? ' checked="checked"' : '' %] />
+ [% l('Disable Highlighting') %]
+ </label>
+ [%- END %]
+ </span>
</div>
[% IF ctx.bookbag %]
<div id="search-only-bookbag-container">