prepare release 1.7 (#1388)
This commit is contained in:
@@ -64,6 +64,7 @@ class ThemeOptionsSubscriber implements EventSubscriberInterface
|
||||
/** @var User $user */
|
||||
$user = $this->storage->getToken()->getUser();
|
||||
|
||||
/** @var UserPreference $ref */
|
||||
foreach ($user->getPreferences() as $ref) {
|
||||
$name = $ref->getName();
|
||||
switch ($name) {
|
||||
@@ -73,6 +74,16 @@ class ThemeOptionsSubscriber implements EventSubscriberInterface
|
||||
}
|
||||
break;
|
||||
|
||||
case 'theme.layout':
|
||||
if ($ref->getValue() === 'boxed') {
|
||||
$this->helper->setOption('boxed_layout', true);
|
||||
$this->helper->setOption('fixed_layout', false);
|
||||
} elseif ($ref->getValue() === 'fixed') {
|
||||
$this->helper->setOption('boxed_layout', false);
|
||||
$this->helper->setOption('fixed_layout', true);
|
||||
}
|
||||
break;
|
||||
|
||||
case 'theme.collapsed_sidebar':
|
||||
$this->helper->setOption('collapsed_sidebar', $ref->getValue());
|
||||
break;
|
||||
|
||||
@@ -18,6 +18,7 @@ use App\Form\Type\CalendarViewType;
|
||||
use App\Form\Type\InitialViewType;
|
||||
use App\Form\Type\LanguageType;
|
||||
use App\Form\Type\SkinType;
|
||||
use App\Form\Type\ThemeLayoutType;
|
||||
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
|
||||
use Symfony\Component\EventDispatcher\EventSubscriberInterface;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CheckboxType;
|
||||
@@ -128,6 +129,12 @@ class UserPreferenceSubscriber implements EventSubscriberInterface
|
||||
->setOrder(400)
|
||||
->setType(SkinType::class),
|
||||
|
||||
(new UserPreference())
|
||||
->setName('theme.layout')
|
||||
->setValue('fixed')
|
||||
->setOrder(450)
|
||||
->setType(ThemeLayoutType::class),
|
||||
|
||||
(new UserPreference())
|
||||
->setName('theme.collapsed_sidebar')
|
||||
->setValue(false)
|
||||
|
||||
Reference in New Issue
Block a user