diff --git a/VERSION b/VERSION index 4b65cad..54fbff4 100644 --- a/VERSION +++ b/VERSION @@ -1,4 +1,4 @@ latest -0.2.7 +0.2.8 0.2 0 diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index b4f0159..0ca5e6b 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -18,5 +18,7 @@ services: - DEVMODE=true - CONF_DOMAIN=http://localhost:8080/ - CONF_TIMEZONE=Europe/Berlin # php timezone string + - CONF_IMPRESSUMURL=http://example.com/impressum + - CONF_IMPRESSUMNAME=Imprint and Privacy - ADMIN_ACCOUNT=admin - ADMIN_PASSWORD=password \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 35844b0..915e8ae 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -13,5 +13,7 @@ services: - DEVMODE=false - CONF_DOMAIN=http://localhost:8080/ - CONF_TIMEZONE=Europe/Berlin # php timezone string + #- CONF_IMPRESSUMURL=http://example.com/impressum # imprint/ privacy link and name pf link (optional) + #- CONF_IMPRESSUMNAME=Imprint and Privacy - ADMIN_ACCOUNT=test # admin account (initial creation on docker container startup) - ADMIN_PASSWORD= diff --git a/php/core/Config.php b/php/core/Config.php index 9cd7037..e6923a4 100644 --- a/php/core/Config.php +++ b/php/core/Config.php @@ -37,5 +37,15 @@ public static function getBaseUrl() : string { } return $d; } + + public static function getImprintData() : ?array { + if(empty($_ENV['CONF_IMPRESSUMURL']) || empty($_ENV['CONF_IMPRESSUMURL'])){ + return null; + } + return array( + 'IMPRESSUMURL' => $_ENV['CONF_IMPRESSUMURL'], + 'IMPRESSUMNAME' => $_ENV['CONF_IMPRESSUMNAME'] + ); + } } ?> \ No newline at end of file diff --git a/php/core/WebGUI.php b/php/core/WebGUI.php index 7c39ea2..0887409 100644 --- a/php/core/WebGUI.php +++ b/php/core/WebGUI.php @@ -38,8 +38,20 @@ public function __construct( ParamParser $param, Login $login ) { else{ $this->mainTemp->setContent('HOMELINK', ''); } + + $this->fillTemplateWithImprint($this->mainTemp); } + private function fillTemplateWithImprint( Template $t ) : void { + $imprintData = Config::getImprintData(); + if(!is_null($imprintData)){ + $t->setContent('COOKIEBANNER', ''); + foreach($imprintData as $k => $v){ + $t->setContent($k, $v); + } + } + } + public function accountManage() : void { $this->mainTemp->setContent('TITLE', 'Account Management'); $account = new Template('account'); @@ -276,6 +288,7 @@ public function loginForm() : void { $this->mainTemp->setContent('TITLE', 'Login'); $login = new Template('login'); $this->mainTemp->includeTemplate($login); + $this->fillTemplateWithImprint($login); } public function __destruct(){ diff --git a/php/core/templates/login.json b/php/core/templates/login.json index 9e26dfe..137f937 100644 --- a/php/core/templates/login.json +++ b/php/core/templates/login.json @@ -1 +1,5 @@ -{} \ No newline at end of file +{ + "%%COOKIEBANNER%%" : "disable", + "%%IMPRESSUMURL%%" : "", + "%%IMPRESSUMNAME%%" : "" +} \ No newline at end of file diff --git a/php/core/templates/login_en.html b/php/core/templates/login_en.html index 6da0251..8a259cd 100644 --- a/php/core/templates/login_en.html +++ b/php/core/templates/login_en.html @@ -19,6 +19,13 @@ + diff --git a/php/core/templates/main.json b/php/core/templates/main.json index 2ad9eca..131e68a 100644 --- a/php/core/templates/main.json +++ b/php/core/templates/main.json @@ -4,5 +4,8 @@ "%%INNERCONTAINER%%" : "", "%%DISPLAYLOGOUTBOX%%" : "disable", "%%GROUP%%" : "", - "%%HOMELINK%%" : "