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 <?php endif ?> 22</div> 23 24<?php View::push('javascript') ?> 25<script> 26 if (localStorage.getItem("cookie-warning") !== "ok") { 27 document.getElementById("cookie-warning").classList.add("show"); 28 } 29 document.getElementById("cookie-warning-button").addEventListener("click", function() { 30 localStorage.setItem("cookie-warning", "ok"); 31 }) 32</script> 33<?php View::endpush() ?> 34 35 36