diff --git a/application/libraries/Ilch/Layout/Frontend.php b/application/libraries/Ilch/Layout/Frontend.php
index 722932425..40053c7c3 100644
--- a/application/libraries/Ilch/Layout/Frontend.php
+++ b/application/libraries/Ilch/Layout/Frontend.php
@@ -67,6 +67,22 @@ public function getDescription()
return '';
}
+ /**
+ * Get key from config.
+ *
+ * @return string
+ */
+ public function getConfigKey($key)
+ {
+ $config = \Ilch\Registry::get('config');
+
+ if (!empty($config) && $key !== '') {
+ return $config->get($key);
+ }
+
+ return '';
+ }
+
/**
* Gets the box with the given key.
*
@@ -118,9 +134,22 @@ public function getHeader()
';
+ if ($this->getConfigKey('cookie_consent') != 0) {
+ $html .= '
+ ';
+ }
+
return $html;
}
-
+
/**
* Loads a layout file.
*
diff --git a/application/modules/admin/static/css/admin.css b/application/modules/admin/static/css/admin.css
index 2c19f198a..799f081a0 100644
--- a/application/modules/admin/static/css/admin.css
+++ b/application/modules/admin/static/css/admin.css
@@ -541,7 +541,7 @@ legend {
position: static !important;
}
#ilch_dropdown .full {
- width: 100%;
+ width: 110%;
left: auto !important;
right: auto !important;
}
diff --git a/application/modules/cookieconsent/config/config.php b/application/modules/cookieconsent/config/config.php
new file mode 100644
index 000000000..167d0741b
--- /dev/null
+++ b/application/modules/cookieconsent/config/config.php
@@ -0,0 +1,62 @@
+ 'cookieconsent',
+ 'icon_small' => 'cookieconsent.png',
+ 'system_module' => true,
+ 'languages' => array
+ (
+ 'de_DE' => array
+ (
+ 'name' => 'Cookie-Richtlinien',
+ 'description' => 'Hier können die Cookie-Richtlinien verwaltet werden.',
+ ),
+ 'en_EN' => array
+ (
+ 'name' => 'Cookie Consent',
+ 'description' => 'Here you can manage the cookie consent.',
+ ),
+ )
+ );
+
+ public function install()
+ {
+ $databaseConfig = new \Ilch\Config\Database($this->db());
+ $databaseConfig->set('cookie_consent', '0');
+ $databaseConfig->set('cookie_consent_style', 'light');
+ $databaseConfig->set('cookie_consent_pos', 'top');
+ $databaseConfig->set('cookie_consent_message', 'Diese Website nutzt Cookies, um bestmögliche Funktionalität bieten zu können.');
+ $databaseConfig->set('cookie_consent_text', '
Einsatz von Cookies
+ Wie viele Internetseiten nutzt auch diese Seite Cookies. An dieser Stelle wird erklärt was Cookies sind und wie sie genutzt werden.
+
+ Was sind Cookies
+ Cookies sind kleine Dateien, die beim Aufruf von Internetseiten durch den Internet Browser auf Ihrem lokalen Rechner gespeichert werden. In den Dateien speichern Internetseiten verschiedene Informationen, um die Nutzung von besuchten Internetseiten für Sie komfortabler zu gestalten. Oftmals wird in Cookies z.B. Ihr Login gespeichert, um Sie bei einem späteren Besuch der Internetseite automatisch anzumelden, ohne dass Sie Ihre Zugangsdaten noch einmal manuell eingeben müssen.
+
+ Wie wir Cookies nutzen
+ Wir setzen Cookies für folgende Zwecke ein:
+
+ - Anmeldung: Bei der Anmeldung werden Ihre Zugangsdaten in verschlüsselter Form als Cookies gespeichert, um Sie bei einem späteren Seitenaufruf automatisiert anzumelden. Im Anmeldefenster können Sie mit der Option „Dauerhaft angemeldet bleiben“ festlegen, ob diese Cookies angelegt werden sollen.
+ - Sitzung: Beim ersten Aufruf unserer Seite wird eine neue Sitzung gestartet, diese wird durch ein eindeutiges Cookies Ihrem Computer zugeordnet. Sitzungen erlauben es, Sie zwischen zwei Seitenaufrufen wieder zu erkennen und Ihnen alle Funktionalitäten bereitstellen zu können. Es handelt sich um ein temporäres Cookies, dass beim Beenden des Internet Browsers automatisch gelöscht wird.
+ - Drittanbieter-Dienste: Die Einblendung von Werbeanzeigen oder das Teilen von Inhalten auf sozialen Netzwerken oder vergleichbaren Internetseiten kann die Erzeugung eines Cookies zur Folge haben. Diese Cookies werden nicht direkt von unserer Seite erzeugt, sondern durch den Drittanbieter selbst.
+
+
+ Wie Sie Cookies deaktivieren und entfernen
+ Cookies können in den Einstellungen Ihres Internet Browsers verwaltet und entfernt werden. Darüber hinaus lässt sich in den Einstellungen das Speichern von Cookies zudem vollständig deaktivieren. Bitte entnehmen Sie der folgenden Auflistung die passende Anleitung für den Umgang mit Cookies zu dem von Ihnen genutzten Internet Browser.
+ ');
+ }
+}
diff --git a/application/modules/cookieconsent/config/cookieconsent.png b/application/modules/cookieconsent/config/cookieconsent.png
new file mode 100644
index 000000000..02a98be40
Binary files /dev/null and b/application/modules/cookieconsent/config/cookieconsent.png differ
diff --git a/application/modules/cookieconsent/controllers/Index.php b/application/modules/cookieconsent/controllers/Index.php
new file mode 100644
index 000000000..3c7d96906
--- /dev/null
+++ b/application/modules/cookieconsent/controllers/Index.php
@@ -0,0 +1,20 @@
+getLayout()->getHmenu()->add($this->getTranslator()->trans('menuCookieConsent'), array('action' => 'index'));
+
+ $this->getView()->set('cookieConsent', $this->getConfig()->get('cookie_consent'));
+ $this->getView()->set('cookieConsentText', $this->getConfig()->get('cookie_consent_text'));
+ }
+}
+
+
diff --git a/application/modules/cookieconsent/controllers/admin/Index.php b/application/modules/cookieconsent/controllers/admin/Index.php
new file mode 100644
index 000000000..3affc64cc
--- /dev/null
+++ b/application/modules/cookieconsent/controllers/admin/Index.php
@@ -0,0 +1,51 @@
+getLayout()->addMenu
+ (
+ 'menuCookieConsent',
+ array
+ (
+ array
+ (
+ 'name' => 'settings',
+ 'active' => true,
+ 'icon' => 'fa fa-cogs',
+ 'url' => $this->getLayout()->getUrl(array('controller' => 'index', 'action' => 'index'))
+ )
+ )
+ );
+ }
+
+ public function indexAction()
+ {
+ $this->getLayout()->getAdminHmenu()
+ ->add($this->getTranslator()->trans('menuCookieConsent'), array('action' => 'index'))
+ ->add($this->getTranslator()->trans('settings'), array('action' => 'index'));
+
+ if ($this->getRequest()->isPost()) {
+ $this->getConfig()->set('cookie_consent', $this->getRequest()->getPost('cookieConsent'));
+ $this->getConfig()->set('cookie_consent_style', $this->getRequest()->getPost('cookieConsentStyle'));
+ $this->getConfig()->set('cookie_consent_pos', $this->getRequest()->getPost('cookieConsentPos'));
+ $this->getConfig()->set('cookie_consent_message', $this->getRequest()->getPost('cookieConsentMessage'));
+ $this->getConfig()->set('cookie_consent_text', $this->getRequest()->getPost('cookieConsentText'));
+ $this->addMessage('saveSuccess');
+ }
+
+ $this->getView()->set('cookieConsent', $this->getConfig()->get('cookie_consent'));
+ $this->getView()->set('cookieConsentStyle', $this->getConfig()->get('cookie_consent_style'));
+ $this->getView()->set('cookieConsentPos', $this->getConfig()->get('cookie_consent_pos'));
+ $this->getView()->set('cookieConsentMessage', $this->getConfig()->get('cookie_consent_message'));
+ $this->getView()->set('cookieConsentText', $this->getConfig()->get('cookie_consent_text'));
+
+ }
+}
diff --git a/application/modules/cookieconsent/translations/de.php b/application/modules/cookieconsent/translations/de.php
new file mode 100644
index 000000000..d871261fe
--- /dev/null
+++ b/application/modules/cookieconsent/translations/de.php
@@ -0,0 +1,20 @@
+ 'Cookie-Richtlinien',
+ 'cookieConsentShow' => 'Anzeigen',
+ 'cookieConsentStyle' => 'Style',
+ 'cookieConsentStyleDark' => 'Dunkel',
+ 'cookieConsentStyleLight' => 'Hell',
+ 'cookieConsentPos' => 'Position',
+ 'cookieConsentPosTop' => 'am Seitenanfang',
+ 'cookieConsentPosFloating' => 'unten Rechts',
+ 'cookieConsentPosBottom' => 'am Seitenende',
+ 'cookieConsentMessage' => 'Benachrichtigungstext',
+ 'cookieConsentText' => 'Richtlinien-Text',
+);
\ No newline at end of file
diff --git a/application/modules/cookieconsent/translations/en.php b/application/modules/cookieconsent/translations/en.php
new file mode 100644
index 000000000..dd2277160
--- /dev/null
+++ b/application/modules/cookieconsent/translations/en.php
@@ -0,0 +1,14 @@
+ 'Cookie Consent',
+ 'cookieConsentShow' => 'Show',
+ 'cookieConsentPos' => 'Position',
+ 'cookieConsentMessage' => 'Notification text',
+ 'cookieConsentText' => 'Consent Text',
+);
diff --git a/application/modules/cookieconsent/views/admin/index/index.php b/application/modules/cookieconsent/views/admin/index/index.php
new file mode 100644
index 000000000..462cf604b
--- /dev/null
+++ b/application/modules/cookieconsent/views/admin/index/index.php
@@ -0,0 +1,65 @@
+
+
diff --git a/application/modules/cookieconsent/views/index/index.php b/application/modules/cookieconsent/views/index/index.php
new file mode 100644
index 000000000..6e82b1206
--- /dev/null
+++ b/application/modules/cookieconsent/views/index/index.php
@@ -0,0 +1,2 @@
+
+=$this->get('cookieConsentText') ?>
diff --git a/application/modules/install/controllers/Index.php b/application/modules/install/controllers/Index.php
index 5b80c5aba..af9d94f08 100755
--- a/application/modules/install/controllers/Index.php
+++ b/application/modules/install/controllers/Index.php
@@ -230,9 +230,9 @@ public function configAction()
$modulesToInstall = $_SESSION['install']['modulesToInstall'][$_SESSION['install']['usage']];
if (!empty($modulesToInstall)) {
- $modulesToInstall = array_merge(array('admin', 'article', 'user', 'page', 'media', 'comment', 'imprint', 'contact', 'privacy', 'statistic'), $modulesToInstall);
+ $modulesToInstall = array_merge(array('admin', 'article', 'user', 'page', 'media', 'comment', 'imprint', 'contact', 'privacy', 'statistic', 'cookieconsent'), $modulesToInstall);
} else {
- $modulesToInstall = array('admin', 'article', 'user', 'page', 'media', 'comment', 'imprint', 'contact', 'privacy', 'statistic');
+ $modulesToInstall = array('admin', 'article', 'user', 'page', 'media', 'comment', 'imprint', 'contact', 'privacy', 'statistic', 'cookieconsent');
}
$moduleMapper = new \Modules\Admin\Mappers\Module();
@@ -293,7 +293,7 @@ public function configAction()
* Will not linked in menu
*/
foreach ($modulesToInstall as $module) {
- if (in_array($module, array('comment', 'shoutbox', 'admin', 'media', 'page', 'newsletter', 'statistic'))) {
+ if (in_array($module, array('comment', 'shoutbox', 'admin', 'media', 'page', 'newsletter', 'statistic', 'cookieconsent'))) {
continue;
}
@@ -345,15 +345,16 @@ public function ajaxconfigAction()
/*
* System-Modules
*/
- $modules['user']['types'] = array();
- $modules['article']['types'] = array();
- $modules['page']['types'] = array();
- $modules['media']['types'] = array();
- $modules['comment']['types'] = array();
- $modules['contact']['types'] = array();
- $modules['imprint']['types'] = array();
- $modules['privacy']['types'] = array();
- $modules['statistic']['types'] = array();
+ $modules['user']['types'] = array();
+ $modules['article']['types'] = array();
+ $modules['page']['types'] = array();
+ $modules['media']['types'] = array();
+ $modules['comment']['types'] = array();
+ $modules['contact']['types'] = array();
+ $modules['imprint']['types'] = array();
+ $modules['privacy']['types'] = array();
+ $modules['cookieconsent']['types'] = array();
+ $modules['statistic']['types'] = array();
/*
* Optional-Modules.