From 46931d21213fe60734d5707317c246ec73af0a67 Mon Sep 17 00:00:00 2001 From: Marcel de Rooy Date: Thu, 24 Jun 2021 13:43:20 +0000 Subject: [PATCH] Bug 26302: Add dbrev for two new prefs Adding two prefs: resultsMaxItems resultsMaxItemsUnavailable Test plan: Check Preferences/OPAC/Appearance. Signed-off-by: David Nind Signed-off-by: Owen Leonard Signed-off-by: David Nind --- installer/data/mysql/atomicupdate/bug_26302.perl | 9 +++++++++ installer/data/mysql/mandatory/sysprefs.sql | 2 ++ .../prog/en/modules/admin/preferences/opac.pref | 7 +++++++ 3 files changed, 18 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_26302.perl diff --git a/installer/data/mysql/atomicupdate/bug_26302.perl b/installer/data/mysql/atomicupdate/bug_26302.perl new file mode 100644 index 0000000000..1bbaa3a60e --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_26302.perl @@ -0,0 +1,9 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + $dbh->do(q| + INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES + ('resultsMaxItems','2','','Maximum number of available items displayed in search results','Integer'), + ('resultsMaxItemsUnavailable','1','','Maximum number of unavailable items displayed in search results','Integer') + |); + NewVersion( $DBversion, 26302, "Add preferences resultsMaxItems and resultsMaxItemsUnavailable"); +} diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 6b66e42c14..6c55efb37c 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -576,6 +576,8 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('RestrictedPageContent','',NULL,'HTML content of the restricted page','TextArea'), ('RestrictedPageTitle','',NULL,'Title of the restricted page (breadcrumb and header)','Free'), ('RestrictionBlockRenewing','0',NULL,'If patron is restricted, should renewal be allowed or blocked','YesNo'), +('resultsMaxItems','2','','Maximum number of available items displayed in search results','Integer'), +('resultsMaxItemsUnavailable','1','','Maximum number of unavailable items displayed in search results','Integer'), ('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'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref index 535f65bd87..50e690ccee 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/opac.pref @@ -354,6 +354,13 @@ OPAC: - "List the following not for loan statuses as available for reference in OPAC search results:" - pref: Reference_NFL_Statuses - "(Use | as delimiter.)" + - + - Show no more than + - pref: resultsMaxItems + - (available) individual items on the OPAC XSLT search results, and show no more than + - pref: resultsMaxItemsUnavailable + - "'really unavailable' individual items in categories like Checked out, Damaged, On Hold, etc." + Features: - - pref: OPACReportProblem -- 2.20.1