Browse Source

Enable more_buttons_maximized_mode setting

Angel Fernando Quiroz Campos 10 years ago
parent
commit
15a793e09a
35 changed files with 1372 additions and 374 deletions
  1. 7 0
      main/inc/lib/javascript/ckeditor/config_js.php
  2. 5 3
      main/template/default/javascript/editor/ckeditor/config_js.tpl
  3. 53 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/AgendaStudent.php
  4. 41 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Announcements.php
  5. 29 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/AssessmentsIntroduction.php
  6. 68 38
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Basic.php
  7. 38 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Careers.php
  8. 45 9
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Documents.php
  9. 42 12
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/DocumentsStudent.php
  10. 32 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/FAQ.php
  11. 41 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Forum.php
  12. 41 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/ForumStudent.php
  13. 27 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Glossary.php
  14. 28 7
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/LearningPathAuthor.php
  15. 61 12
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/LearningPathDocuments.php
  16. 43 13
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Messages.php
  17. 41 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/NotebookStudent.php
  18. 40 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/PortalNews.php
  19. 41 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Profile.php
  20. 39 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Project.php
  21. 51 12
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/ProjectComment.php
  22. 38 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/ProjectCommentStudent.php
  23. 39 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/ProjectStudent.php
  24. 23 5
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Register.php
  25. 39 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Survey.php
  26. 13 5
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TermsAndConditions.php
  27. 32 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestAnswerFeedback.php
  28. 58 25
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestFreeAnswer.php
  29. 12 19
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestFreeAnswerStrict.php
  30. 46 13
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestProposedAnswer.php
  31. 41 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestQuestionDescription.php
  32. 66 9
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Wiki.php
  33. 75 16
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/WikiStudent.php
  34. 38 11
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/WikiTask.php
  35. 39 10
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Work.php

+ 7 - 0
main/inc/lib/javascript/ckeditor/config_js.php

@@ -3,6 +3,13 @@
 
 require_once '../../../global.inc.php';
 
+$moreButtonsInMaximizedMode = false;
+
+if (api_get_setting('more_buttons_maximized_mode') == 'true') {
+    $moreButtonsInMaximizedMode = true;
+}
+
 $template = new Template();
+$template->assign('moreButtonsInMaximizedMode', $moreButtonsInMaximizedMode);
 $template->display('default/javascript/editor/ckeditor/config_js.tpl');
 

+ 5 - 3
main/template/default/javascript/editor/ckeditor/config_js.tpl

@@ -19,9 +19,11 @@ CKEDITOR.editorConfig = function( config ) {
         '{{ _p.web_main ~ 'inc/lib/elfinder/templates.php'}}'
     ];
 
-    config.toolbar = 'minToolbar';
-    config.smallToolbar = 'minToolbar';
-    config.maximizedToolbar = 'maxToolbar';
+    {% if moreButtonsInMaximizedMode %}
+        config.toolbar = 'minToolbar';
+        config.smallToolbar = 'minToolbar';
+        config.maximizedToolbar = 'maxToolbar';
+    {% endif %}
 
     // File manager (elFinder)
     config.filebrowserBrowseUrl = '{{ _p.web_lib ~ 'elfinder/filemanager.php' }}';

+ 53 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/AgendaStudent.php

@@ -16,17 +16,20 @@ class AgendaStudent extends Basic
 
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter'],
-            ['Format', 'Font', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
-            ['Toolbarswitch']
-        ];
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
 
-        $config['toolbar_maxToolbar'] = [
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -55,8 +58,47 @@ class AgendaStudent extends Basic
             ['PageBreak', 'ShowBlocks'],
             ['Toolbarswitch'],
         ];
+    }
 
-        return $config;
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'SpecialChar'],
+            '/',
+            ['Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            [
+                'JustifyLeft',
+                'JustifyCenter',
+                'JustifyRight',
+                '-',
+                'NumberedList',
+                'BulletedList',
+                '-',
+                'Outdent',
+                'Indent',
+                '-',
+                'TextColor',
+                'BGColor'
+            ],
+            ['ShowBlocks']
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter'],
+            ['Format', 'Font', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 41 - 3
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Announcements.php

@@ -16,7 +16,47 @@ class Announcements extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'SpecialChar'],
+            [
+                'NumberedList',
+                'BulletedList',
+                '-',
+                'Outdent',
+                'Indent',
+                '-',
+                'TextColor',
+                'BGColor',
+                'Source'
+            ],
+            '/',
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            [
+                'JustifyLeft',
+                'JustifyCenter',
+                'JustifyRight'
+            ]
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
             ['NewPage', 'Templates', '-', 'PasteFromWord'],
             ['Undo', 'Redo'],
             ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
@@ -25,8 +65,6 @@ class Announcements extends Basic
             ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
             ['Toolbarswitch']
         ];
-
-        return $config;
     }
 
 }

+ 29 - 3
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/AssessmentsIntroduction.php

@@ -15,7 +15,34 @@ class AssessmentsIntroduction extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Save', 'Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'SpecialChar'],
+            ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor'],
+            '/',
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['Subscript', 'Superscript', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+            ['Source']
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
             ['Undo', 'Redo'],
             ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
@@ -24,7 +51,6 @@ class AssessmentsIntroduction extends Basic
             ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
             ['Toolbarswitch']
         ];
-
-        return $config;
     }
+
 }

+ 68 - 38
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Basic.php

@@ -135,45 +135,11 @@ class Basic extends Toolbar
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
-            ['Toolbarswitch']
-        ];
+        if (api_get_setting('more_buttons_maximized_mode') == 'true') {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
 
-        $config['toolbar_maxToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
-            ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
-            ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
-            ['Link', 'Unlink', 'Anchor', 'Glossary'],
-            [
-                'Image',
-                'Mapping',
-                'Video',
-                'Oembed',
-                'Flash',
-                'Youtube',
-                'Audio',
-                'leaflet',
-                'Smiley',
-                'SpecialChar',
-                'Asciimath',
-                'Asciisvg'
-            ],
-            '/',
-            ['Table', '-', 'CreateDiv'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
-            ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'TextColor', 'BGColor'],
-            [api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
-            ['Styles', 'Format', 'Font', 'FontSize'],
-            ['PageBreak', 'ShowBlocks', 'Source'],
-            ['Toolbarswitch'],
-        ];
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
 
         $config['customConfig'] = api_get_path(WEB_LIBRARY_PATH).'javascript/ckeditor/config_js.php';
 
@@ -214,4 +180,68 @@ class Basic extends Toolbar
         //$config['height'] = '200';
         return $this->config;
     }
+
+    /**
+     * Get the default toolbar configuration when the setting more_buttons_maximized_mode is false
+     * @return array
+     */
+    protected function getNormalToolbar()
+    {
+        return null;
+    }
+
+    /**
+     * Get the small toolbar configuration
+     * @return array
+     */
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
+            ['Toolbarswitch']
+        ];
+    }
+
+    /**
+     * Get the toolbar configuration when CKEditor is maximized
+     * @return array
+     */
+    protected function getMaximizedToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
+            ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
+            ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
+            ['Link', 'Unlink', 'Anchor', 'Glossary'],
+            [
+                'Image',
+                'Mapping',
+                'Video',
+                'Oembed',
+                'Flash',
+                'Youtube',
+                'Audio',
+                'leaflet',
+                'Smiley',
+                'SpecialChar',
+                'Asciimath',
+                'Asciisvg'
+            ],
+            '/',
+            ['Table', '-', 'CreateDiv'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+            ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'TextColor', 'BGColor'],
+            [api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['PageBreak', 'ShowBlocks', 'Source'],
+            ['Toolbarswitch'],
+        ];
+    }
+
 }

+ 38 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Careers.php

@@ -16,16 +16,19 @@ class Careers extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteText'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
-            ['Toolbarswitch', 'ShowBlocks']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -52,8 +55,32 @@ class Careers extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch'],
         ];
+    }
 
-        return $config;
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteText'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
+            ['Maximize']
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteText'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
+            ['Toolbarswitch', 'ShowBlocks']
+        ];
     }
 
 }

+ 45 - 9
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Documents.php

@@ -16,15 +16,11 @@ class Documents extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
-            ['Toolbarswitch', 'ShowBlocks']
-        ];
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+        }
 
         $config['extraPlugins'] = $this->getPluginsToString();
         //$config['mathJaxLib'] = $this->urlGenerator->generate('javascript').'/math_jax/MathJax.js?config=default';
@@ -47,4 +43,44 @@ class Documents extends Basic
         return $plugins;
     }
 
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor', 'Glossary'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio', 'Asciimath', 'Asciisvg'],
+            ['Table', 'SpecialChar'],
+            [
+                'Outdent',
+                'Indent',
+                '-',
+                'TextColor',
+                'BGColor',
+                '-',
+                'NumberedList',
+                'BulletedList',
+                '-',
+                api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : '',
+                'Source'
+            ],
+            '/',
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight']
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
+            ['Toolbarswitch', 'ShowBlocks']
+        ];
+    }
+
 }

+ 42 - 12
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/DocumentsStudent.php

@@ -16,16 +16,21 @@ class DocumentsStudent extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        $config['fullPage'] = true;
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -54,10 +59,35 @@ class DocumentsStudent extends Basic
             ['PageBreak', 'ShowBlocks'],
             ['Toolbarswitch']
         ];
+    }
 
-        $config['fullPage'] = true;
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio', 'Asciimath'],
+            ['Table', 'SpecialChar'],
+            ['Outdent', 'Indent', '-', 'TextColor', 'BGColor', '-', 'OrderedList', 'UnorderedList'],
+            '/',
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight'],
+            ['ShowBlocks']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 32 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/FAQ.php

@@ -16,17 +16,20 @@ class FAQ extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['NewPage', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter'],
-            ['Format', 'Font', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
-            ['Toolbarswitch']
-        ];
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
 
-        $config['toolbar_maxToolbar'] = [
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -53,8 +56,26 @@ class FAQ extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch']
         ];
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Save', 'Preview', 'Source']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['NewPage', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter'],
+            ['Format', 'Font', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 41 - 3
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Forum.php

@@ -13,7 +13,47 @@ class Forum extends Basic
 
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'SpecialChar'],
+            [
+                'NumberedList',
+                'BulletedList',
+                '-',
+                'Outdent',
+                'Indent',
+                '-',
+                'TextColor',
+                'BGColor',
+                'Source'
+            ],
+            '/',
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            [
+                'JustifyLeft',
+                'JustifyCenter',
+                'JustifyRight'
+            ]
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
             ['Undo', 'Redo'],
             ['Link', 'Image', 'Video', 'Oembed', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
@@ -22,8 +62,6 @@ class Forum extends Basic
             ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
             ['Toolbarswitch']
         ];
-
-        return $config;
     }
 
 }

+ 41 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/ForumStudent.php

@@ -13,17 +13,20 @@ class ForumStudent extends Basic
 
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Oembed', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
-            ['Toolbarswitch']
-        ];
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
 
-        $config['toolbar_maxToolbar'] = [
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -52,8 +55,35 @@ class ForumStudent extends Basic
             ['PageBreak', 'ShowBlocks'],
             ['Toolbarswitch'],
         ];
+    }
 
-        return $config;
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'SpecialChar'],
+            ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor'],
+            '/',
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight'],
+            ['ShowBlocks']
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Oembed', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 27 - 3
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Glossary.php

@@ -16,7 +16,33 @@ class Glossary extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image'],
+            ['Table', 'SpecialChar'],
+            ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor', '-', 'Source'],
+            '/',
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight']
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', 'NewPage', '-', 'PasteFromWord'],
             ['Undo', 'Redo'],
             ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
@@ -25,8 +51,6 @@ class Glossary extends Basic
             ['Format', 'Font', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
             ['Toolbarswitch']
         ];
-
-        return $config;
     }
 
 }

+ 28 - 7
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/LearningPathAuthor.php

@@ -16,18 +16,39 @@ class LearningPathAuthor extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Link', 'Unlink', 'Bold', 'Italic', 'TextColor', 'BGColor', 'Source'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        $config['fullPage'] = true;
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch']
         ];
+    }
 
-        $config['fullPage'] = true;
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Link', 'Unlink', 'Bold', 'Italic', 'TextColor', 'BGColor', 'Source']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Link', 'Unlink', 'Bold', 'Italic', 'TextColor', 'BGColor', 'Source'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 61 - 12
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/LearningPathDocuments.php

@@ -16,16 +16,21 @@ class LearningPathDocuments extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Youtube', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        $config['fullPage'] = true;
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -54,10 +59,54 @@ class LearningPathDocuments extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch']
         ];
+    }
 
-        $config['fullPage'] = true;
+    protected function getNormalToolbar()
+    {
+        return [
+            ['PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor', 'Glossary'],
+            [
+                'Image',
+                'Video',
+                'Flash',
+                'Oembed',
+                'Youtube',
+                'Audio',
+                'Asciimath',
+                'Asciisvg',
+                'Table',
+                'SpecialChar'
+            ],
+            [
+                'Outdent',
+                'Indent',
+                'TextColor',
+                'BGColor',
+                '-',
+                'NumberedList',
+                'BulletedList',
+                'JustifyLeft',
+                'JustifyCenter',
+                'JustifyRight'
+            ],
+            '/',
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline', '-', 'Source']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Youtube', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 43 - 13
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Messages.php

@@ -15,16 +15,22 @@ class Messages extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['NewPage', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter'],
-            ['Format', 'Font', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        $config['fullPage'] = true;
+        //$config['height'] = '200';
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -54,10 +60,34 @@ class Messages extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch']
         ];
+    }
 
-        $config['fullPage'] = true;
-        //$config['height'] = '200';
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Link', 'Unlink'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'Smiley'],
+            ['TextColor', 'BGColor'],
+            ['Source'],
+            '/',
+            ['Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', '-', 'NumberedList', 'BulletedList']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['NewPage', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter'],
+            ['Format', 'Font', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            ['Toolbarswitch']
+        ];
     }
+
 }

+ 41 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/NotebookStudent.php

@@ -13,16 +13,19 @@ class NotebookStudent extends Basic
 
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -51,8 +54,35 @@ class NotebookStudent extends Basic
             ['PageBreak', 'ShowBlocks'],
             ['Toolbarswitch']
         ];
+    }
 
-        return $config;
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'SpecialChar'],
+            ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor'],
+            '/',
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight'],
+            ['ShowBlocks']
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 40 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/PortalNews.php

@@ -13,16 +13,19 @@ class PortalNews extends Basic
 
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -52,8 +55,34 @@ class PortalNews extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch']
         ];
+    }
 
-        return $config;
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Save', 'Maximize', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'SpecialChar'],
+            ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor', '-', 'Source'],
+            '/',
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight']
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
+            ['NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 41 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Profile.php

@@ -15,16 +15,19 @@ class Profile extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
-            ['Format', 'Font', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -51,7 +54,34 @@ class Profile extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch']
         ];
+    }
 
-        return $config;
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'Smiley'],
+            '/',
+            ['Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', '-', 'NumberedList', 'BulletedList', '-', 'TextColor', 'BGColor'],
+            ['Source']
+        ];
     }
+
+    protected function getSmallToolbar()
+    {
+        return [
+            ['NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
+            ['Format', 'Font', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            ['Toolbarswitch']
+        ];
+    }
+
 }

+ 39 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Project.php

@@ -12,16 +12,19 @@ class Project extends Basic
 {
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'TextColor', 'BGColor', 'Source'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -49,8 +52,33 @@ class Project extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch']
         ];
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'leaflet'],
+            ['Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', '-', 'NumberedList', 'BulletedList', '-', 'TextColor', 'BGColor'],
+            ['Source']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'TextColor', 'BGColor', 'Source'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 51 - 12
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/ProjectComment.php

@@ -12,21 +12,36 @@ class ProjectComment extends Basic
 {
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'TextColor'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
             ['Link', 'Unlink', 'Anchor', 'Glossary'],
-            ['Image', 'Mapping', 'Video', 'Oembed', 'Youtube', 'Flash', 'Audio', 'leaflet', 'Smiley', 'SpecialChar',  'Asciimath'],
+            [
+                'Image',
+                'Mapping',
+                'Video',
+                'Oembed',
+                'Youtube',
+                'Flash',
+                'Audio',
+                'leaflet',
+                'Smiley',
+                'SpecialChar',
+                'Asciimath'
+            ],
             '/',
             ['Table', '-', 'CreateDiv'],
             ['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'],
@@ -37,8 +52,32 @@ class ProjectComment extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch']
         ];
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'leaflet'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', '-', 'NumberedList', 'BulletedList', '-', 'TextColor', 'BGColor'],
+            ['Source']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'TextColor'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 38 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/ProjectCommentStudent.php

@@ -12,16 +12,19 @@ class ProjectCommentStudent extends Basic
 {
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'TextColor'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -49,8 +52,32 @@ class ProjectCommentStudent extends Basic
             ['PageBreak', 'ShowBlocks'],
             ['Toolbarswitch']
         ];
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'leaflet'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', '-', 'NumberedList', 'BulletedList', '-', 'TextColor', 'BGColor'],
+            ['ShowBlocks']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'TextColor'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 39 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/ProjectStudent.php

@@ -12,16 +12,19 @@ class ProjectStudent extends Basic
 {
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'TextColor'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -49,8 +52,33 @@ class ProjectStudent extends Basic
             ['PageBreak', 'ShowBlocks'],
             ['Toolbarswitch']
         ];
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'leaflet'],
+            ['Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', '-', 'NumberedList', 'BulletedList', '-', 'TextColor', 'BGColor'],
+            ['Source']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'TextColor'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 23 - 5
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Register.php

@@ -16,16 +16,34 @@ class Register extends Basic
 
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Toolbarswitch', 'PasteFromWord', '-', 'Undo', 'Redo'],
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getSmallToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
             ['Font', 'FontSize'],
             ['Bold', 'Italic', 'Underline'],
             ['JustifyLeft', 'JustifyCenter', '-', 'NumberedList', 'BulletedList', '-', 'TextColor', 'BGColor']
         ];
+    }
 
-        $config['toolbar_maxToolbar'] = $config['toolbar_minToolbar'];
-
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Toolbarswitch', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', '-', 'NumberedList', 'BulletedList', '-', 'TextColor', 'BGColor']
+        ];
     }
 
 }

+ 39 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Survey.php

@@ -13,16 +13,19 @@ class Survey extends Basic
 
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
-            ['Format', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -51,8 +54,33 @@ class Survey extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch']
         ];
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Maximize'],
+            ['Link', 'Unlink'],
+            ['Image'],
+            ['Table'],
+            ['FontSize'],
+            ['Bold', 'Italic'],
+            ['NumberedList', 'BulletedList', '-', 'TextColor'],
+            ['Source']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
+            ['Format', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 13 - 5
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TermsAndConditions.php

@@ -13,15 +13,23 @@ class TermsAndConditions extends Basic
 
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getNormalToolbar();
+            $config['toolbar_maxToolbar'] = $this->getNormalToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
             ['Styles', 'Format', 'Font', 'FontSize'],
             ['Bold', 'Italic', 'Underline'],
             ['JustifyLeft', 'JustifyCenter', 'JustifyRight']
         ];
-
-        $config['toolbar_maxToolbar'] = $config['toolbar_minToolbar'];
-
-        return $config;
     }
 
 }

+ 32 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestAnswerFeedback.php

@@ -13,17 +13,20 @@ class TestAnswerFeedback extends Basic
 
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
-            ['Toolbarswitch']
-        ];
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
 
-        $config['toolbar_maxToolbar'] = [
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -39,8 +42,26 @@ class TestAnswerFeedback extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch']
         ];
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Link', 'Unlink', 'Bold', 'Italic', 'TextColor', 'BGColor']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 58 - 25
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestFreeAnswer.php

@@ -15,31 +15,12 @@ class TestFreeAnswer extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['NewPage', 'Templates', '-', 'PasteText'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
-            ['NewPage', 'Templates', '-', 'Preview', 'Print'],
-            ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
-            ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
-            ['Link', 'Unlink', 'Anchor', 'Glossary'],
-            ['Image', 'Mapping', 'Video', 'Oembed', 'Youtube', 'Flash', 'Audio', 'leaflet', 'Smiley', 'SpecialChar',  'Asciimath', ],
-            '/',
-            ['Table', '-', 'CreateDiv'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
-            ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'TextColor', 'BGColor'],
-            [api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
-            ['Styles', 'Format', 'Font', 'FontSize'],
-            ['PageBreak', 'ShowBlocks'],
-            ['Toolbarswitch']
-        ];
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
 
         $config['fullPage'] = false;
 
@@ -60,4 +41,56 @@ class TestFreeAnswer extends Basic
 
         return $config;
     }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
+            ['NewPage', 'Templates', '-', 'Preview', 'Print'],
+            ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
+            ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
+            ['Link', 'Unlink', 'Anchor', 'Glossary'],
+            ['Image', 'Mapping', 'Video', 'Oembed', 'Youtube', 'Flash', 'Audio', 'leaflet', 'Smiley', 'SpecialChar', 'Asciimath',],
+            '/',
+            ['Table', '-', 'CreateDiv'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule', '-', 'Outdent', 'Indent', 'Blockquote'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+            ['Bold', 'Italic', 'Underline', 'Strike', '-', 'Subscript', 'Superscript', '-', 'TextColor', 'BGColor'],
+            [api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : ''],
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['PageBreak', 'ShowBlocks'],
+            ['Toolbarswitch']
+        ];
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            [
+                'Maximize',
+                'Bold',
+                'Image',
+                'Link',
+                'PasteFromWord',
+                'Audio',
+                'Table',
+                'Subscript',
+                'Superscript',
+                'ShowBlocks'
+            ]
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
+            ['NewPage', 'Templates', '-', 'PasteText'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            ['Toolbarswitch']
+        ];
+    }
+
 }

+ 12 - 19
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestFreeAnswerStrict.php

@@ -15,25 +15,12 @@ class TestFreeAnswerStrict extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [];
-        $config['toolbar_maxToolbar'] = [];
-        $config['toolbarGroups'] = array(
-//            array('name' => 'document',  'groups' =>array('mode', 'document', 'doctools')),
-//            array('name' => 'clipboard',    'groups' =>array('clipboard', 'undo', )),
-            //array('name' => 'editing',    'groups' =>array('clipboard', 'undo', )),
-            //array('name' => 'forms',    'groups' =>array('clipboard', 'undo', )),
-            /* '/',
-              array('name' => 'basicstyles',    'groups' =>array('basicstyles', 'cleanup', )),
-              array('name' => 'paragraph',    'groups' =>array('list', 'indent', 'blocks', 'align' )),
-              array('name' => 'links'),
-              array('name' => 'insert'),
-              '/',
-              array('name' => 'styles'),
-              array('name' => 'colors'),
-              array('name' => 'tools'),
-              array('name' => 'others'),
-              array('name' => 'mode') */
-        );
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getNormalToolbar();
+            $config['toolbar_maxToolbar'] = $this->getNormalToolbar();
+        }
 
         $config['fullPage'] = false;
 
@@ -54,4 +41,10 @@ class TestFreeAnswerStrict extends Basic
         //$config['height'] = '200';
         return $config;
     }
+
+    protected function getNormalToolbar()
+    {
+        return [];
+    }
+
 }

+ 46 - 13
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestProposedAnswer.php

@@ -15,17 +15,23 @@ class TestProposedAnswer extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Templates'],
-            ['PasteFromWord'],
-            ['Link'],
-            ['Image', 'Video', 'Flash', 'Audio', 'Asciimath', 'Asciisvg'],
-            ['Table'],
-            ['Bold'],
-            ['Source', 'Toolbarswitch']
-        ];
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
 
-        $config['toolbar_maxToolbar'] = [
+        $config['toolbarCanCollapse'] = true;
+        $config['toolbarStartupExpanded'] = false;
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -54,10 +60,37 @@ class TestProposedAnswer extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch'],
         ];
+    }
 
-        $config['toolbarCanCollapse'] = true;
-        $config['toolbarStartupExpanded'] = false;
+    protected function getNormalToolbar()
+    {
+        return [
+            [
+                'Maximize',
+                'Bold',
+                'Image',
+                'Link',
+                'PasteFromWord',
+                'Audio',
+                'Table',
+                'Subscript',
+                'Superscript',
+                'Source'
+            ]
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Templates'],
+            ['PasteFromWord'],
+            ['Link'],
+            ['Image', 'Video', 'Flash', 'Audio', 'Asciimath', 'Asciisvg'],
+            ['Table'],
+            ['Bold'],
+            ['Source', 'Toolbarswitch']
+        ];
     }
+
 }

+ 41 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/TestQuestionDescription.php

@@ -14,17 +14,20 @@ class TestQuestionDescription extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Unlink', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
-            ['Source', 'Toolbarswitch']
-        ];
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
 
-        $config['toolbar_maxToolbar'] = [
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -53,7 +56,34 @@ class TestQuestionDescription extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch'],
         ];
+    }
 
-        return $config;
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'SpecialChar'],
+            ['NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', '-', 'TextColor', 'BGColor', '-', 'Source'],
+            '/',
+            ['Styles', 'Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight']
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
+            ['NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Unlink', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            ['Source', 'Toolbarswitch']
+        ];
     }
+
 }

+ 66 - 9
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Wiki.php

@@ -13,15 +13,11 @@ class Wiki extends Basic
 
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteText'],
-            ['Undo', 'Redo'],
-            ['Wikilink', 'Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
-            ['Toolbarswitch']
-        ];
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+        }
 
         $config['forcePasteAsPlainText'] = false;
 
@@ -32,4 +28,65 @@ class Wiki extends Basic
         return $config;
     }
 
+    protected function getNormalToolbar()
+    {
+        return [
+            [
+                'Maximize',
+                'Save',
+                'NewPage',
+                'Templates',
+                'PageBreak',
+                'Preview',
+                '-',
+                'PasteText',
+                '-',
+                'Undo',
+                'Redo',
+                '-',
+                'SelectAll',
+                '-',
+                'Find'
+            ],
+            ['Wikilink','Link','Unlink','Anchor'],
+            ['Image','Video','Flash','Oembed','Youtube','Audio','Asciimath'],
+            ['Table','HorizontalRule','Smiley','SpecialChar','leaflet'],
+            ['Format','Font','FontSize'],
+            ['Bold','Italic','Underline'],
+            [
+                'Subscript',
+                'Superscript',
+                '-',
+                'JustifyLeft',
+                'JustifyCenter',
+                'JustifyRight',
+                'JustifyFull',
+                '-',
+                'NumberedList',
+                'BulletedList',
+                '-',
+                'Outdent',
+                'Indent',
+                '-',
+                'TextColor',
+                'BGColor',
+                api_get_setting('allow_spellcheck') == 'true' ? 'Scayt' : '',
+            ],
+            ['Source']
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteText'],
+            ['Undo', 'Redo'],
+            ['Wikilink', 'Link', 'Image', 'Video', 'Flash', 'Audio', 'Table',  'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor', 'Source'],
+            ['Toolbarswitch']
+        ];
+    }
+
 }

+ 75 - 16
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/WikiStudent.php

@@ -13,16 +13,25 @@ class WikiStudent extends Basic
 
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['Save', 'NewPage', 'Templates', '-', 'PasteText'],
-            ['Undo', 'Redo'],
-            ['Wikilink', 'Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        $config['forcePasteAsPlainText'] = false;
+
+        if (api_get_setting('force_wiki_paste_as_plain_text') == 'true') {
+            $config['forcePasteAsPlainText'] = true;
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -51,14 +60,64 @@ class WikiStudent extends Basic
             ['PageBreak', 'ShowBlocks'],
             ['Toolbarswitch']
         ];
+    }
 
-        $config['forcePasteAsPlainText'] = false;
-
-        if (api_get_setting('force_wiki_paste_as_plain_text') == 'true') {
-            $config['forcePasteAsPlainText'] = true;
-        }
+    protected function getNormalToolbar()
+    {
+        return [
+            [
+                'Maximize',
+                'Save',
+                'NewPage',
+                'PageBreak',
+                'Preview',
+                '-',
+                'PasteText',
+                '-',
+                'Undo',
+                'Redo',
+                '-',
+                'SelectAll',
+                '-',
+                'Find'
+            ],
+            ['Wikilink', 'Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio', 'Asciimath'],
+            ['Table', 'HorizontalRule', 'Smiley', 'SpecialChar', 'leaflet'],
+            ['Format', 'Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            [
+                'Subscript',
+                'Superscript',
+                '-',
+                'JustifyLeft',
+                'JustifyCenter',
+                'JustifyRight',
+                '-',
+                'NumberedList',
+                'BulletedList',
+                '-',
+                'Outdent',
+                'Indent',
+                '-',
+                'TextColor',
+                'BGColor'
+            ],
+            ['ShowBlocks']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['Save', 'NewPage', 'Templates', '-', 'PasteText'],
+            ['Undo', 'Redo'],
+            ['Wikilink', 'Link', 'Image', 'Video', 'Flash', 'Audio', 'Table', 'Asciimath', 'Asciisvg'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 38 - 11
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/WikiTask.php

@@ -13,16 +13,19 @@ class WikiTask extends Basic
 
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table'],
-            ['BulletedList', 'NumberedList', 'HorizontalRule'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
-            ['Toolbarswitch']
-        ];
-        $config['toolbar_maxToolbar'] = [
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -49,8 +52,32 @@ class WikiTask extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch']
         ];
+    }
+
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Maximize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', '-', 'NumberedList', 'BulletedList', '-', 'TextColor', 'BGColor'],
+            ['Source']
+        ];
+    }
 
-        return $config;
+    protected function getSmallToolbar()
+    {
+        return [
+            ['NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Audio', 'Table'],
+            ['BulletedList', 'NumberedList', 'HorizontalRule'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'Underline', 'TextColor', 'BGColor'],
+            ['Toolbarswitch']
+        ];
     }
 
 }

+ 39 - 10
src/Chamilo/CoreBundle/Component/Editor/CkEditor/Toolbar/Work.php

@@ -19,16 +19,20 @@ class Work extends Basic
      */
     public function getConfig()
     {
-        $config['toolbar_minToolbar'] = [
-            ['NewPage', 'Templates', '-', 'PasteFromWord'],
-            ['Undo', 'Redo'],
-            ['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath'],
-            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
-            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'TextColor', 'BGColor'],
-            ['Toolbarswitch']
-        ];
+        if (api_get_setting('more_buttons_maximized_mode') != 'true') {
+            $config['toolbar'] = $this->getNormalToolbar();
+        } else {
+            $config['toolbar_minToolbar'] = $this->getSmallToolbar();
 
-        $config['toolbar_maxToolbar'] = [
+            $config['toolbar_maxToolbar'] = $this->getMaximizedToolbar();
+        }
+
+        return $config;
+    }
+
+    protected function getMaximizedToolbar()
+    {
+        return [
             ['Save', 'NewPage', 'Templates', '-', 'Preview', 'Print'],
             ['Cut', 'Copy', 'Paste', 'PasteText', 'PasteFromWord'],
             ['Undo', 'Redo', '-', 'SelectAll', 'Find', '-', 'RemoveFormat'],
@@ -56,8 +60,33 @@ class Work extends Basic
             ['PageBreak', 'ShowBlocks', 'Source'],
             ['Toolbarswitch'],
         ];
+    }
 
-        return $config;
+    protected function getNormalToolbar()
+    {
+        return [
+            ['Maxmize', '-', 'PasteFromWord', '-', 'Undo', 'Redo'],
+            ['Link', 'Unlink', 'Anchor'],
+            ['Image', 'Video', 'Flash', 'Oembed', 'Youtube', 'Audio'],
+            ['Table', 'Smiley'],
+            '/',
+            ['Font', 'FontSize'],
+            ['Bold', 'Italic', 'Underline'],
+            ['JustifyLeft', 'JustifyCenter', '-', 'NumberedList', 'BulletedList', '-', 'TextColor', 'BGColor'],
+            ['Source']
+        ];
+    }
+
+    protected function getSmallToolbar()
+    {
+        return [
+            ['NewPage', 'Templates', '-', 'PasteFromWord'],
+            ['Undo', 'Redo'],
+            ['Link', 'Image', 'Video', 'Flash', 'Youtube', 'Audio', 'Table', 'Asciimath'],
+            ['JustifyLeft', 'JustifyCenter', 'JustifyBlock'],
+            ['Format', 'Font', 'FontSize', 'Bold', 'Italic', 'TextColor', 'BGColor'],
+            ['Toolbarswitch']
+        ];
     }
 
 }