@@ -, +, @@ keep search term visible - The search term you searched for is not displayed in the input field. - The links in the result list are missing the index and because of that, are not giving the correct results. - Go to the advanced search, select an index to search in - Enter a search term and check 'scan indexes' - Submit search - Check if the search term is visible in the input box - Check if the result links contain your selected index and give you correct results (count and the number of results should match) --- catalogue/search.pl | 7 ++++++- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) --- a/catalogue/search.pl +++ a/catalogue/search.pl @@ -492,6 +492,7 @@ my $searcher = Koha::SearchEngine::Search->new( ## parse the query_cgi string and put it into a form suitable for s my @query_inputs; my $scan_index_to_use; +my $scan_search_term_to_use; for my $this_cgi ( split('&',$query_cgi) ) { next unless $this_cgi; @@ -502,9 +503,13 @@ for my $this_cgi ( split('&',$query_cgi) ) { if ($input_name eq 'idx') { $scan_index_to_use = $input_value; # unless $scan_index_to_use; } + if ($input_name eq 'q') { + $scan_search_term_to_use = $input_value; + } } $template->param ( QUERY_INPUTS => \@query_inputs, - scan_index_to_use => $scan_index_to_use ); + scan_index_to_use => $scan_index_to_use, + scan_search_term_to_use => $scan_search_term_to_use ); ## parse the limit_cgi string and put it into a form suitable for s my @limit_inputs; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -421,7 +421,11 @@ var holdForPatron = function () { @@ -467,7 +471,7 @@ var holdForPatron = function () { [% FOREACH SEARCH_RESULT IN SEARCH_RESULTS %]
- Scan Index for: + [% IF ( scan_search_term_to_use ) %] + Scan Index for: + [% ELSE %] + Scan Index for: + [% END %]
- [% SEARCH_RESULT.title |html %] + [% SEARCH_RESULT.title |html %] [% SEARCH_RESULT.author %] --