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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
<?php
/**
* ContensDashboardNavigation.php - navigation for contents dashboard
*
* 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 Ron Lucke <lucke@elan-ev.de>
* @license http://www.gnu.org/licenses/gpl-2.0.html GPL version 2
*
* @category Stud.IP
*/
class ContentsNavigation extends Navigation
{
/**
* Initialize a new Navigation instance.
*/
public function __construct()
{
parent::__construct(_('Arbeitsplatz'));
$this->setImage(Icon::create('content', 'navigation', ['title' => _('Mein Arbeitsplatz')]));
}
/**
* Initialize the subnavigation of this item. This method
* is called once before the first item is added or removed.
*/
public function initSubNavigation()
{
parent::initSubNavigation();
global $perm;
$overview = new Navigation(_('Übersicht'));
$overview->addSubNavigation(
'index',
new Navigation(_('Übersicht'), 'dispatch.php/contents/overview')
);
$this->addSubNavigation('overview', $overview);
if (PluginManager::getInstance()->getPlugin(CoursewareModule::class)) {
$courseware = new Navigation(_('Courseware'));
$courseware->setDescription(_('Erstellen und Sammeln von Lernmaterialien'));
$courseware->setImage(Icon::create('courseware'));
$courseware = new Navigation(_('Courseware'));
$courseware->setDescription(_('Erstellen und Sammeln von Lernmaterialien'));
$courseware->setImage(Icon::create('courseware'));
$courseware->addSubNavigation(
'shelf',
new Navigation(_('Lernmaterialien'), 'dispatch.php/contents/courseware/index')
);
$courseware->addSubNavigation(
'courseware',
new Navigation(_('Inhalt'), 'dispatch.php/contents/courseware/courseware')
);
$courseware->addSubNavigation(
'releases',
new Navigation(_('Freigaben'), 'dispatch.php/contents/courseware/releases')
);
$courseware->addSubNavigation(
'bookmarks',
new Navigation(_('Lesezeichen'), 'dispatch.php/contents/courseware/bookmarks')
);
$courseware->addSubNavigation(
'courses_overview',
new Navigation(_('Meine Veranstaltungen'), 'dispatch.php/contents/courseware/courses_overview')
);
$this->addSubNavigation('courseware', $courseware);
$this->addSubNavigation('courseware', $courseware);
}
$files = new Navigation(_('Dateien'));
$files->setDescription(_('Überblick über alle Dokumente'));
$files->setImage(Icon::create('files'));
$files->addSubNavigation(
'overview',
new Navigation(_('Übersicht'), 'dispatch.php/files/overview')
);
$files->addSubNavigation(
'my_files',
new Navigation(_('Persönliche Dateien'), 'dispatch.php/files/index')
);
$files->addSubNavigation(
'search',
new Navigation(_('Suche'), 'dispatch.php/files_dashboard/search')
);
$this->addSubNavigation('files', $files);
// news
$news = new Navigation(_('Ankündigungen'), 'dispatch.php/news/admin_news');
$news->setImage(Icon::create('news'));
$news->setDescription(_('Verwaltung von Ankündigungen in Ihren Bereichen'));
$this->addSubNavigation('news', $news);
// votes and tests, evaluations
if (Config::get()->VOTE_ENABLE) {
$questionnaire = new Navigation(_('Fragebögen'), 'dispatch.php/questionnaire/overview');
$questionnaire->setImage(Icon::create('evaluation'));
$questionnaire->setDescription(_('Zentrale Sammlung Ihrer Fragebögen'));
$this->addSubNavigation('questionnaire', $questionnaire);
$sub_nav = new Navigation(
_('Übersicht'),
'dispatch.php/questionnaire/overview'
);
$questionnaire->addSubNavigation('overview', $sub_nav);
if ($GLOBALS['perm']->have_perm('admin')) {
$sub_nav = new Navigation(
_('Fragebögen zuordnen'),
'dispatch.php/questionnaire/assign'
);
$questionnaire->addSubNavigation('assign', $sub_nav);
}
}
if (!$GLOBALS['perm']->have_perm('root') && $GLOBALS['user']->getAuthenticatedUser()->hasRole('Hilfe-Administrator(in)')) {
$help = new Navigation(_('Hilfe'), 'dispatch.php/help_content/admin_overview');
$help->setImage(Icon::create('question-circle'));
$help->setDescription(_('Verwaltung der Hilfe-Inhalte in diesem Stud.IP'));
$this->addSubNavigation('help_admin', $help);
if (Config::get()->TOURS_ENABLE) {
$help->addSubNavigation('tour', new Navigation(_('Touren'), 'dispatch.php/tour/admin_overview'));
}
$help->addSubNavigation('help_content', new Navigation(_('Hilfe-Texte'), 'dispatch.php/help_content/admin_overview'));
}
$short_urls = new Navigation(_('Kurz-URLs'), 'dispatch.php/short_urls/index');
$short_urls->setImage(Icon::create('group'));
$short_urls->setDescription(_('Verwaltung Ihrer Kurz-URLs'));
$sub_nav = new Navigation(
_('Übersicht'),
'dispatch.php/short_urls/index'
);
$short_urls->addSubNavigation('overview', $sub_nav);
$this->addSubNavigation('short_urls', $short_urls);
}
}
|