Bug 31123: Add `ContentWarningField` preference

This patch adds a new `ContentWarningField` preference allowing the
library to define which 59X field to use to store harmful content
warning notes.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
Martin Renvoize 2022-09-08 16:38:16 +01:00 committed by Tomas Cohen Arazi
parent 8fd51b2a63
commit b85e966e16
No known key found for this signature in database
GPG Key ID: 0A272EA1B2F3C15F
3 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,14 @@
use Modern::Perl;
return {
bug_number => "31123",
description => "Add `ContentWarningField` preference",
up => sub {
my ($args) = @_;
my ($dbh, $out) = @$args{qw(dbh out)};
$dbh->do(q{
INSERT IGNORE INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `type` )
VALUES ('ContentWarningField', '', NULL, 'MARC field to use for content warnings', 'Free')
});
},
};

View File

@ -158,6 +158,7 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, `
('ComponentSortOrder','asc','asc|dsc|az|za','Specify the default sort order','Choice'),
('ConfirmFutureHolds','0','','Number of days for confirming future holds','Integer'),
('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'),
('ContentWarningField', '', NULL, 'MARC field to use for content warnings', 'Free'),
('CreateAVFromCataloguing', '1', '', 'Ability to create authorized values from the cataloguing module', 'YesNo'),
('CronjobLog','0',NULL,'If ON, log information from cron jobs.','YesNo'),
('CumulativeRestrictionPeriods',0,NULL,'Cumulate the restriction periods instead of keeping the highest','YesNo'),

View File

@ -200,6 +200,11 @@ Cataloging:
duplicate: "when editing records as new (duplicating)"
changed: "when changing the framework while editing the existing record"
imported: "when importing a record via z39.50"
-
- Use MARC field
- pref: ContentWarningField
- for storing content warnings.
- "<br/><strong>NOTE:</strong> The field needs to appear in the MARC frameworks to be accessible."
Display:
-
- 'Separate main entry and subdivisions with '