From: Kathy Lussier Date: Wed, 17 May 2017 16:11:33 +0000 (-0400) Subject: LP#1677902: Remove search formats from advanced search limiter block X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=f46fbdf5d3e31f8a8c3248b03aa85591ac23db02;p=Evergreen.git LP#1677902: Remove search formats from advanced search limiter block The original behavior of the advanced search limiter block was to remove search formats from the display because it is available for limiting in the search bar. Other code broke this behavior, and I've now restored it by adding the ignore search format code to the searchbar.tt2 file. It also fixes a problem where the search format limiters were incorrectly displaying on the low hits page. Signed-off-by: Kathy Lussier Signed-off-by: Jeff Davis --- diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2 index a5034845ef..e2fa5bad6b 100644 --- a/Open-ILS/src/templates/opac/parts/result/table.tt2 +++ b/Open-ILS/src/templates/opac/parts/result/table.tt2 @@ -8,21 +8,6 @@ result_count = ctx.result_start; - # don't display a box for the search_format filter, - # as that's got its own widget - ignore_filters = ['search_format']; - - trimmed_filters = []; - FOR filter IN ctx.query_struct.filters; - fname = filter.name; - IF ignore_filters.grep('^' _ fname _ '$').size; - NEXT; - END; - trimmed_filters.push(filter); - END; - - ctx.query_struct.filters = trimmed_filters; - %] [% PROCESS "opac/parts/result/paginate.tt2" %] diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2 index 5e2560588d..ddf68cf3ec 100644 --- a/Open-ILS/src/templates/opac/parts/searchbar.tt2 +++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2 @@ -12,7 +12,23 @@ FOR f IN ctx.query_struct.filters; fcount = fcount + 1; END; + # don't display a box for the search_format filter, + # as that's got its own widget + ignore_filters = ['search_format']; + + trimmed_filters = []; + FOR filter IN ctx.query_struct.filters; + fname = filter.name; + IF ignore_filters.grep('^' _ fname _ '$').size; + NEXT; + END; + trimmed_filters.push(filter); + END; + + ctx.query_struct.filters = trimmed_filters; + %] +
[% UNLESS took_care_of_form -%]