Making checkboxes configurable, and off by default. Release notes updated.
Signed-off-by: Jake Litrell <jake@masslnc.org>
Signed-off-by: Ben Shum <ben@evergreener.net>
<option value="[% opt.code %]"[% CGI.param('pubdate') == opt.code ? ' selected="selected"' : '' %]>[% opt.label | html %]</option>
[% END %]
</select>
+ [% IF !ctx.exclude_electronic_checkbox %]
<br/>
<div id='adv_special_block'>
+ [% END %]
<input title="[% l('Search date') %]"
name='date1' type='text' size='4' maxlength='4' value="[% CGI.param('date1') | html %]" />
<span id='adv_global_pub_date_2_span' class='[% CGI.param("pubdate") == "between" ? "" : "hide_me" %]'>
[% l("and") %] <input name='date2'
title="[% l('Secondary search date') %]" type='text' size='4' maxlength='4' value="[% CGI.param('date2') | html %]" />
</span>
+ [% IF !ctx.exclude_electronic_checkbox %]
</div>
+ [% END %]
+ [% IF ctx.exclude_electronic_checkbox %]
<div class="adv_search_available">
<input type='checkbox' name="fi:-search_format" value="electronic"
[%- CGI.param('fi:-search_format').grep('electronic').size ?
[% l("Exclude Electronic Resources") %]
</label>
</div>
+ [% END %]
[%
CASE "sort_selector";
INCLUDE "opac/parts/filtersort.tt2"
ctx.depth_sel_resultshint = l('Showing results from all libraries');
##############################################################################
+# Exclude Electronic Resources Checkbox
+# One setting for both the advanced search page and the results bar.
+# Off by default; set to 1 to display.
+ctx.exclude_electronic_checkbox = 0;
+
+##############################################################################
# Metarecords configuration
# metarecords.disabled = 1; # disable all metarecord access points
##############################################################################
-%]
<input type="hidden" name="detail_record_view" value="1" />
[% END %]
+ [% IF ctx.exclude_electronic_checkbox %]
<label class="results_header_lbl" for='opac.result.excludeelec'>
<input type='checkbox' id='opac.result.excludeelec' name="fi:-search_format" value="electronic"
onchange="exclude_onchange(this)"
[%- CGI.param('fi:-search_format').grep('electronic').size ? ' checked="checked"' : '' %] />
[% l("Exclude Electronic Resources") %]
</label>
+ [% END %]
</div>
</div>
</div>
will exclude any search results with an item form of o or s. This limiter
will be applied on top of any other format limiters used in the search.
+The checkboxes are disabled by default; to display them in both places, please
+toggle the 'ctx.exclude_electronic_checkbox' setting in config.tt2.