summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apps/settings/lib/Controller/HelpController.php11
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\'');