diff options
author | John Molakvoæ <skjnldsv@protonmail.com> | 2022-04-15 13:54:53 +0200 |
---|---|---|
committer | John Molakvoæ <skjnldsv@protonmail.com> | 2022-04-21 09:31:07 +0200 |
commit | 69d1d1a84e5e8937046d30714f11036b680cc04a (patch) | |
tree | 76666f2b2aef59e110d963fdeae04107e6ead828 /lib | |
parent | fa18a77fa24ad01944d79232fb637076282dedc2 (diff) | |
download | nextcloud-server-69d1d1a84e5e8937046d30714f11036b680cc04a.tar.gz nextcloud-server-69d1d1a84e5e8937046d30714f11036b680cc04a.zip |
Write body theme selector straight in the template
Signed-off-by: John Molakvoæ <skjnldsv@protonmail.com>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/TemplateLayout.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/TemplateLayout.php b/lib/private/TemplateLayout.php index a379f23a1ef..b49ba49ebb8 100644 --- a/lib/private/TemplateLayout.php +++ b/lib/private/TemplateLayout.php @@ -81,6 +81,7 @@ class TemplateLayout extends \OC_Template { /** @var IInitialStateService */ $this->initialState = \OC::$server->get(IInitialStateService::class); + // Decide which page we show if ($renderAs === TemplateResponse::RENDER_AS_USER) { /** @var INavigationManager */ @@ -99,6 +100,13 @@ class TemplateLayout extends \OC_Template { $this->initialState->provideInitialState('unified-search', 'live-search', $this->config->getAppValue('core', 'unified-search.live-search', 'yes') === 'yes'); Util::addScript('core', 'unified-search', 'core'); + // Set body data-theme + if (\OC::$server->getAppManager()->isEnabledForUser('theming') && class_exists('\OCA\Theming\Service\ThemesService')) { + /** @var \OCA\Theming\Service\ThemesService */ + $themesService = \OC::$server->get(\OCA\Theming\Service\ThemesService::class); + $this->assign('enabledThemes', $themesService->getEnabledThemes()); + } + // set logo link target $logoUrl = $this->config->getSystemValueString('logo_url', ''); $this->assign('logoUrl', $logoUrl); |