From a5f18ddd32508d64e01c9d3fc292a5cda6b7ae83 Mon Sep 17 00:00:00 2001 From: Robert Lange <robert.lange@uni-leipzig.de> Date: Tue, 3 Mar 2020 11:10:59 +0100 Subject: [PATCH] refs #15440 [fid_bbi] embed matomo opt-out template in German and English policy * render with language, colors, fonts suitable for bbi * add css for matomo container --- themes/fid_bbi/scss/compiled.scss | 8 ++++++++ .../fid_bbi/templates/fid/user/policy-de.phtml | 17 ++++++++++++----- .../fid_bbi/templates/fid/user/policy-en.phtml | 17 +++++++++++++---- 3 files changed, 33 insertions(+), 9 deletions(-) diff --git a/themes/fid_bbi/scss/compiled.scss b/themes/fid_bbi/scss/compiled.scss index fc525853f52..919ae9fa311 100644 --- a/themes/fid_bbi/scss/compiled.scss +++ b/themes/fid_bbi/scss/compiled.scss @@ -614,3 +614,11 @@ button.search-filter-toggle { } } +/* #15914 opt-out iframe for user tracking*/ +#matomo { + border: 0; + margin-left:-.5rem; + padding: 0; + width: 100%; +} + diff --git a/themes/fid_bbi/templates/fid/user/policy-de.phtml b/themes/fid_bbi/templates/fid/user/policy-de.phtml index 0424761e7bd..2bf8f02fa3e 100644 --- a/themes/fid_bbi/templates/fid/user/policy-de.phtml +++ b/themes/fid_bbi/templates/fid/user/policy-de.phtml @@ -491,10 +491,17 @@ Hier können Sie das Tracking durch Matomo ein- oder ausschalten, sofern diese Einstellung nicht bereits automatisch durch die Einstellungen Ihres Browsers bzw. eines Adblockers gesteuert wird.<br/> - <iframe style="border: 0; height: 150px; width: 100%; margin-left:-.5rem" id="piwk" name="piwk" - onLoad="addCSS()" - src="https://piwik.ub.uni-leipzig.de/index.php?module=CoreAdminHome&action=optOut&language={$userLang}&idSite=6"></iframe> - + <?= $this->context($this)->renderInContext( + 'matomo.phtml', + [ + 'backgroundColor' => 'ffffff', + 'fontColor' => '8A141A', + 'fontFamily' => urlencode("\"Helvetica Neue\",Helvetica,Roboto,Arial,sans-serif"), + 'fontSize' => '15px', + 'language' => $this->layout()->userLang + ]); + ?> + <br/> Nähere Informationen zu den Privatsphäreeinstellungen der Matomo Software finden Sie unter folgendem Link: <a href="https://matomo.org/docs/privacy/">https://matomo.org/docs/privacy/</a>.<br/> </p> @@ -775,4 +782,4 @@ </li> </ol> <br/> -</div> +</div> \ No newline at end of file diff --git a/themes/fid_bbi/templates/fid/user/policy-en.phtml b/themes/fid_bbi/templates/fid/user/policy-en.phtml index a1ad326d367..b9915638ee8 100644 --- a/themes/fid_bbi/templates/fid/user/policy-en.phtml +++ b/themes/fid_bbi/templates/fid/user/policy-en.phtml @@ -424,10 +424,19 @@ again. More information about the privacy settings of the Matomo software can be found under the following link: https://matomo.org/docs/privacy/. Here you can switch tracking on or off, if this setting is not already - automatically controlled by the settings of your browser or an ad-blocker. - <iframe style="border: 0; height: 150px; width: 100%; margin-left:-.5rem" id="piwk" name="piwk" - onLoad="addCSS()" - src="https://piwik.ub.uni-leipzig.de/index.php?module=CoreAdminHome&action=optOut&language={$userLang}&idSite=6"></iframe> + automatically controlled by the settings of your browser or an ad-blocker.<br/> + + <?= $this->context($this)->renderInContext( + 'matomo.phtml', + [ + 'backgroundColor' => 'ffffff', + 'fontColor' => '8A141A', + 'fontFamily' => urlencode("\"Helvetica Neue\",Helvetica,Roboto,Arial,sans-serif"), + 'fontSize' => '15px', + 'language' => $this->layout()->userLang + ]); + ?> + <br/> </p> </li> </ol> -- GitLab