1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
<?php
/*
* FooterNavigation.php - navigation for the footer on every page
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* @author Michael Riehemann <michael.riehemann@uni-oldenburg.de>
* @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
* @category Stud.IP
* @since 2.1
*/
class FooterNavigation extends Navigation
{
/**
* Initialize a new Navigation instance.
*/
public function __construct()
{
parent::__construct(_('Footer'));
}
public function initSubNavigation()
{
parent::initSubNavigation();
// imprint
$this->addSubNavigation('siteinfo', new Navigation(_('Impressum'), 'dispatch.php/siteinfo/show?cancel_login=1'));
// sitemap
if (is_object($GLOBALS['user']) && $GLOBALS['user']->id !== 'nobody') {
$this->addSubNavigation('sitemap', new Navigation(_('Sitemap'), 'dispatch.php/sitemap/'));
}
//studip
$this->addSubNavigation('studip', new Navigation(_('Stud.IP'), 'http://www.studip.de/'));
// Datenschutzerklärung
//Check if the privacy url is one of the Stud.IP pages:
$privacy_url = Config::get()->PRIVACY_URL;
if (is_internal_url($privacy_url)) {
//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));
$this->addSubNavigation(
'report_barrier',
new Navigation(
_('Barriere melden'),
URLHelper::getURL('dispatch.php/accessibility/forms/report_barrier', ['page' => Request::url()]),
['data-dialog' => '']
)
);
}
}
|