From 4539605fa9ffce60732ce0ba647ad324dcf53be3 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 20 Jan 2021 21:27:53 +0100 Subject: [PATCH] wip #4216 @1 --- app/Console/Commands/WorkshopMigration.php | 41 ++++- app/Models/FluidbookTheme.php | 194 +++++++-------------- 2 files changed, 103 insertions(+), 132 deletions(-) diff --git a/app/Console/Commands/WorkshopMigration.php b/app/Console/Commands/WorkshopMigration.php index 5c6b7e062..6188e4521 100644 --- a/app/Console/Commands/WorkshopMigration.php +++ b/app/Console/Commands/WorkshopMigration.php @@ -3,8 +3,8 @@ namespace App\Console\Commands; +use App\Models\FluidbookTheme; use App\Models\FluidbookQuote; -use App\Models\Signature; use Cubist\Backpack\Console\Commands\CubistCommand; use Illuminate\Support\Facades\DB; @@ -18,9 +18,11 @@ class WorkshopMigration extends CubistCommand public function handle() { $actions = [ - 'Backup current database' => 'backup', - 'Import Quotes' => 'importQuotes', + //'Backup current database' => 'backup', + //'Import Quotes' => 'importQuotes', 'Migrate magic models' => 'migrate', + 'Import Themes' => 'importThemes', + 'Clean caches' => 'cleanCache' ]; @@ -56,6 +58,39 @@ class WorkshopMigration extends CubistCommand $this->executeProcessQuiet('php artisan optimize:clear'); } + protected function importThemes() + { + $map = ['theme_id' => 'id', + 'nom' => 'name', + 'proprietaire' => 'owner', + 'date' => 'created_at',]; + + FluidbookTheme::truncate(); + foreach (DB::table($this->_oldDB . '.themes')->get() as $e) { + $c = new FluidbookTheme(); + foreach ($map as $old => $new) { + $v = $e->$old; + if ($old === 'date') { + $date = new \DateTime(); + $date->setTimestamp($v); + $v = $date; + } + $c->setAttribute($new, $v); + } + $s = $this->_unserialize($e->parametres); + $c->setAttribute('settings', json_encode($s->datas)); + $c->save(); + } + } + + protected function _unserialize($str) + { + $class = 'stdClass'; + $str = preg_replace('/^O:\d+:"[^"]++"/', 'O:' . strlen($class) . ':"' . $class . '"', $str); + $str = str_replace("s:8:\"\0*\0datas\"", 's:5:"datas"', $str); + return unserialize($str); + } + protected function importQuotes() { $map = ['demande_id' => 'id', diff --git a/app/Models/FluidbookTheme.php b/app/Models/FluidbookTheme.php index 9fe34c3bb..bf9b18800 100644 --- a/app/Models/FluidbookTheme.php +++ b/app/Models/FluidbookTheme.php @@ -19,18 +19,26 @@ class FluidbookTheme extends CubistMagicAbstractModel parent::setFields(); $this->addField(['name' => 'owner', - 'label' => __('Propriétaire'), - 'type' => User::class, - 'column' => true, - 'can' => 'fluidbook-publication:admin', - 'column_attribute' => 'companyWithNameOnTwoLines', - 'attribute' => 'companyWithName']); + 'label' => __('Propriétaire'), + 'type' => User::class, + 'column' => true, + 'can' => 'fluidbook-publication:admin', + 'column_attribute' => 'companyWithNameOnTwoLines', + 'attribute' => 'companyWithName'] + ); - $this->setSettingsFields(); + $this->addField('name', 'Text', __('Nom'), [ 'column' => true]); + + $this->setSettingsFields(); } public function setSettingsFields() { + $this->addField([ + 'name' => 'section_bouton', + 'type' => 'FormSection', + 'label' => 'Personnalisation des boutons', + ]); $this->addField([ 'name' => 'arrowsEnabled', 'type' => 'SelectFromArray', @@ -44,14 +52,10 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des boutons'), ]); - $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation des boutons'), ]); - return; $this->addField([ 'name' => 'couleurA', 'type' => 'Color', @@ -61,9 +65,7 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des boutons'), ]); - $this->addField([ 'name' => 'arrowsColor', 'type' => 'Color', @@ -73,7 +75,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des boutons'), ]); $this->addField([ 'name' => 'shadeOnArrows', @@ -83,7 +84,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des boutons'), ]); $this->addField([ 'name' => 'arrowsTheme', @@ -93,7 +93,11 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des boutons'), + ]); + $this->addField([ + 'name' => 'section_menu', + 'type' => 'FormSection', + 'label' => 'Personnalisation des menus', ]); $this->addField([ 'name' => 'couleurB', @@ -104,9 +108,7 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); - $this->addField([ 'name' => 'subSecondaryColor', 'type' => 'Text', @@ -115,7 +117,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subTextColor', @@ -126,11 +127,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subCrossCircle', @@ -140,13 +139,10 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation des menus'), ]); - $this->addField([ 'name' => 'subSelectColor', 'type' => 'Color', @@ -156,7 +152,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subTextSelectColor', @@ -167,11 +162,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subTextFieldColor', @@ -182,7 +175,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subFieldColor', @@ -193,11 +185,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subStrokeWidth', @@ -207,7 +197,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subStrokeColor', @@ -218,7 +207,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subShade', @@ -229,7 +217,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subRound', @@ -239,11 +226,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subButtonCustom', @@ -253,7 +238,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subButtonBackground', @@ -264,7 +248,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subButtonColor', @@ -275,7 +258,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'subButtonDecoration', @@ -286,12 +268,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), ]); - $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation des menus'), ]); $this->addField([ 'name' => 'popupVideoOverlay', @@ -302,7 +281,11 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des menus'), + ]); + $this->addField([ + 'name' => 'section_search', + 'type' => 'FormSection', + 'label' => 'Personnalisation de la recherche', ]); $this->addField([ 'name' => 'couleurS', @@ -313,7 +296,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la recherche'), ]); $this->addField([ 'name' => 'searchFieldColor', @@ -324,7 +306,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la recherche'), ]); $this->addField([ 'name' => 'searchShadeAlpha', @@ -336,7 +317,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la recherche'), ]); $this->addField([ 'name' => 'searchFieldWidth', @@ -346,11 +326,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la recherche'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la recherche'), ]); $this->addField([ 'name' => 'highlightColor', @@ -361,13 +339,10 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la recherche'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la recherche'), ]); - $this->addField([ 'name' => 'searchIndexNoResultColor', 'type' => 'Color', @@ -377,9 +352,12 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la recherche'), ]); - + $this->addField([ + 'name' => 'section_icones', + 'type' => 'FormSection', + 'label' => 'Personnalisation des icônes', + ]); $this->addField([ 'name' => 'iconSet', 'type' => 'SelectFromArray', @@ -391,9 +369,7 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des icônes'), ]); - $this->addField([ 'name' => 'iconShadeColor', 'type' => 'Color', @@ -403,11 +379,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des icônes'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation des icônes'), ]); $this->addField([ 'name' => 'iconsHMargin', @@ -419,11 +393,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des icônes'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation des icônes'), ]); $this->addField([ 'name' => 'colorizeIcons', @@ -433,7 +405,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des icônes'), ]); $this->addField([ 'name' => 'couleurI', @@ -444,11 +415,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des icônes'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation des icônes'), ]); $this->addField([ 'name' => 'fontKit', @@ -463,7 +432,11 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des icônes'), + ]); + $this->addField([ + 'name' => 'section_book', + 'type' => 'FormSection', + 'label' => 'Personnalisation de la publication', ]); $this->addField([ 'name' => 'pageReflection', @@ -473,7 +446,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'shadeAlpha', @@ -485,11 +457,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'usePageEdges', @@ -499,7 +469,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'pageEdgeOpacity', @@ -511,9 +480,7 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); - $this->addField([ 'name' => 'pageEdgeLeftOffset', 'type' => 'Integer', @@ -524,7 +491,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'pageEdgeRightOffset', @@ -536,7 +502,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'pageEdgeColor', @@ -547,7 +512,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'pageEdgeThickness', @@ -557,11 +521,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'bookShadeColor', @@ -572,11 +534,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'displayPageNumber', @@ -586,7 +546,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'colorPageNumber', @@ -597,11 +556,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'linksColor', @@ -612,7 +569,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'videoBackgroundColor', @@ -623,11 +579,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'tooltipBackColor', @@ -638,7 +592,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'tooltipTextColor', @@ -649,7 +602,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'tooltipTextSize', @@ -659,11 +611,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'bookmarkBackgroundColor', @@ -674,7 +624,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'bookmarkStarDisabledColor', @@ -685,7 +634,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), ]); $this->addField([ 'name' => 'bookmarkStarEnabledColor', @@ -696,7 +644,11 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la publication'), + ]); + $this->addField([ + 'name' => 'section_credits', + 'type' => 'FormSection', + 'label' => 'Personnalisation des crédits', ]); $this->addField([ 'name' => 'creditsColor', @@ -707,7 +659,11 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation des crédits'), + ]); + $this->addField([ + 'name' => 'section_background', + 'type' => 'FormSection', + 'label' => 'Personnalisation du fond', ]); $this->addField([ 'name' => 'transparentBackground', @@ -718,11 +674,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du fond'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation du fond'), ]); $this->addField([ 'name' => 'backgroundColor', @@ -733,11 +687,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du fond'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation du fond'), ]); $this->addField([ 'name' => 'backgroundImage', @@ -746,7 +698,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du fond'), ]); $this->addField([ 'name' => 'repeat', @@ -762,7 +713,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du fond'), ]); $this->addField([ 'name' => 'backgroundHAlign', @@ -777,7 +727,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du fond'), ]); $this->addField([ 'name' => 'backgroundVAlign', @@ -792,11 +741,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du fond'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation du fond'), ]); $this->addField([ 'name' => 'displayBackgroundDuringLoading', @@ -807,7 +754,11 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du fond'), + ]); + $this->addField([ + 'name' => 'section_menubar', + 'type' => 'FormSection', + 'label' => 'Personnalisation de la barre de menu', ]); $this->addField([ 'name' => 'menuHeight', @@ -817,11 +768,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'name' => 'menuColor', @@ -832,11 +781,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'name' => 'menuImage', @@ -845,11 +792,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'name' => 'shadeOnMenu', @@ -859,11 +804,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'name' => 'invertMenuPosition', @@ -873,11 +816,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'name' => 'topBar', @@ -886,7 +827,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'name' => 'topBarAlign', @@ -901,11 +841,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la barre de menu'), ]); $this->addField([ 'name' => 'afterSearch', @@ -915,7 +853,11 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la barre de menu'), + ]); + $this->addField([ + 'name' => 'section_logo', + 'type' => 'FormSection', + 'label' => 'Personnalisation du logo', ]); $this->addField([ 'name' => 'logo', @@ -924,7 +866,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du logo'), ]); $this->addField([ 'name' => 'logoHideWhenOverriden', @@ -934,11 +875,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du logo'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation du logo'), ]); $this->addField([ 'name' => 'favicon', @@ -948,7 +887,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du logo'), ]); $this->addField([ 'name' => 'iosicon', @@ -958,7 +896,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du logo'), ]); $this->addField([ 'name' => 'androidicon', @@ -968,7 +905,11 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du logo'), + ]); + $this->addField([ + 'name' => 'section_loader', + 'type' => 'FormSection', + 'label' => 'Personnalisation du loader', ]); $this->addField([ 'name' => 'loadingBackColor', @@ -979,11 +920,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du loader'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation du loader'), ]); $this->addField([ 'name' => 'couleurL', @@ -994,7 +933,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du loader'), ]); $this->addField([ 'name' => 'loadingSecColor', @@ -1005,7 +943,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du loader'), ]); $this->addField([ 'name' => 'logoLoader', @@ -1014,7 +951,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du loader'), ]); $this->addField([ 'name' => 'loaderPosition', @@ -1024,7 +960,11 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation du loader'), + ]); + $this->addField([ + 'name' => 'section_pagesbar', + 'type' => 'FormSection', + 'label' => 'Personnalisation de la barre des pages', ]); $this->addField([ 'name' => 'pagesBar', @@ -1034,7 +974,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la barre des pages'), ]); $this->addField([ 'name' => 'pageBarThumbBack', @@ -1045,11 +984,9 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la barre des pages'), ]); $this->addField([ 'type' => 'FormSeparator', - 'tab' => __('Personnalisation de la barre des pages'), ]); $this->addField([ 'name' => 'bookmarkColor', @@ -1060,7 +997,6 @@ class FluidbookTheme extends CubistMagicAbstractModel 'fake' => true, 'store_in' => 'settings', 'translatable' => false, - 'tab' => __('Personnalisation de la barre des pages'), ]); } -- 2.39.5