diff options
author | julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> | 2022-11-21 17:33:22 +0100 |
---|---|---|
committer | julia.kirschenheuter <julia.kirschenheuter@nextcloud.com> | 2022-11-22 09:31:28 +0100 |
commit | 3559334fec524006fa8835833dee173a2949c507 (patch) | |
tree | 6e20fdea6ec0c8bedecfdf929f8c92b4df8d105f /apps/settings | |
parent | c2cb790532f2a7ea5a9ad39167d95b69c9ed6c10 (diff) | |
download | nextcloud-server-3559334fec524006fa8835833dee173a2949c507.tar.gz nextcloud-server-3559334fec524006fa8835833dee173a2949c507.zip |
Help pages: set window title for sidebar sections
Signed-off-by: julia.kirschenheuter <julia.kirschenheuter@nextcloud.com>
Diffstat (limited to 'apps/settings')
-rw-r--r-- | apps/settings/lib/Controller/HelpController.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/apps/settings/lib/Controller/HelpController.php b/apps/settings/lib/Controller/HelpController.php index b8780ae40ba..38ce84843ed 100644 --- a/apps/settings/lib/Controller/HelpController.php +++ b/apps/settings/lib/Controller/HelpController.php @@ -33,6 +33,7 @@ use OCP\AppFramework\Controller; use OCP\AppFramework\Http\ContentSecurityPolicy; use OCP\AppFramework\Http\TemplateResponse; use OCP\IGroupManager; +use OCP\IL10N; use OCP\INavigationManager; use OCP\IRequest; use OCP\IURLGenerator; @@ -45,6 +46,8 @@ class HelpController extends Controller { private $urlGenerator; /** @var IGroupManager */ private $groupManager; + /** @var IL10N */ + private $l10n; /** @var string */ private $userId; @@ -55,13 +58,15 @@ class HelpController extends Controller { INavigationManager $navigationManager, IURLGenerator $urlGenerator, ?string $userId, - IGroupManager $groupManager + IGroupManager $groupManager, + IL10N $l10n ) { parent::__construct($appName, $request); $this->navigationManager = $navigationManager; $this->urlGenerator = $urlGenerator; $this->userId = $userId; $this->groupManager = $groupManager; + $this->l10n = $l10n; } /** @@ -73,8 +78,9 @@ class HelpController extends Controller { */ public function help(string $mode = 'user'): TemplateResponse { $this->navigationManager->setActiveEntry('help'); - + $pageTitle = $this->l10n->t('Administrator documentation'); if ($mode !== 'admin') { + $pageTitle = $this->l10n->t('User documentation'); $mode = 'user'; } @@ -91,6 +97,7 @@ class HelpController extends Controller { 'urlUserDocs' => $urlUserDocs, 'urlAdminDocs' => $urlAdminDocs, 'mode' => $mode, + 'pageTitle' => $pageTitle, ]); $policy = new ContentSecurityPolicy(); $policy->addAllowedFrameDomain('\'self\''); |