Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Stud.IP
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Jan-Hendrik Willms
Stud.IP
Commits
eca369df
Commit
eca369df
authored
1 year ago
by
Jan-Hendrik Willms
Committed by
David Siegfried
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
relocate navigation, fixes #3163
Closes #3163 and #3164 Merge request
studip/studip!2144
parent
1488ccea
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/navigation/StudipNavigation.php
+17
-16
17 additions, 16 deletions
lib/navigation/StudipNavigation.php
with
17 additions
and
16 deletions
lib/navigation/StudipNavigation.php
+
17
−
16
View file @
eca369df
...
...
@@ -34,14 +34,22 @@ class StudipNavigation extends Navigation
// if the user is not logged in, he will see the free courses, otherwise
// the my courses page will be shown.
if
(
is_object
(
$user
)
&&
$user
->
id
!=
'nobody'
||
Config
::
get
()
->
ENABLE_FREE_ACCESS
)
{
if
(
$user
->
id
!=
=
'nobody'
||
Config
::
get
()
->
ENABLE_FREE_ACCESS
)
{
$this
->
addSubNavigation
(
'browse'
,
new
BrowseNavigation
());
}
// if a course is selected, the navigation for it will be loaded
if
(
Context
::
getId
())
{
$this
->
addSubNavigation
(
'course'
,
new
CourseNavigation
());
}
try
{
if
(
Config
::
get
()
->
RESOURCES_ENABLE
if
(
Config
::
get
()
->
RESOURCES_ENABLE
&&
Config
::
get
()
->
RESOURCES_SHOW_PUBLIC_ROOM_PLANS
&&
$user
->
id
==
'nobody'
&&
Room
::
publicBookingPlansExists
())
{
&&
$user
->
id
===
'nobody'
&&
Room
::
publicBookingPlansExists
()
)
{
//Show a navigation entry for the public booking plans overview.
$nav
=
new
Navigation
(
_
(
'Belegungspläne'
),
...
...
@@ -55,14 +63,8 @@ class StudipNavigation extends Navigation
//Do nothing here.
}
// if a course is selected, the navigation for it will be loaded, but
// it will not be shown in the main toolbar
if
(
Context
::
getId
())
{
$this
->
addSubNavigation
(
'course'
,
new
CourseNavigation
());
}
// contents pages
if
(
is_object
(
$user
)
&&
$user
->
id
!=
'nobody'
)
{
if
(
$user
->
id
!=
=
'nobody'
)
{
$this
->
addSubNavigation
(
'contents'
,
new
ContentsNavigation
());
}
...
...
@@ -71,7 +73,7 @@ class StudipNavigation extends Navigation
$this
->
addSubNavigation
(
'oer'
,
new
OERNavigation
());
}
if
(
is_object
(
$user
)
&&
$user
->
id
!=
'nobody'
)
{
if
(
$user
->
id
!=
=
'nobody'
)
{
// internal message system
$this
->
addSubNavigation
(
'messaging'
,
new
MessagingNavigation
());
...
...
@@ -89,8 +91,7 @@ class StudipNavigation extends Navigation
// avatar menu
$this
->
addSubNavigation
(
'avatar'
,
new
AvatarNavigation
());
}
else
if
(
$user
->
id
==
'nobody'
&&
Config
::
get
()
->
COURSE_SEARCH_IS_VISIBLE_NOBODY
)
{
}
elseif
(
Config
::
get
()
->
COURSE_SEARCH_IS_VISIBLE_NOBODY
)
{
// search page
$this
->
addSubNavigation
(
'search'
,
new
SearchNavigation
());
}
...
...
@@ -126,7 +127,7 @@ class StudipNavigation extends Navigation
}
// admin page
if
(
is_object
(
$user
)
&&
$perm
->
have_perm
(
'admin'
))
{
if
(
$perm
->
have_perm
(
'admin'
))
{
$this
->
addSubNavigation
(
'admin'
,
new
AdminNavigation
());
}
...
...
@@ -139,7 +140,7 @@ class StudipNavigation extends Navigation
$links
=
new
Navigation
(
'Links'
);
// login / logout
if
(
!
is_object
(
$user
)
&&
$user
->
id
===
'nobody'
)
{
if
(
$user
->
id
===
'nobody'
)
{
if
(
in_array
(
'CAS'
,
$GLOBALS
[
'STUDIP_AUTH_PLUGIN'
]))
{
$links
->
addSubNavigation
(
'login_cas'
,
new
Navigation
(
_
(
'Login CAS'
),
Request
::
url
(),
[
'again'
=>
'yes'
,
'sso'
=>
'cas'
]));
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment