@@ -, +, @@ customisations --- Koha/AdditionalContents.pm | 2 ++ .../bug_27378-add_cookie_consents.pl | 6 ---- installer/data/mysql/mandatory/sysprefs.sql | 2 -- .../prog/en/includes/intranet-bottom.inc | 17 +++++++++-- .../en/modules/admin/preferences/patrons.pref | 12 -------- .../en/modules/tools/additional-contents.tt | 2 +- .../bootstrap/en/includes/masthead.inc | 28 +++++++++++-------- 7 files changed, 33 insertions(+), 36 deletions(-) --- a/Koha/AdditionalContents.pm +++ a/Koha/AdditionalContents.pm @@ -63,6 +63,8 @@ location is one of this: - OpacLoginInstructions - OpacSuggestionInstructions - ArticleRequestsDisclaimerText +- CookieConsentBar +- CookieConsentPopup =cut --- a/installer/data/mysql/atomicupdate/bug_27378-add_cookie_consents.pl +++ a/installer/data/mysql/atomicupdate/bug_27378-add_cookie_consents.pl @@ -12,11 +12,5 @@ return { $dbh->do( q| INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsent', '0', 'Require cookie consent to be displayed', '', 'YesNo'); | ); say $out "Added new system preference 'CookieConsent'"; - - $dbh->do( q{ INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsentBar', '', 'Show the following HTML in the cookie consent bar that is displayed at the bottom of the screen', '70|10', 'Textarea'); } ); - say $out "Added new system preference 'CookieConsentBar'"; - - $dbh->do( q{INSERT IGNORE INTO systempreferences (variable, value, explanation, options, type) VALUES ('CookieConsentPopup', '', 'Show the following HTML in the cookie consent popup', '70|10', 'Textarea');} ); - say $out "Added new system preference 'CookieConsentPopup'"; }, }; --- a/installer/data/mysql/mandatory/sysprefs.sql +++ a/installer/data/mysql/mandatory/sysprefs.sql @@ -161,8 +161,6 @@ INSERT INTO systempreferences ( `variable`, `value`, `options`, `explanation`, ` ('ConsiderOnSiteCheckoutsAsNormalCheckouts','1',NULL,'Consider on-site checkouts as normal checkouts','YesNo'), ('ContentWarningField', '', NULL, 'MARC field to use for content warnings', 'Free'), ('CookieConsent', '0', NULL, 'Require cookie consent to be displayed', 'YesNo'), -('CookieConsentBar', '', '70|10', 'Show the following HTML in the cookie consent bar that is displayed at the bottom of the screen', 'Textarea'), -('CookieConsentPopup', '', '70|10', 'Show the following HTML in the cookie consent popup', 'Textarea'), ('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'), --- a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc +++ a/koha-tmpl/intranet-tmpl/prog/en/includes/intranet-bottom.inc @@ -2,7 +2,10 @@ [% USE Koha %] [% USE KohaPlugins %] [% USE Asset %] +[% USE AdditionalContents %] [% IF Koha.Preference( 'CookieConsent' ) %] + [% SET CookieConsentBar = AdditionalContents.get( location => "CookieConsentBar", lang => lang, library => branchcode || default_branch ) %] + [% SET CookieConsentPopup = AdditionalContents.get( location => "CookieConsentPopup", lang => lang, library => branchcode || default_branch ) %] [% USE JSConsents %] [% END %] @@ -82,7 +85,13 @@ [% IF Koha.Preference( 'CookieConsent' ) %]