summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorszaimen <szaimen@e.mail.de>2022-03-07 11:07:25 +0100
committerszaimen <szaimen@e.mail.de>2022-08-30 15:46:09 +0200
commit955b6bb82ea38fa15a4659238b98bfc76cfc4420 (patch)
tree40d3af8ef6a1f3648e56ac452c9119fa885f7d91 /lib/private
parentf56ecf92426026c913497bea9f7ca99e8d3ac631 (diff)
downloadnextcloud-server-955b6bb82ea38fa15a4659238b98bfc76cfc4420.tar.gz
nextcloud-server-955b6bb82ea38fa15a4659238b98bfc76cfc4420.zip
add a way to open the admin settings overview directly
Signed-off-by: szaimen <szaimen@e.mail.de>
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/NavigationManager.php40
1 files changed, 30 insertions, 10 deletions
diff --git a/lib/private/NavigationManager.php b/lib/private/NavigationManager.php
index 2ffd25df9b8..b5fa87a9860 100644
--- a/lib/private/NavigationManager.php
+++ b/lib/private/NavigationManager.php
@@ -211,17 +211,37 @@ class NavigationManager implements INavigationManager {
'icon' => $this->urlGenerator->imagePath('settings', 'apps.svg'),
'name' => $l->t('Apps'),
]);
- }
- // Personal and (if applicable) admin settings
- $this->add([
- 'type' => 'settings',
- 'id' => 'settings',
- 'order' => 2,
- 'href' => $this->urlGenerator->linkToRoute('settings.PersonalSettings.index'),
- 'name' => $l->t('Settings'),
- 'icon' => $this->urlGenerator->imagePath('settings', 'admin.svg'),
- ]);
+ // Personal settings
+ $this->add([
+ 'type' => 'settings',
+ 'id' => 'settings',
+ 'order' => 2,
+ 'href' => $this->urlGenerator->linkToRoute('settings.PersonalSettings.index'),
+ 'name' => $l->t('Personal settings'),
+ 'icon' => $this->urlGenerator->imagePath('settings', 'admin.svg'),
+ ]);
+
+ // Admin settings
+ $this->add([
+ 'type' => 'settings',
+ 'id' => 'admin_settings',
+ 'order' => 3,
+ 'href' => $this->urlGenerator->linkToRoute('settings.AdminSettings.index', ['section' => 'overview']),
+ 'name' => $l->t('Admin settings'),
+ 'icon' => $this->urlGenerator->imagePath('settings', 'admin.svg'),
+ ]);
+ } else {
+ // Personal settings
+ $this->add([
+ 'type' => 'settings',
+ 'id' => 'settings',
+ 'order' => 2,
+ 'href' => $this->urlGenerator->linkToRoute('settings.PersonalSettings.index'),
+ 'name' => $l->t('Settings'),
+ 'icon' => $this->urlGenerator->imagePath('settings', 'admin.svg'),
+ ]);
+ }
$logoutUrl = \OC_User::getLogoutUrl($this->urlGenerator);
if ($logoutUrl !== '') {