Bug 35267: Add and Update Notice CSS system preferences

This patch clarifies the system level notice css preferences.

We rename NoticeCSS to EmailNoticeStylesheet
We rename SlipCSS to PrintSlipStylesheet
We add AllNoticeStylesheet
We add AllNoticeCSS to contain inline CSS for all html notices
We add EmailNoticeCSS to contain inline CSS for Email notices
We add PrintNoticeCSS to contain inline CSS for Print notices
We add PrintSlipCSS to contain inline CSS for Print slips

Sponsored-by: Open Fifth <https://openfifth.co.uk>
Signed-off-by: Marion Durand <marion.durand@biblibre.com>
Signed-off-by: Thomas Klausner <domm@plix.at>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Martin Renvoize 2023-11-13 12:13:04 +00:00 committed by Lucas Gass
parent f20428ab1f
commit c1314fd57b
No known key found for this signature in database
GPG Key ID: 60B447398B0D36CA
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,42 @@
use Modern::Perl;
return {
bug_number => "35267",
description => "Enhance NoticeCSS preferences",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
# Do you stuffs here
$dbh->do(
q{
INSERT IGNORE INTO systempreferences (variable, value, options, explanation, type) VALUES
('AllNoticeStylesheet', '', NULL, 'Enter the address for a stylesheet for all notices', 'free'),
('AllNoticeCSS','',NULL,'CSS to include in each html notice regardless of messate transport type','free'),
('EmailNoticeCSS','',NULL,'CSS to include in each html email notice','free'),
('PrintNoticeCSS','',NULL,'CSS to include in each html print notice','free'),
('PrintSlipCSS','',NULL,'CSS to include in each html print notice','free')
}
);
say $out "Added new system preference 'AllNoticeStylesheet'";
say $out "Added new system preference 'AllNoticeCSS'";
say $out "Added new system preference 'EmailNoticeCSS'";
say $out "Added new system preference 'PrintNoticeCSS'";
say $out "Added new system preference 'PrintSlipCSS'";
$dbh->do(
q{
UPDATE systempreferences SET variable='EmailNoticeStylesheet' WHERE variable='NoticeCSS'
}
);
say $out "Rename system preference 'NoticeCSS' to 'EmailNoticeStylesheet'";
$dbh->do(
q{
UPDATE systempreferences SET variable='PrintSlipStylesheet' WHERE variable='SlipCSS'
}
);
say $out "Rename system preference 'SlipCSS' to 'PrintSlipStylesheet'";
},
};

View File

@ -27,6 +27,7 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES
('AggressiveMatchOnISBN','0'),
('AggressiveMatchOnISSN','0'),
('AllFinesNeedOverride','1'),
('AllNoticeCSS',''),
('AllowAllMessageDeletion','0'),
('AllowCheckoutNotes', '0'),
('AllowFineOverride','0'),
@ -255,6 +256,8 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES
('EmailFieldSelection',''),
('emailLibrarianWhenHoldIsPlaced','0'),
('EmailOverduesNoEmail','1'),
('EmailNoticeCSS',''),
('EmailNoticeStylesheet',''),
('EmailPatronRegistrations', '0'),
('EmailPatronWhenHoldIsPlaced', '0'),
('EmailPurchaseSuggestions','0'),
@ -662,8 +665,12 @@ INSERT INTO systempreferences ( `variable`, `value` ) VALUES
('PreserveSerialNotes','1'),
('PreventWithdrawingItemsStatus', ''),
('previousIssuesDefaultSortOrder','asc'),
('PrintNoticeCSS',''),
('PrintNoticesMaxLines','0'),
('PrivacyPolicyConsent',''),
('PrintNoticeStylesheet',''),
('PrintSlipCSS',''),
('PrintSlipStylesheet',''),
('PrivacyPolicyURL',''),
('ProcessingFeeNote', ''),
('ProtectSuperlibrarianPrivileges','1'),