From e6e124d98ae5bf4af031b2cf13f52e84c79d9afd Mon Sep 17 00:00:00 2001 From: Kathy Lussier Date: Wed, 17 May 2017 12:11:33 -0400 Subject: [PATCH] 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 --- .../src/templates/opac/parts/result/table.tt2 | 15 --------------- Open-ILS/src/templates/opac/parts/searchbar.tt2 | 16 ++++++++++++++++ 2 files changed, 16 insertions(+), 15 deletions(-) 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 -%]
-- 2.43.2