From 8c854fcda17e22a6f20efdf040bcab4b3eb2d5c4 Mon Sep 17 00:00:00 2001 From: senator Date: Fri, 25 Feb 2011 11:53:58 -0500 Subject: [PATCH] provide three rows of search input by default this better accommodates users with no JS --- Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm | 1 + Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm index beb9ee92cc..e4b0741dbf 100644 --- a/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm +++ b/Open-ILS/src/perlmods/lib/OpenILS/WWW/EGCatLoader/Search.pm @@ -21,6 +21,7 @@ sub _prepare_biblio_search_basics { for (my $i = 0; $i < scalar @{$parts{'qtype'}}; $i++) { my ($qtype, $contains, $query) = map { $parts{$_}->[$i] } @part_names; + next unless $query =~ /\S/; push(@chunks, $qtype . ':') unless $qtype eq 'keyword' and $i == 0; # This stuff probably will need refined or rethought to better handle diff --git a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 index afa97ffeb8..2f874c92ce 100644 --- a/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 +++ b/Open-ILS/web/templates/default/opac/parts/advanced/global_row.tt2 @@ -1,7 +1,7 @@ [% contains = CGI.param('contains'); queries = CGI.param('query'); - qtypes = CGI.param('qtype') || ['keyword']; + qtypes = CGI.param('qtype') || ['keyword' x 3]; FOR qtype IN qtypes; c = contains.shift; q = queries.shift; %] -- 2.11.0