From 3e1b6e8bb8053830342e709f30f2f72d6497f030 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Mon, 15 Aug 2022 16:12:20 +0100 Subject: [PATCH] Bug 31028: Add `CatalogConcerns` and `OpacCatalogConcerns` preferences This patch adds the `CatalogConcerns` and `OpacCatalogeConcerns` system preferences to enable/disable the catalog concerns feature on the OPAC and Staff client interfaces. --- installer/data/mysql/atomicupdate/bug_31028.pl | 14 ++++++++++++++ installer/data/mysql/mandatory/sysprefs.sql | 2 ++ .../en/modules/admin/preferences/cataloguing.pref | 8 ++++++++ .../prog/en/modules/admin/preferences/opac.pref | 8 ++++++++ 4 files changed, 32 insertions(+) diff --git a/installer/data/mysql/atomicupdate/bug_31028.pl b/installer/data/mysql/atomicupdate/bug_31028.pl index 82ea1d27ed..276d14835a 100644 --- a/installer/data/mysql/atomicupdate/bug_31028.pl +++ b/installer/data/mysql/atomicupdate/bug_31028.pl @@ -26,5 +26,19 @@ return { say $out "Added new table 'catalog_concerns'"; } + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('CatalogConcerns', '0', NULL, 'Allow users to report catalog concerns', 'YesNo') + } + ); + + $dbh->do( + q{ + INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` ) VALUES + ('OpacCatalogConcerns', '0', NULL, 'Allow logged in OPAC users to report catalog concerns', 'YesNo') + } + ); }, } diff --git a/installer/data/mysql/mandatory/sysprefs.sql b/installer/data/mysql/mandatory/sysprefs.sql index 9a5cb2e0a8..93a6d89923 100644 --- a/installer/data/mysql/mandatory/sysprefs.sql +++ b/installer/data/mysql/mandatory/sysprefs.sql @@ -127,6 +127,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('casLogout','0','','Does a logout from Koha should also log the user out of CAS?','YesNo'), ('casServerUrl','https://localhost:8443/cas','','URL of the cas server','Free'), ('casServerVersion','2', '2|3','Version of the CAS server Koha will connect to.','Choice'), +('CatalogConcerns', '0', NULL, 'Allow users to report catalog concerns', 'YesNo'), ('CatalogModuleRelink','0',NULL,'If OFF the linker will never replace the authids that are set in the cataloging module.','YesNo'), ('CataloguingLog','1',NULL,'If ON, log edit/create/delete actions on bibliographic data. WARNING: this feature is very resource consuming.','YesNo'), ('ChargeFinesOnClosedDays','0',NULL,'Charge fines on days the library is closed.','YesNo'), @@ -419,6 +420,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('OpacBrowser','0',NULL,'If ON, enables subject authorities browser on OPAC (needs to set misc/cronjob/sbuild_browser_and_cloud.pl)','YesNo'), ('OpacBrowseResults','1',NULL,'Disable/enable browsing and paging search results from the OPAC detail page.','YesNo'), ('OpacBrowseSearch', '0',NULL, "Elasticsearch only: add a page allowing users to 'browse' all items in the collection",'YesNo'), +('OpacCatalogConcerns', '0', NULL, 'Allow logged in OPAC users to report catalog concerns', 'YesNo'), ('OpacCloud','0',NULL,'If ON, enables subject cloud on OPAC','YesNo'), ('OpacAdditionalStylesheet','','','Define an auxiliary stylesheet for OPAC use, to override specified settings from the primary opac.css stylesheet. Enter the filename (if the file is in the server\'s css directory) or a complete URL beginning with http (if the file lives on a remote server).','free'), ('OpacCoce','0', NULL, 'If on, enables cover retrieval from the configured Coce server in the OPAC', 'YesNo'), diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref index 4aad6fc775..bda3fca9c5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/admin/preferences/cataloguing.pref @@ -42,6 +42,14 @@ Cataloging: 1: "Allow" 0: "Don't allow" - authorized values to be created within the cataloguing module. Librarian will need the manage_auth_values subpermission. + - + - pref: CatalogConcerns + default: 0 + choices: + 0: "Don't allow" + 1: Allow + - "staff to report concerns about catalog records." + - 'Note: You can also enable `OpacCatalogConcerns` to allow OPAC users the same option.' Spine labels: - 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 c74d5c9d49..f0e676c6b6 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 @@ -335,6 +335,14 @@ OPAC: - ". (NOTE: For large consortia we recommend to group unavailable items by substatus, listing item counts only.)" Features: + - + - pref: OpacCatalogConcerns + default: 0 + choices: + 0: "Don't allow" + 1: Allow + - "OPAC users to report concerns about catalog records." + - 'Note: Enabling `CatalogConcerns` is required for this feature to be accessible on the staff client.' - - pref: OPACReportProblem choices: -- 2.20.1