blob: a762db7c4f9a613528198fb9dbd8c116e55f2e4e (
plain)
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
|
<?php
/*
* AvatarNavigation.php - navigation for menu "below" the avatar in header
*
* @author Jan-Hendrik Willms <tleilax+studip@gmail.com>
* @license GPL2 or any later version
*/
class AvatarNavigation extends Navigation
{
/**
* Initialize a new Navigation instance.
*/
public function __construct()
{
parent::__construct(_('Avatar-Menü'));
}
/**
* Initialize the subnavigation of this item. This method
* is called once before the first item is added or removed.
*/
public function initSubNavigation()
{
parent::initSubNavigation();
// Link to profile
$navigation = new Navigation(_('Profil'), 'dispatch.php/profile/index');
$navigation->setImage(Icon::create('person'));
$this->addSubNavigation('profile', $navigation);
if ($GLOBALS['perm']->have_perm('autor')) {
// Link to user data
$navigation = new Navigation(_('Persönliche Angaben'), 'dispatch.php/settings/account');
$navigation->setImage(Icon::create('key'));
$this->addSubNavigation('account', $navigation);
// Link to user settings
$navigation = new Navigation(_('Einstellungen'), 'dispatch.php/settings/general');
$navigation->setImage(Icon::create('admin'));
$this->addSubNavigation('settings', $navigation);
// Link to accessibility settings
$navigation = new Navigation(_('Barrierefreiheit'), 'dispatch.php/settings/accessibility');
$navigation->setImage(Icon::create('accessibility'));
$this->addSubNavigation('accessibility', $navigation);
}
// Link to logout
$navigation = new Navigation(_('Logout'), 'logout.php');
$navigation->setImage(Icon::create('door-leave'));
$this->addSubNavigation('logout', $navigation);
}
}
|