mirror of
https://github.com/nextcloud/server.git
synced 2026-04-22 14:50:17 -04:00
add a way to open the admin settings overview directly
Signed-off-by: szaimen <szaimen@e.mail.de>
This commit is contained in:
parent
f56ecf9242
commit
955b6bb82e
2 changed files with 36 additions and 11 deletions
|
|
@ -134,7 +134,12 @@ trait CommonSettingsTrait {
|
|||
}
|
||||
|
||||
private function getIndexResponse($type, $section) {
|
||||
$this->navigationManager->setActiveEntry('settings');
|
||||
if ($type === 'personal') {
|
||||
$this->navigationManager->setActiveEntry('settings');
|
||||
} elseif ($type === 'admin') {
|
||||
$this->navigationManager->setActiveEntry('admin_settings');
|
||||
}
|
||||
|
||||
$templateParams = [];
|
||||
$templateParams = array_merge($templateParams, $this->getNavigationParameters($type, $section));
|
||||
$templateParams = array_merge($templateParams, $this->getSettings($section));
|
||||
|
|
|
|||
|
|
@ -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 !== '') {
|
||||
|
|
|
|||
Loading…
Reference in a new issue