-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactoring add option to show copyright in the footer
- Loading branch information
1 parent
2dc5df6
commit a453378
Showing
12 changed files
with
1,338 additions
and
111 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2.1.15.0 | ||
2.1.15.1 |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,52 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
/** | ||
* @var string $title title of this footer element | ||
* @var string $url link to Legal Notice | ||
* | ||
* @var bool $showCopyRight option whether copy right should be shown | ||
* @var string $copyRightStartYear start year of copy right | ||
* @var string $copyRightName name of holder of copy right | ||
* | ||
* @var bool $cookiesWarning option whether a cookies warning should be shown | ||
* @var string $cookiesMessage message that cookies are used | ||
*/ | ||
|
||
use Fisharebest\Webtrees\I18N; | ||
use Fisharebest\Webtrees\View; | ||
|
||
?> | ||
|
||
<div class="wt-footer wt-footer-custom text-center py-2"> | ||
<a href="<?= e($url) ?>"><?= I18N::translate('Imprint') ?></a> | ||
<div class="wt-footer wt-footer-custom hh-legal-notice text-center py-2"> | ||
<?php if ($showCopyRight) : ?> | ||
© | ||
<?php if ($copyRightStartYear !== '') : ?> | ||
<?= e($copyRightStartYear) ?> - | ||
<?php endif ?> | ||
<?= date("Y"); ?> <?= e($copyRightName) ?> | | ||
<?php endif ?> | ||
<a href="<?= e($url) ?>"><?= e($title) ?></a> | ||
|
||
<?php if ($cookiesWarning) : ?> | ||
<div class="alert alert-info alert-dismissible fade" id="cookie-warning"> | ||
<?= e($cookiesMessage) ?> | ||
|
||
<button type="button" id="cookie-warning-button" class="close" data-dismiss="alert" aria-label="<?= I18N::translate('close') ?>"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
|
||
<?php View::push('javascript') ?> | ||
<script> | ||
if (localStorage.getItem("cookie-warning") !== "ok") { | ||
document.getElementById("cookie-warning").classList.add("show"); | ||
} | ||
document.getElementById("cookie-warning-button").addEventListener("click", function () { | ||
localStorage.setItem("cookie-warning", "ok"); | ||
}); | ||
</script> | ||
<?php View::endpush() ?> | ||
<?php endif ?> | ||
</div> |
Oops, something went wrong.