Skip to content

Commit

Permalink
added more content
Browse files Browse the repository at this point in the history
refactoring
add option to show copyright in the footer
  • Loading branch information
hartenthaler committed Jan 12, 2023
1 parent 2dc5df6 commit a453378
Show file tree
Hide file tree
Showing 12 changed files with 1,338 additions and 111 deletions.
360 changes: 293 additions & 67 deletions ImprintFooterModule.php

Large diffs are not rendered by default.

35 changes: 25 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

![Latest Release](https://img.shields.io/github/v/release/hartenthaler/hh_imprint)

This [webtrees](https://www.webtrees.net) module creates an imprint/legal notice in the footer of the web page.
This [webtrees](https://www.webtrees.net) module creates a legal notice in the footer of the web page.

Disclaimer: This is not a legal advice. You as administrator of your website are responsible for the content of the Legal Notice on your site.

There is a German [manual page](https://wiki.genealogy.net/Webtrees_Handbuch/Anleitung_f%C3%BCr_Webmaster/Erweiterungsmodule/Impressum) available, too.

Expand All @@ -29,18 +31,19 @@ This Readme contains the following main sections
<a name="description"></a>
## Description

This module adds an imprint notice to all pages of a webtrees site.
This module adds an legal notice footer to all pages of a webtrees site.

There is maybe a need to present on your website an "Imprint"
There is maybe a need to present on your website a "Legal Notice"
(depending on your local law and the character of your site)
* Germany: [§5 Telemediengesetz (TMG)](https://lxgesetze.de/tmg/5),
and [§4 Medienstaatsvertrag (MStV)](https://lxgesetze.de/mstv/4)
* Austria: § 5 Abs. 1 E-Commerce-Gesetz (ECG)
* Switzerland: Art. 3 des Bundesgesetzes gegen den unlauteren Wettbewerb (UWG)

The webtrees admin can define the following data fields in the control panel for the responsible person
* name of genealogical club or organization
* copyright notice in the footer
* name of responsible person
* name of genealogical club or organization
* address
* phone and fax numbers
* eMail address (with or without subject and body of eMail)
Expand All @@ -51,14 +54,26 @@ The webtrees admin can choose if the following additional parts should be shown
* list of contact persons for a tree (genealogical and technical)
* list of administrators of this site with their contact links

The following parts are a first draft.
They are only available in German.
The administrator can enable or disable them, but the sequence cannot be chosen at the moment.
* show a chapter about "Datenschutzerklärung"
* show a chapter about "Rechtliche Regelungen"

It is intended to add more content to those two chapters
and to make them translatable.

<a name="screenshots"></a>
## Screenshots

Screenshot of imprint (in German language)
<p align="center"><img src="resources/docs/imprint.png" alt="Screenshot of imprint" align="center" width="60%"></p>
Screenshot of Legal Notice footer (in German language)
<p align="center"><img src="resources/docs/legal_notice_footer.png" alt="Screenshot of Legal Notice" align="center" width="60%"></p>

Screenshot of Legal Notice (in German language)
<p align="center"><img src="resources/docs/legal_notice.png" alt="Screenshot of Legal Notice" align="center" width="60%"></p>

Screenshot of control panel page (in German language)
<p align="center"><img src="resources/docs/imprint_control_panel.png" alt="Screenshot of control panel menu" align="center" width="80%"></p>
<p align="center"><img src="resources/docs/legal_notice_control_panel.png" alt="Screenshot of control panel menu" align="center" width="80%"></p>

<a name="webtrees"></a>
## webtrees
Expand All @@ -67,7 +82,6 @@ Screenshot of control panel page (in German language)
This can be hosted on your own server by following the [Install instructions](https://webtrees.net/install/).
If you are familiar with Docker, you might like to install **webtrees** using [this unofficial docker image](https://hub.docker.com/r/nathanvaughn/webtrees), [or this one](https://github.com/H2CK/webtrees).


<a name="requirements"></a>
## Requirements

Expand All @@ -86,9 +100,9 @@ This section documents installation instructions for this module.
2. Download the [latest release](https://github.com/hartenthaler/hh_imprint/releases/latest)
3. Unzip the package into your `webtrees/modules_v4` directory of your web server
4. Rename the folder to `hh_imprint`
5. Login to **webtrees** as administrator, go to <span class="pointer">Control Panel/Modules/Website/Footers</span>, and find the module. It will be called "Imprint". Check if it has a tick for "Enabled".
5. Login to **webtrees** as administrator, go to <span class="pointer">Control Panel/Modules/Website/Footers</span>, and find the module. It will be called "Legal Notice". Check if it has a tick for "Enabled".
6. Click at the wrench symbol and add all desired information fields
7. Maybe you like to deactivate the module "contact information" (depending whether you have activated this in the imprint module).
7. Maybe you like to deactivate the module "contact information" (depending whether you have activated this in the "Legal Notice" module).
8. Finally, click SAVE, to complete the installation.

<a name="upgrade"></a>
Expand Down Expand Up @@ -125,6 +139,7 @@ There are now, beside English, Dutch (by TheDutchJewel) and German, no other tra

If you'd like to contribute to this module, great! You can contribute by

- Reading and commenting the legal chapters carefully - choose a specific topic and please [create an issue](https://github.com/hartenthaler/hh_imprint/issues) for that topic.
- Contributing code - check out the issues for things that need attention. If you have changes you want to make not listed in an issue, please create one, then you can link your pull request.
- Testing - it's all manual currently, please [create an issue](https://github.com/hartenthaler/hh_imprint/issues) for any bugs you find.

Expand Down
2 changes: 1 addition & 1 deletion latest-version.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.15.0
2.1.15.1
Binary file added resources/docs/legal_notice.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/docs/legal_notice_control_panel.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added resources/docs/legal_notice_footer.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
47 changes: 45 additions & 2 deletions resources/views/footer.phtml
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) : ?>
&copy;&nbsp;
<?php if ($copyRightStartYear !== '') : ?>
<?= e($copyRightStartYear) ?>&nbsp;-
<?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">&times;</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>
Loading

0 comments on commit a453378

Please sign in to comment.