diff options
| author | André Noack <noack@data-quest.de> | 2023-09-12 10:40:06 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2023-09-12 10:40:06 +0000 |
| commit | be49b07375bc339a7e4d5fd3086b8322f4a6a5fa (patch) | |
| tree | df38ec935c35374b6528c4f7e6cc2983bfd95fa2 /lib | |
| parent | 10e1c97348f334846ea16262a5f8c6765e7e01e4 (diff) | |
Resolve #3082 "Barrierefreiheitserklärung (Muster) ist nicht im Release"
Closes #3082
Merge request studip/studip!2148
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/classes/Siteinfo.php | 13 | ||||
| -rw-r--r-- | lib/navigation/FooterNavigation.php | 12 |
2 files changed, 25 insertions, 0 deletions
diff --git a/lib/classes/Siteinfo.php b/lib/classes/Siteinfo.php index b17d611..0afa575 100644 --- a/lib/classes/Siteinfo.php +++ b/lib/classes/Siteinfo.php @@ -227,6 +227,7 @@ class SiteinfoMarkupEngine { $this->siteinfoMarkup("/\(:indicator ([a-z_\-]*):\)/i", function ($m) {return $this->indicator($m[1]);}); $this->siteinfoMarkup("/\(:history:\)/", [$this, 'history']); $this->siteinfoMarkup("/\(:terms:\)/", [$this, 'termsOfUse']); + $this->siteinfoMarkup("/\(:reportbarrierlink:\)/", [$this, 'reportBarrierLink']); $this->siteinfoMarkup("'\[style=(")?(.*?)(")?\]\s*(.*?)\s*\[/style\]'s", function ($m) {return $this->style($m[2], $m[4]);}); } @@ -572,6 +573,18 @@ class SiteinfoMarkupEngine { $styled = str_replace('\"', '"', $styled); return '<div style="'.$style.'">'.$styled.'</div>'; } + + public function reportBarrierLink(): string + { + return sprintf( + '<a href="%s">' . _('Barriere melden') . '</a>', + URLHelper::getLink( + 'dispatch.php/accessibility/forms/report_barrier', + ['page' => Request::url(), 'cancel_login' => '1'], + true + ) + ); + } } //functions for language filtering; used both in page-content and detail- and rubric-names diff --git a/lib/navigation/FooterNavigation.php b/lib/navigation/FooterNavigation.php index 3e89315..800da37 100644 --- a/lib/navigation/FooterNavigation.php +++ b/lib/navigation/FooterNavigation.php @@ -46,8 +46,20 @@ class FooterNavigation extends Navigation //It is a Stud.IP page. Add the cancel_login URL parameter. $privacy_url = URLHelper::getURL($privacy_url, ['cancel_login' => '1']); } + $this->addSubNavigation('privacy', new Navigation(_('Datenschutz'), $privacy_url)); + $a11yurl = Config::get()->ACCESSIBILITY_DISCLAIMER_URL; + if ($a11yurl) { + $this->addSubNavigation( + 'a11ydisclaimer', + new Navigation( + _('Barrierefreiheitserklärung'), + URLHelper::getURL($a11yurl, ['cancel_login' => 1], true) + ) + ); + } + $this->addSubNavigation( 'report_barrier', new Navigation( |
