From e823fb8fb2645992201804ffed6cf2f98bc83ad7 Mon Sep 17 00:00:00 2001 From: Ere Maijala Date: Thu, 28 Mar 2019 13:44:39 +0200 Subject: [PATCH] Bug 22592: Fixes to index scan Makes sure the scan term is displayed and redirection to record page is not used with index scan for a single result. Also adds a submit button so that you can submit a change for selected index or term easier. Signed-off-by: Michal Denar Signed-off-by: Michal Denar --- catalogue/search.pl | 6 +++--- koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt | 3 ++- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/catalogue/search.pl b/catalogue/search.pl index 514c4a9b2c..c670c584b6 100755 --- a/catalogue/search.pl +++ b/catalogue/search.pl @@ -498,7 +498,7 @@ if ($query_cgi) { if ($input_name eq 'idx') { $scan_index_to_use = $input_value; # unless $scan_index_to_use; } - if ($input_name eq 'q') { + if (!defined $scan_search_term_to_use && $input_name eq 'q') { $scan_search_term_to_use = Encode::decode_utf8( uri_unescape( $input_value )); } } @@ -582,8 +582,8 @@ for (my $i=0;$i<@servers;$i++) { $template->param( EnableSearchHistory => 1 ); } - ## If there's just one result, redirect to the detail page - if ($total == 1) { + ## If there's just one result, redirect to the detail page unless doing an index scan + if ($total == 1 && !$scan) { my $biblionumber = $newresults[0]->{biblionumber}; my $defaultview = C4::Context->preference('IntranetBiblioDefaultView'); my $views = { C4::Search::enabled_staff_search_views }; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt index 626b23823d..c559dd62ef 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/results.tt @@ -306,7 +306,7 @@ [% ELSE %][% END %] [% IF ( ms_ticommaphr ) %] [% ELSE %][% END %] - [% IF ( ms_aucommaphr ) %] + [% IF ( ms_au || ms_aucommaphr ) %] [% ELSE %][% END %] [% IF ( ms_su ) %] [% ELSE %][% END %] @@ -324,6 +324,7 @@ [% ELSE %][% END %] + -- 2.11.0