From 37224a38f4bae6ff580de68edc1a1e30ed17aa1f Mon Sep 17 00:00:00 2001 From: Jake Litrell Date: Fri, 26 Feb 2016 18:41:40 -0500 Subject: [PATCH] LP#1519055: Make electronic search filter optional Making checkboxes configurable, and off by default. Release notes updated. Signed-off-by: Jake Litrell Signed-off-by: Ben Shum --- Open-ILS/src/templates/opac/parts/advanced/search.tt2 | 6 ++++++ Open-ILS/src/templates/opac/parts/config.tt2 | 6 ++++++ Open-ILS/src/templates/opac/results.tt2 | 2 ++ docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc | 2 ++ 4 files changed, 16 insertions(+) diff --git a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 b/Open-ILS/src/templates/opac/parts/advanced/search.tt2 index dd08cd23b0..79ae4c45ba 100644 --- a/Open-ILS/src/templates/opac/parts/advanced/search.tt2 +++ b/Open-ILS/src/templates/opac/parts/advanced/search.tt2 @@ -90,15 +90,20 @@ [% END %] + [% IF !ctx.exclude_electronic_checkbox %]
+ [% END %] [% l("and") %] + [% IF !ctx.exclude_electronic_checkbox %]
+ [% END %] + [% IF ctx.exclude_electronic_checkbox %]
+ [% END %] [% CASE "sort_selector"; INCLUDE "opac/parts/filtersort.tt2" diff --git a/Open-ILS/src/templates/opac/parts/config.tt2 b/Open-ILS/src/templates/opac/parts/config.tt2 index a95e54d2e6..58d2c09e41 100644 --- a/Open-ILS/src/templates/opac/parts/config.tt2 +++ b/Open-ILS/src/templates/opac/parts/config.tt2 @@ -192,6 +192,12 @@ ctx.depth_sel_tooltip = l('Select this option to expand your results to all libr 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 ############################################################################## diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2 index 284fbb9974..a89c7bf259 100644 --- a/Open-ILS/src/templates/opac/results.tt2 +++ b/Open-ILS/src/templates/opac/results.tt2 @@ -104,12 +104,14 @@ -%] [% END %] + [% IF ctx.exclude_electronic_checkbox %] + [% END %] diff --git a/docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc b/docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc index 5ba2378ad1..302c69bd28 100644 --- a/docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc +++ b/docs/RELEASE_NOTES_NEXT/OPAC/exclude-electronic-limiter.adoc @@ -5,3 +5,5 @@ on the advanced search screen and from the search results page. This limiter 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. -- 2.11.0