From 2c638cafb1dd433bb051d9569865a295c988934a Mon Sep 17 00:00:00 2001 From: Julio Montoya Date: Thu, 25 Sep 2014 11:41:12 +0200 Subject: [PATCH] Adding chamilo themes --- composer.json | 12 ++--- .../Resources/views/layout.html.twig | 47 ++++++++++++++----- .../Settings/PlatformSettingsSchema.php | 2 + 3 files changed, 44 insertions(+), 17 deletions(-) diff --git a/composer.json b/composer.json index 9c12426a9d..15cb81e43c 100755 --- a/composer.json +++ b/composer.json @@ -39,15 +39,14 @@ } } }, - { - "type": "vcs", - "url": "https://github.com/jmontoyaa/AdminThemeBundle" - }, { "type": "vcs", "url": "https://github.com/jmontoyaa/MigrationBundle.git" } ], + + "minimum-stability": "stable", + "require": { "php": ">=5.3.3", @@ -63,7 +62,7 @@ "twig/twig": "~1.12", "twig/extensions": "~1.0", - "symfony/symfony": "~2.3", + "symfony/symfony": "~2.5", "symfony/assetic-bundle": "~2.3", "symfony/swiftmailer-bundle": "~2.3", "symfony/monolog-bundle": "~2.3", @@ -151,7 +150,8 @@ "sylius/flow-bundle": "0.11.*@dev", "sylius/settings-bundle": "dev-master", "sp/bower-bundle": "dev-master", - "jmontoyaa/migration-bundle":"dev-master" + "jmontoyaa/migration-bundle":"dev-master", + "thrace/datagrid-bundle":"dev-master" }, "require-dev": { "akeneo/crowdin-api": "1.0.*@dev", diff --git a/src/Chamilo/CoreBundle/Resources/views/layout.html.twig b/src/Chamilo/CoreBundle/Resources/views/layout.html.twig index 6ae7b54105..b982858a4e 100644 --- a/src/Chamilo/CoreBundle/Resources/views/layout.html.twig +++ b/src/Chamilo/CoreBundle/Resources/views/layout.html.twig @@ -5,7 +5,9 @@ {% endblock %} {% block avanzu_logo %} + {% endblock %} {% block page_title %} @@ -22,7 +24,6 @@ {{ mopa_bootstrap_menu('ChamiloCoreBundle:SimpleMenuBuilder:mainMenu', {'automenu': 'pills', 'stacked':true}) }} {% endif %} {% if is_granted('IS_AUTHENTICATED_FULLY') == false %} -
- {{ mopa_bootstrap_menu('ChamiloCoreBundle:SimpleMenuBuilder:loginMenu', {'automenu': 'pills', 'stacked':true}) }} {% endif %} {#{{ mopa_bootstrap_menu('ChamiloCoreBundle:SimpleMenuBuilder:helpMenu', {'automenu': 'pills', 'stacked':true}) }}#} {% endblock %} {% block stylesheets %} - {{ parent() }} - + {# Chamilo base #} + + {# Base theme #} + {% stylesheets '@admin_lte_all_css' filter="cssrewrite" %} + + {% endstylesheets %} + + {% set theme = chamilo_settings_get('platform.theme') %} + + {##} + + {##} + + + + + + {# Chamilo #} + {# Sonata #} + {% block sonata_page_stylesheets %} {% block page_stylesheets %} {# Deprecated block #} {% for stylesheet in sonata_page.assets.stylesheets %} @@ -58,12 +76,11 @@ {% endblock %} {% endblock %} -{% block javascripts %} -{% endblock %} - {% block javascripts_head %} - - {% javascripts '@admin_lte_all' %} + {% javascripts + '@jqgrid_js' + "@admin_lte_all" + %} {% endjavascripts %} @@ -71,6 +88,7 @@ {% endjavascripts %} + {# Chamilo #} @@ -78,6 +96,10 @@ {% endjavascripts %} + {# Sonata #} + + + {% block sonata_page_javascripts %} {% block page_javascripts %} {# Deprecated block #} {% for js in sonata_page.assets.javascripts %} @@ -85,11 +107,14 @@ {% endfor %} {% endblock %} {% endblock %} - {{ sonata_seo_title() }} {{ sonata_seo_metadatas() }} {% endblock %} +{#Blocking extra javascript calls#} +{% block javascripts %} +{% endblock %} + {% block page_breadcrumb %} {% block sonata_page_breadcrumb %} {% if sonata_seo_context is not defined %} @@ -100,7 +125,7 @@ {% endblock %} {% block page_content %} - + {# Flash messages #} {% include 'SonataCoreBundle:FlashMessage:render.html.twig' %} {% if page is defined %} diff --git a/src/Chamilo/CoreBundle/Settings/PlatformSettingsSchema.php b/src/Chamilo/CoreBundle/Settings/PlatformSettingsSchema.php index 6f1f47d42c..88ba2c9571 100644 --- a/src/Chamilo/CoreBundle/Settings/PlatformSettingsSchema.php +++ b/src/Chamilo/CoreBundle/Settings/PlatformSettingsSchema.php @@ -28,6 +28,7 @@ class PlatformSettingsSchema implements SchemaInterface 'administrator_surname' => 'Doe', 'administrator_phone' => '123456', 'timezone' => 'Europe/Paris', + 'theme' => 'chamilo' )) ->setAllowedTypes(array( 'institution' => array('string'), @@ -56,6 +57,7 @@ class PlatformSettingsSchema implements SchemaInterface ->add('administrator_surname') ->add('administrator_phone') ->add('timezone', 'timezone') + ->add('theme') ; } }