Skip to content

Commit

Permalink
make tabs be tabs nextcloud#40490
Browse files Browse the repository at this point in the history
Signed-off-by: Private Maker <privatemaker@posteo.net>
  • Loading branch information
privatemaker committed Sep 21, 2023
1 parent bb2353a commit 86bf00f
Showing 1 changed file with 13 additions and 13 deletions.
26 changes: 13 additions & 13 deletions apps/settings/lib/Controller/CommonSettingsTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -135,40 +135,40 @@ private function formatSettings(array $settings): array {
}

private function getPersonalResponse(string $section): TemplateResponse {
$templateParams = [];
$templateParams = [];
$templateParams = array_merge($templateParams, $this->getNavigationParameters('personal', $section));
$templateParams = array_merge($templateParams, $this->getSettings($section));
$activeSection = $this->settingsManager->getSection('personal', $section);

if ($activeSection) {
if ($activeSection) {
$templateParams['pageTitle'] = $activeSection->getName();
$templateParams['activeSectionId'] = $activeSection->getID();
}

if ($section === 'theming') {
$this->navigationManager->setActiveEntry('accessibility_settings');
} else {
$this->navigationManager->setActiveEntry('settings');
}
if ($section === 'theming') {
$this->navigationManager->setActiveEntry('accessibility_settings');
} else {
$this->navigationManager->setActiveEntry('settings');
}

return new TemplateResponse('settings', 'settings/personal', $templateParams);
}
}

private function getAdminResponse(string $section): TemplateResponse {
$templateParams = [];
$templateParams = [];
$templateParams = array_merge($templateParams, $this->getNavigationParameters('admin', $section));
$templateParams = array_merge($templateParams, $this->getSettings($section));
$activeSection = $this->settingsManager->getSection('admin', $section);

if ($activeSection) {
if ($activeSection) {
$templateParams['pageTitle'] = $activeSection->getName();
$templateParams['activeSectionId'] = $activeSection->getID();
}
}

$this->navigationManager->setActiveEntry('admin_settings');
$this->navigationManager->setActiveEntry('admin_settings');

return new TemplateResponse('settings', 'settings/admin', $templateParams);
}
}

abstract protected function getSettings($section);
}

0 comments on commit 86bf00f

Please sign in to comment.