@@ -, +, @@ optional --- catalogue/search.pl | 4 ++-- installer/data/mysql/mandatory/sysprefs.sql | 1 + installer/data/mysql/updatedatabase.pl | 1 - .../intranet-tmpl/prog/en/modules/admin/preferences/searching.pref | 7 +++++++ 4 files changed, 10 insertions(+), 3 deletions(-) --- a/catalogue/search.pl +++ a/catalogue/search.pl @@ -362,8 +362,8 @@ if ($indexes[0] && (!$indexes[1] || $params->{'scan'})) { # an operand can be a single term, a phrase, or a complete ccl query my @operands = map uri_unescape($_), $cgi->multi_param('q'); -# if a simple search, display the value in the search box -if ($operands[0] && !$operands[1]) { +# if a simple search and StaffRetainSearchTerms, display the value in the search box +if (C4::Context->preference('StaffRetainSearchTerms') && $operands[0] && !$operands[1]) { my $ms_query = $operands[0]; $ms_query =~ s/ #\S+//; $template->param(ms_value => $ms_query); --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -623,6 +623,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('StaffDetailItemSelection', '1', NULL, 'Enable item selection in record detail page', 'YesNo'), ('StaffLangSelectorMode','footer','top|both|footer','Select the location to display the language selector in staff interface','Choice'), ('StaffLoginInstructions', '', NULL, 'HTML to go into the login box for the staff interface','Free'), +('StaffRetainSearchTerms', '1', NULL, 'If enabled, searches entered into the search bar will be retained', 'YesNo'), ('StaffSearchResultsDisplayBranch','holdingbranch','holdingbranch|homebranch','Controls the display of the home or holding branch for staff search results','Choice'), ('StaffSerialIssueDisplayCount','3','','Number of serial issues to display per subscription in the staff interface','Integer'), ('StaticHoldsQueueWeight','0',NULL,'Specify a list of library location codes separated by commas -- the list of codes will be traversed and weighted with first values given higher weight for holds fulfillment -- alternatively, if RandomizeHoldsQueueWeight is set, the list will be randomly selective','Integer'), --- a/installer/data/mysql/updatedatabase.pl +++ a/installer/data/mysql/updatedatabase.pl @@ -23255,7 +23255,6 @@ if( CheckVersion( $DBversion ) ) { $DBversion = '20.06.00.063'; if( CheckVersion( $DBversion ) ) { $dbh->do(q{INSERT IGNORE INTO circulation_rules (branchcode, categorycode, itemtype, rule_name, rule_value) VALUES (NULL, NULL, NULL, 'decreaseloanholds', NULL) }); - NewVersion( $DBversion, 14866, "Add decreaseloanholds circulation rule" ); } --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -261,6 +261,13 @@ Searching: no: "don't search" - on all variations of the ISBN. - + - When searching from the header in the staff client + - pref: StaffRetainSearchTerms + choices: + yes: "retain" + no: "don't retain" + - search terms between searches. + - - pref: BiblioItemtypeInfo choices: yes: "Display" --