simplified theme settings and standard layout (#586)

This commit is contained in:
Kevin Papst
2019-02-23 13:51:44 +01:00
committed by GitHub
parent 32fbebd469
commit 36a158a805
14 changed files with 54 additions and 143 deletions

View File

@@ -66,13 +66,16 @@ class ThemeOptionsSubscriber implements EventSubscriberInterface
$skin = '';
foreach ($user->getPreferences() as $ref) {
$name = $ref->getName();
if (UserPreference::SKIN === $name) {
$skin = 'skin-' . $ref->getValue();
}
if (false !== strpos($name, 'theme.')) {
$this->helper->setOption(str_replace('theme.', '', $name), $ref->getValue());
$name = $ref->getName();
switch ($name) {
case UserPreference::SKIN:
$skin = 'skin-' . $ref->getValue();
break;
case 'theme.collapsed_sidebar':
$this->helper->setOption('collapsed_sidebar', $ref->getValue());
break;
}
}