@@ -, +, @@ --- ...bug_26247-add_RetainCatalogSearchTerms_syspref.pl | 12 ++++++++++++ ...bug_26247-add_RetainPatronsSearchTerms_syspref.pl | 12 ++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 2 ++ .../prog/en/includes/catalogue-search-box.inc | 6 +++++- .../prog/en/includes/patron-search-header.inc | 4 ++++ .../prog/en/modules/admin/preferences/searching.pref | 12 ++++++++++++ 6 files changed, 47 insertions(+), 1 deletion(-) create mode 100644 installer/data/mysql/atomicupdate/bug_26247-add_RetainCatalogSearchTerms_syspref.pl create mode 100644 installer/data/mysql/atomicupdate/bug_26247-add_RetainPatronsSearchTerms_syspref.pl --- a/installer/data/mysql/atomicupdate/bug_26247-add_RetainCatalogSearchTerms_syspref.pl +++ a/installer/data/mysql/atomicupdate/bug_26247-add_RetainCatalogSearchTerms_syspref.pl @@ -0,0 +1,12 @@ +use Modern::Perl; + +return { + bug_number => "26247", + description => "Add new system preference RetainCatalogSearchTerms", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('RetainCatalogSearchTerms', '1', NULL, 'If enabled, searches entered into the catalog search bar will be retained', 'YesNo') }); + }, +}; --- a/installer/data/mysql/atomicupdate/bug_26247-add_RetainPatronsSearchTerms_syspref.pl +++ a/installer/data/mysql/atomicupdate/bug_26247-add_RetainPatronsSearchTerms_syspref.pl @@ -0,0 +1,12 @@ +use Modern::Perl; + +return { + bug_number => "26247", + description => "Add new system preference RetainPatronsSearchTerms", + up => sub { + my ($args) = @_; + my ($dbh, $out) = @$args{qw(dbh out)}; + + $dbh->do(q{INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) VALUES ('RetainPatronSearchTerms', '1', NULL, 'If enabled, searches entered into the checkout and patrons search bars will be retained', 'YesNo') }); + }, +}; --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -592,6 +592,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('RestrictionBlockRenewing','0',NULL,'If patron is restricted, should renewal be allowed or blocked','YesNo'), ('OPACResultsMaxItems','1','','Maximum number of available items displayed in search results','Integer'), ('OPACResultsMaxItemsUnavailable','0','','Maximum number of unavailable items displayed in search results','Integer'), +('RetainCatalogSearchTerms', '1', NULL, 'If enabled, searches entered into the catalog search bar will be retained', 'YesNo'), +('RetainPatronsSearchTerms', '1', NULL, 'If enabled, searches entered into the checkout and patrons search bar will be retained', 'YesNo'), ('ReturnBeforeExpiry','0',NULL,'If ON, checkout will be prevented if returndate is after patron card expiry','YesNo'), ('ReturnLog','1',NULL,'If ON, enables the circulation (returns) log','YesNo'), ('ReturnpathDefault','',NULL,'Use this email address as return path or bounce address for undeliverable emails','Free'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/catalogue-search-box.inc @@ -5,8 +5,12 @@ [% IF ( Koha.Preference('IntranetCatalogSearchPulldown') ) %] [% INCLUDE 'search_indexes.inc' %] [% END %] + [% IF ( Koha.Preference('RetainCatalogSearchTerms') ) %] - + [% ELSE %] + + [% END %] + [% END %] --- a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/patron-search-header.inc @@ -11,7 +11,11 @@
+ [% IF ( Koha.Preference('RetainPatronsSearchTerms') ) %] + [% ELSE %] + + [% END %] [-] [+] --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/searching.pref @@ -269,6 +269,18 @@ Searching: 1: "search" 0: "don't search" - on all variations of the ISBN. + - + - pref: RetainCatalogSearchTerms + choices: + 0: "Don't retain" + 1: "Retain" + - search terms between searches when searching from the 'search the catalog' tab in the staff interface header. + - + - pref: RetainPatronsSearchTerms + choices: + 0: "Don't retain" + 1: "Retain" + - search terms between searches when searching from the 'checkout' and 'search patrons' tab in the staff interface header. - - pref: BiblioItemtypeInfo choices: --