1<?php 2 3use Fisharebest\Webtrees\I18N; 4use Fisharebest\Webtrees\View; 5 6?> 7 8<div class="wt-footer wt-footer-privacy-policy text-center py-2"> 9 <a href="<?= e(route('module', ['module' => 'privacy-policy', 'action' => 'Page', 'tree' => $tree->name()])) ?>"> 10 <?= I18N::translate('Privacy policy') ?> 11 </a> 12 13 <?php if ($uses_analytics) : ?> 14 <div class="alert alert-info alert-dismissible fade" id="cookie-warning"> 15 <?= I18N::translate('This website uses cookies to learn about visitor behavior.') ?> 16 17 <button type="button" id="cookie-warning-button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> 18 <span aria-hidden="true">×</span> 19 </button> 20 </div> 21 22 <?php View::push('javascript') ?> 23 <script> 24 if (localStorage.getItem("cookie-warning") !== "ok") { 25 document.getElementById("cookie-warning").classList.add("show"); 26 } 27 document.getElementById("cookie-warning-button").addEventListener("click", function () { 28 localStorage.setItem("cookie-warning", "ok"); 29 }); 30 </script> 31 <?php View::endpush() ?> 32 <?php endif ?> 33</div> 34 35 36