From 802a17aae0258b4defc57db68207b92db0220681 Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Thu, 16 Nov 2023 17:24:27 +0000 Subject: [PATCH] Bug 35348: Add cookies link to opac footer This patch adds a link that opens the cookies info dialogue to the opac footer when the CookieConsent feature is enabled. Test plan 1) Enable CookieConsent 2) On the OPAC you should now see a 'Cookies' link at the bottom of the page. 3) Clicking the link should open the "Cookie consent" modal where you can see the details of the cookies you have accepted and change your choices. 4) Bonus points: Enable 'OpacProblemReports' and note it aligns left of 'Cookies' in the same footer bar. Signed-off-by: Owen Leonard --- .../opac-tmpl/bootstrap/css/src/opac.scss | 18 +++++ .../bootstrap/en/includes/opac-bottom.inc | 75 +++++++++++-------- .../opac-tmpl/bootstrap/js/cookieconsent.js | 2 +- 3 files changed, 62 insertions(+), 33 deletions(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss index 33aaf5054b..233a1c13ac 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss +++ b/koha-tmpl/opac-tmpl/bootstrap/css/src/opac.scss @@ -428,6 +428,24 @@ th { } } +#footernav { + li { + display: inline-block; + padding-right: 5px; + white-space: nowrap; + + &::after { + content: " | "; + } + + &:last-child { + &::after { + content: ""; + } + } + } +} + #news { margin: .5em 0; padding: 1em; diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc index 943c862eab..d273390513 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc +++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc @@ -20,40 +20,51 @@ [% END #/ opaccredits %] - - [% IF ( Koha.Preference('OPACReportProblem') && Koha.Preference('KohaAdminEmailAddress') ) || OpacKohaUrl %] -
-
-
-
-
- [% IF Koha.Preference('OPACReportProblem') && Koha.Preference('KohaAdminEmailAddress') %] - - [% END # / IF Koha.Preference('OPACReportProblem') && Koha.Preference('KohaAdminEmailAddress') %] - [% IF OpacKohaUrl %] -
-
-

Powered by - [% IF template.name.match('opac-main.tt') %] - Koha - [% ELSE %] - Koha - [% END %]

-
-
- [% END # /IF OpacKohaUrl %] -
-
-
-
-
- [% END # / OPACReportProblem || OpacKohaUrl %] + [% IF ( Koha.Preference('OPACReportProblem') && Koha.Preference('KohaAdminEmailAddress') ) || Koha.Preference( 'CookieConsent' ) || OpacKohaUrl %] + + [% END # / OPACReportProblem || OpacKohaUrl %] + [% IF OpacLangSelectorMode == 'both' || OpacLangSelectorMode == 'footer' %] [% IF ( Koha.Preference('opaclanguagesdisplay') ) %] [% IF ( languages_loop ) %] diff --git a/koha-tmpl/opac-tmpl/bootstrap/js/cookieconsent.js b/koha-tmpl/opac-tmpl/bootstrap/js/cookieconsent.js index 088d3ba2aa..dab24fe1f0 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/js/cookieconsent.js +++ b/koha-tmpl/opac-tmpl/bootstrap/js/cookieconsent.js @@ -183,7 +183,7 @@ }); // "More information" handler - $('#consentMoreInfo, #cookieConsentButton, #viewCookieConsents').on( + $('#consentMoreInfo, #cookieConsentFooter, #cookieConsentButton, #viewCookieConsents').on( 'click', function (e) { e.preventDefault(); -- 2.30.2