Browse Source

Fix unify templates layouts legacy + Symfony2 based

jmontoyaa 8 years ago
parent
commit
a635927080
52 changed files with 435 additions and 618 deletions
  1. 1 1
      app/Resources/themes/phone/layout.html.twig
  2. 3 3
      src/Chamilo/CoreBundle/Component/Editor/CkEditor/CkEditor.php
  3. 1 1
      src/Chamilo/CoreBundle/Resources/views/Admin/Settings/default.html.twig
  4. 1 1
      src/Chamilo/CoreBundle/Resources/views/Admin/Settings/index.html.twig
  5. 1 1
      src/Chamilo/CoreBundle/Resources/views/Index/index.html.twig
  6. 1 1
      src/Chamilo/CoreBundle/Resources/views/Index/userportal.html.twig
  7. 4 4
      src/Chamilo/CoreBundle/Resources/views/default/auth/inscription.html.twig
  8. 1 1
      src/Chamilo/CoreBundle/Resources/views/default/javascript/editor/ckeditor/elfinder.html.twig
  9. 0 16
      src/Chamilo/CoreBundle/Resources/views/default/layout/blank.html.twig
  10. 0 5
      src/Chamilo/CoreBundle/Resources/views/default/layout/error.html.twig
  11. 0 83
      src/Chamilo/CoreBundle/Resources/views/default/layout/footer.html.twig
  12. 0 105
      src/Chamilo/CoreBundle/Resources/views/default/layout/footer.js.html.twig
  13. 2 26
      src/Chamilo/CoreBundle/Resources/views/default/layout/head.html.twig
  14. 0 40
      src/Chamilo/CoreBundle/Resources/views/default/layout/layout_1_col.html.twig
  15. 11 38
      src/Chamilo/CoreBundle/Resources/views/default/layout/layout_2_col.html.twig
  16. 0 5
      src/Chamilo/CoreBundle/Resources/views/default/layout/no_layout.html.twig
  17. 0 16
      src/Chamilo/CoreBundle/Resources/views/default/layout/page.html.twig
  18. 1 0
      src/Chamilo/CoreBundle/Resources/views/default/layout/page_body.html.twig
  19. 1 1
      src/Chamilo/CoreBundle/Resources/views/default/social/add_groups.html.twig
  20. 1 1
      src/Chamilo/CoreBundle/Resources/views/default/social/edit_profile.html.twig
  21. 1 7
      src/Chamilo/CoreBundle/Resources/views/default/social/friends.html.twig
  22. 1 1
      src/Chamilo/CoreBundle/Resources/views/default/social/group_view.html.twig
  23. 1 1
      src/Chamilo/CoreBundle/Resources/views/default/social/group_waiting_list.html.twig
  24. 1 1
      src/Chamilo/CoreBundle/Resources/views/default/social/groups.html.twig
  25. 1 1
      src/Chamilo/CoreBundle/Resources/views/default/social/groups_topics.html.twig
  26. 1 3
      src/Chamilo/CoreBundle/Resources/views/default/social/home.html.twig
  27. 1 1
      src/Chamilo/CoreBundle/Resources/views/default/social/inbox.html.twig
  28. 1 1
      src/Chamilo/CoreBundle/Resources/views/default/social/invitations.html.twig
  29. 2 2
      src/Chamilo/CoreBundle/Resources/views/default/social/myfiles.html.twig
  30. 2 2
      src/Chamilo/CoreBundle/Resources/views/default/social/profile.html.twig
  31. 1 1
      src/Chamilo/CoreBundle/Resources/views/default/social/search.html.twig
  32. 1 1
      src/Chamilo/CoreBundle/Resources/views/default/social/whoisonline.html.twig
  33. 0 36
      src/Chamilo/CoreBundle/Resources/views/layout_one_col.html.twig
  34. 0 19
      src/Chamilo/CoreBundle/Resources/views/layout_one_col_no_content.html.twig
  35. 1 1
      src/Chamilo/CourseBundle/Resources/views/CToolIntro/create.html.twig
  36. 1 1
      src/Chamilo/CourseBundle/Resources/views/CToolIntro/grid.html.twig
  37. 1 1
      src/Chamilo/CourseBundle/Resources/views/Home/add.html.twig
  38. 1 1
      src/Chamilo/CourseBundle/Resources/views/Home/index.html.twig
  39. 1 1
      src/Chamilo/CourseBundle/Resources/views/Home/list.html.twig
  40. 142 143
      src/Chamilo/ThemeBundle/Resources/views/Layout/base-layout.html.twig
  41. 9 6
      src/Chamilo/ThemeBundle/Resources/views/Layout/footer.html.twig
  42. 22 15
      src/Chamilo/ThemeBundle/Resources/views/Layout/footer.js.twig
  43. 1 0
      src/Chamilo/ThemeBundle/Resources/views/Layout/form-theme.html.twig
  44. 88 19
      src/Chamilo/ThemeBundle/Resources/views/Layout/header.js.twig
  45. 0 0
      src/Chamilo/ThemeBundle/Resources/views/Layout/layout_cms.html.twig
  46. 1 0
      src/Chamilo/ThemeBundle/Resources/views/Layout/layout_empty.html.twig
  47. 0 0
      src/Chamilo/ThemeBundle/Resources/views/Layout/layout_grid.html.twig
  48. 76 0
      src/Chamilo/ThemeBundle/Resources/views/Layout/layout_one_col.html.twig
  49. 1 3
      src/Chamilo/ThemeBundle/Resources/views/Layout/layout_one_col_no_content.html.twig
  50. 36 0
      src/Chamilo/ThemeBundle/Resources/views/Layout/layout_two_col.html.twig
  51. 10 0
      src/Chamilo/ThemeBundle/Resources/views/Layout/no_layout.html.twig
  52. 1 1
      src/Chamilo/UserBundle/Resources/views/Profile/action.html.twig

+ 1 - 1
app/Resources/themes/phone/layout.html.twig

@@ -1,4 +1,4 @@
 {% extends "@ChamiloTheme/Layout/base-layout.html.twig" %}
 {% block title %}
-    {{- chamilo_settings_get('platform.site_name') -}} - Phone theme
+{{- chamilo_settings_get('platform.site_name') -}} - Phone theme
 {% endblock %}

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

@@ -56,11 +56,11 @@ class CkEditor extends Editor
         if (trim($this->value) == '<html><head><title></title></head><body></body></html>' || $this->value == '' ) {
             $cssFile = api_get_path(SYS_CSS_PATH).'themes/'.api_get_visual_theme().'/editor.css';
             if (!is_file($cssFile)) {
-                $cssFile = api_get_path(WEB_CSS_PATH).'editor.css';
+                $cssFile = api_get_css('css/editor.css');
             } else {
-                $cssFile = api_get_path(WEB_CSS_PATH).'themes/'.api_get_visual_theme().'/editor.css';
+                $cssFile = api_get_css('css/themes/'.api_get_visual_theme().'/editor.css');
             }
-            $style = '<link href="'.$cssFile.'" rel="stylesheet" media="screen" type="text/css" />';
+            $style = $cssFile;
         }
 
         $html = '<textarea id="'.$this->getName().'" name="'.$this->getName().'" class="ckeditor">

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/Admin/Settings/default.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 {% from 'SyliusResourceBundle:Macros:actions.html.twig' import update %}
 
 {% set namespace = app.request.get('namespace') %}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/Admin/Settings/index.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block page_title %}
     {{ 'Settings' | trans }}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/Index/index.html.twig

@@ -1,4 +1,4 @@
-{% extends "ChamiloCoreBundle::layout_two_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_two_col.html.twig" %}
 
 {% block chamilo_right_column %}
     {% autoescape false %}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/Index/userportal.html.twig

@@ -1,4 +1,4 @@
-{% extends "ChamiloCoreBundle::layout_two_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_two_col.html.twig" %}
 
 {% block chamilo_right_column %}
     {% autoescape false %}

+ 4 - 4
src/Chamilo/CoreBundle/Resources/views/default/auth/inscription.html.twig

@@ -1,14 +1,14 @@
 {%
     extends hide_header == true
-    ? template ~ "/layout/blank.tpl"
-    : template ~ "/layout/layout_1_col.tpl"
+    ? '@ChamiloTheme/Layout/no_layout.html.twig'
+    : '@ChamiloTheme/Layout/layout_one_col.html.twig'
 %}
 
 {% block content %}
-
+{% autoescape false %}
 {{ inscription_header }}
 {{ inscription_content }}
 {{ form }}
 {{ text_after_registration }}
-
+{% endautoescape %}
 {% endblock %}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/default/javascript/editor/ckeditor/elfinder.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_empty.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_empty.html.twig" %}
 
 {% block content %}
     {% include '@ChamiloCore/default/javascript/editor/elfinder_standalone.html.twig' %}

+ 0 - 16
src/Chamilo/CoreBundle/Resources/views/default/layout/blank.html.twig

@@ -1,16 +0,0 @@
-<!DOCTYPE html>
-<!--[if lt IE 7]> <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
-<!--[if IE 7]>    <html lang="{{document_language}}" class="no-js lt-ie9 lt-ie8"> <![endif]-->
-<!--[if IE 8]>    <html lang="{{document_language}}" class="no-js lt-ie9"> <![endif]-->
-<!--[if gt IE 8]><!--><html lang="{{document_language}}" class="no-js"> <!--<![endif]-->
-<head>
-{% include template ~ "/layout/head.tpl" %}
-</head>
-<body dir="{{text_direction}}" class="{{section_name}}">
-    <div class="page-blank">
-        {% block content %}
-            {{ content }}
-        {% endblock %}
-    </div>
-</body>
-</html>

+ 0 - 5
src/Chamilo/CoreBundle/Resources/views/default/layout/error.html.twig

@@ -1,5 +0,0 @@
-{% extends app.template_style ~ '/layout/layout_1_col.tpl' %}
-{% block content %}
-    {{ error.code }} - {{ error.message }}
-    {{ content }}
-{% endblock %}

+ 0 - 83
src/Chamilo/CoreBundle/Resources/views/default/layout/footer.html.twig

@@ -1,83 +0,0 @@
-{#<footer {% block footer_open_attributes %}{% endblock footer_open_attributes %}>#}
-<footer>
-    <!-- start of #footer section -->
-    <div class="container">
-        <div class="row">
-            <div id="footer_left" class="col-md-4">
-                {% if session_teachers is not null %}
-                    <div id="session_teachers">
-                        {{ session_teachers }}
-                    </div>
-                {% endif %}
-
-                {% if teachers is not null %}
-                    <div id="teachers">
-                        {{ teachers }}
-                    </div>
-                {% endif %}
-
-                {#  Plugins for footer section #}
-                {% if plugin_footer_left is not null %}
-                    <div id="plugin_footer_left">
-                        {{ plugin_footer_left }}
-                    </div>
-                {% endif %}
-                 &nbsp;
-            </div>
-
-            <div id="footer_center" class="col-md-4">
-                {#   Plugins for footer section  #}
-                {% if plugin_footer_center is not null %}
-                    <div id="plugin_footer_center">
-                        {{ plugin_footer_center }}
-                    </div>
-                {% endif %}
-                 &nbsp;
-            </div>
-
-            <div id="footer_right" class="col-md-4">
-                {% if chamilo_settings_get('display.show_administrator_data') == 'true' %}
-                    <div id="admin_name">
-                        {{ 'Manager' | trans }}
-                        : {{ chamilo_settings_get('admin.administrator_name') }} {{ chamilo_settings_get('admin.administrator_surname') }}
-                    </div>
-                {% endif %}
-
-                <div id="software_name">
-                    {{ "Platform"|trans }}
-                    <a href="{{ url('home') }}" target="_blank">
-                        {{ software_name }}
-                    </a>
-                    &copy; {{ "now"|date("Y") }}
-                </div>
-
-                {#   Plugins for footer section  #}
-                {% if plugin_footer_right is not null %}
-                    <div id="plugin_footer_right">
-                        {{ plugin_footer_right }}
-                    </div>
-                {% endif %}
-                &nbsp;
-            </div><!-- end of #footer_right -->
-        </div><!-- end of #row -->
-    </div><!-- end of #container -->
-</footer>
-
-<div class="modal fade" id="expand-image-modal" tabindex="-1" role="dialog"
-     aria-labelledby="expand-image-modal-title" aria-hidden="true">
-    <div class="modal-dialog modal-lg">
-        <div class="modal-content">
-            <div class="modal-header">
-                <button type="button" class="close" data-dismiss="modal"
-                        aria-label="{{ "Close" | trans }}"><span
-                            aria-hidden="true">&times;</span></button>
-                <h4 class="modal-title" id="expand-image-modal-title">
-                    &nbsp;</h4>
-            </div>
-            <div class="modal-body">
-            </div>
-        </div>
-    </div>
-</div>
-
-{{ footer_extra_content }}

+ 0 - 105
src/Chamilo/CoreBundle/Resources/views/default/layout/footer.js.html.twig

@@ -1,105 +0,0 @@
-<script>
-    /* Makes row highlighting possible */
-    $(document).ready( function() {
-        // Date time settings.
-        moment.locale('{{ locale }}');
-        $.datepicker.setDefaults($.datepicker.regional["{{ locale }}"]);
-        $.datepicker.regional["local"] = $.datepicker.regional["{{ locale }}"];
-
-        // Chosen select
-        $(".chzn-select").chosen({
-            disable_search_threshold: 10,
-            no_results_text: '{{ 'SearchNoResultsFound' | get_lang | escape('js') }}',
-            placeholder_text_multiple: '{{ 'SelectSomeOptions' | get_lang | escape('js') }}',
-            placeholder_text_single: '{{ 'SelectAnOption' | get_lang | escape('js') }}',
-            width: "100%"
-        });
-
-        // Bootstrap tabs.
-        $('.tab-wrapper a').click(function (e) {
-            e.preventDefault();
-            $(this).tab('show');
-
-            //$('#tabs a:first').tab('show') // Select first tab
-        });
-
-        // Fixes bug when loading links inside a tab.
-        $('.tab-wrapper .tab-pane a').unbind();
-
-        /**
-         * Advanced options
-         * Usage
-         * <a id="link" href="url">Advanced</a>
-         * <div id="link_options">
-         *     hidden content :)
-         * </div>
-         * */
-        $(".advanced_options").on("click", function (event) {
-            event.preventDefault();
-            var id = $(this).attr('id') + '_options';
-            var button = $(this);
-            button.toggleClass('active');
-            $("#" + id).toggle();
-        });
-
-        /**
-         * <a class="advanced_options_open" href="http://" rel="div_id">Open</a>
-         * <a class="advanced_options_close" href="http://" rel="div_id">Close</a>
-         * <div id="div_id">Div content</div>
-         * */
-        $(".advanced_options_open").on("click", function (event) {
-            event.preventDefault();
-            var id = $(this).attr('rel');
-            $("#" + id).show();
-        });
-
-        $(".advanced_options_close").on("click", function (event) {
-            event.preventDefault();
-            var id = $(this).attr('rel');
-            $("#" + id).hide();
-        });
-
-        // Adv multi-select search input.
-        $('.select_class_filter').each( function () {
-            var inputId = $(this).attr('id');
-            inputId = inputId.replace('-filter', '');
-            $("#" + inputId).filterByText($("#" + inputId + "-filter"));
-        });
-
-        $(".jp-jplayer audio").addClass('skip');
-
-        // Mediaelement
-        if ( {{ show_media_element }} == 1) {
-            jQuery('video:not(.skip), audio:not(.skip)').mediaelementplayer(/* Options */);
-        }
-
-        // Table highlight.
-        $("form .data_table input:checkbox").click(function () {
-            if ($(this).is(":checked")) {
-                $(this).parentsUntil("tr").parent().addClass("row_selected");
-            } else {
-                $(this).parentsUntil("tr").parent().removeClass("row_selected");
-            }
-        });
-
-        /* For non HTML5 browsers */
-        if ($("#formLogin".length > 1)) {
-            $("input[name=login]").focus();
-        }
-
-        // Tool tip (in exercises)
-        var tip_options = {
-            placement: 'right'
-        };
-        $('.boot-tooltip').tooltip(tip_options);
-        var more = '{{ 'SeeMore' | get_lang | escape('js') }}';
-        var close = '{{ 'Close' | get_lang | escape('js') }}';
-        $('.list-teachers').readmore({
-            speed: 75,
-            moreLink: '<a href="#">' + more + '</a>',
-            lessLink: '<a href="#">' + close + '</a>',
-            collapsedHeight: 35,
-            blockCSS: 'display: block; width: 100%;'
-        });
-    });
-</script>

+ 2 - 26
src/Chamilo/CoreBundle/Resources/views/default/layout/head.html.twig

@@ -1,36 +1,12 @@
-<meta charset="{{ system_charset }}" />
-<link href="https://chamilo.org/chamilo-lms/" rel="help" />
-<link href="https://chamilo.org/the-association/" rel="author" />
-<link href="https://chamilo.org/the-association/" rel="copyright" />
-<!-- Force latest IE rendering engine or ChromeFrame if installed -->
-<!--[if IE]>
-<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
-<![endif]-->
+{# @todo this variables need to be migrated to new symfony2 layout #}
 {{ prefetch }}
-{{ favico }}
-<link rel="apple-touch-icon" href="{{ _p.web }}apple-touch-icon.png" />
-<meta name="apple-mobile-web-app-capable" content="yes" />
-<meta name="generator" content="{{ _s.software_name }} {{ _s.system_version|slice(0,1) }}" />
+
 {#  Use the latest engine in ie8/ie9 or use google chrome engine if available  #}
 {#  Improve usability in portal devices #}
-<meta name="viewport" content="width=device-width, initial-scale=1.0">
-<title>{{ title_string }}</title>
 {{ social_meta }}
 {{ css_static_file_to_string }}
 {{ js_file_to_string }}
 {{ extra_headers }}
-<script>
-
-/* Global chat variables */
-var ajax_url = '{{ _p.web_ajax }}chat.ajax.php';
-var online_button = '{{ online_button }}';
-var offline_button = '{{ offline_button }}';
-var connect_lang = '{{ "ChatConnected"|get_lang }}';
-var disconnect_lang = '{{ "ChatDisconnected"|get_lang }}';
-</script>
-
-{% include template ~ '/layout/header.js.tpl' %}
-
 {{ css_custom_file_to_string }}
 {{ css_style_print }}
 {{ header_extra_content }}

+ 0 - 40
src/Chamilo/CoreBundle/Resources/views/default/layout/layout_1_col.html.twig

@@ -1,40 +0,0 @@
-{% extends "ChamiloCoreBundle::" ~template ~ "/layout/page.html.twig" %}
-
-{% block body %}
-    {% if plugin_main_top %}
-        <div id="plugin_main_top" class="col-md-12">
-            {{ plugin_main_top }}
-        </div>
-    {% endif %}
-    {% if plugin_content_top %}
-        <div id="plugin_content_top" class="col-md-12">
-            {{ plugin_content_top }}
-        </div>
-    {% endif %}
-
-    <div class="col-xs-12 col-md-12">
-        {% include "ChamiloCoreBundle::" ~template ~ "/layout/page_body.html.twig" %}
-        {% block content %}
-            {% if content is not null %}
-                <section id="main_content">
-                {% autoescape false %}
-                {{ content }}
-                {% endautoescape %}
-                </section>
-            {% endif %}
-        {% endblock %}
-        &nbsp;
-    </div>
-
-    {% if plugin_content_bottom %}
-        <div id="plugin_content_bottom" class="col-md-12">
-            {{ plugin_content_bottom }}
-        </div>
-    {% endif %}
-
-    {% if plugin_main_bottom %}
-        <div id="plugin_main_bottom" class="col-md-12">
-            {{ plugin_main_bottom }}
-        </div>
-    {% endif %}
-{% endblock %}

+ 11 - 38
src/Chamilo/CoreBundle/Resources/views/default/layout/layout_2_col.html.twig

@@ -1,24 +1,13 @@
 {% extends template ~ "/layout/page.tpl" %}
 
 {% block body %}
-{% if plugin_main_top %}
-    <div id="plugin_main_top" class="col-md-12">
-        {{ plugin_main_top }}
-    </div>
-    {% endif %}
+
 	<div class="col-md-3 menu-column">
-    {% if plugin_menu_top %}
-        <div id="plugin_menu_top">
-            {{plugin_menu_top}}
-        </div>
-    {% endif %}
-	
-    {% include template ~ "/layout/login_form.tpl" %}
-        
+
     {% if _u.logged  == 1 %}
         {{ user_image_block }}
     {% endif %}
-        
+
     {{ profile_block }}
 	{{ course_block }}
 	{{ teacher_block }}
@@ -29,31 +18,23 @@
 	{{ navigation_course_links }}
 	{{ search_block }}
 	{{ classes_block }}
-        
-    {% if plugin_menu_bottom %}
-        <div id="plugin_menu_bottom">
-            {{ plugin_menu_bottom }}
-        </div>
-    {% endif %}
+
+
 	</div>
 	<div class="col-md-9">
-        {% if plugin_content_top %}
-            <div id="plugin_content_top">
-                {{ plugin_content_top }}
-            </div>
-        {% endif %}
+
         {% if home_page_block %}
             <section id="homepage-home">
                 {{ home_page_block }}
             </section>
         {% endif %}
-        
+
         {{ sniff_notification }}
-        
+
         {% block page_body %}
             {% include template ~ "/layout/page_body.tpl" %}
         {% endblock %}
-        
+
         {% if welcome_to_course_block %}
             <section id="homepage-course">
             {{ welcome_to_course_block }}
@@ -82,15 +63,7 @@
 
 	{% include template ~ "/layout/hot_courses.tpl" %}
 
-    {% if plugin_content_bottom %}
-        <div id="plugin_content_bottom">
-            {{plugin_content_bottom}}
-        </div>
-    {% endif %}
+
 </div>
-{% if plugin_main_bottom %}
-    <div id="plugin_main_bottom" class="col-md-12">
-        {{ plugin_main_bottom }}
-    </div>
-{% endif %}
+
 {% endblock %}

+ 0 - 5
src/Chamilo/CoreBundle/Resources/views/default/layout/no_layout.html.twig

@@ -1,5 +0,0 @@
-{% block body %}
-    {% autoescape false %}
-    {{ content }}
-    {% endautoescape %}
-{% endblock %}

+ 0 - 16
src/Chamilo/CoreBundle/Resources/views/default/layout/page.html.twig

@@ -1,16 +0,0 @@
-{% if show_course_shortcut is not null %}
-    <div class="nav-tools">
-        {{ show_course_shortcut }}
-    </div>
-{% endif %}
-<section id="content-section">
-    <div class="container">
-        {% block breadcrumb %}
-            {{ breadcrumb }}
-        {% endblock %}
-
-        {% block body %}
-            {{ content }}
-        {% endblock %}
-    </div>
-</section>

+ 1 - 0
src/Chamilo/CoreBundle/Resources/views/default/layout/page_body.html.twig

@@ -5,6 +5,7 @@
         {% endautoescape %}
     </div>
 {% endif %}
+
 {% autoescape false %}
 {{ flash_messages }}
 {% endautoescape %}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/default/social/add_groups.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/default/social/edit_profile.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}

+ 1 - 7
src/Chamilo/CoreBundle/Resources/views/default/social/friends.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}
@@ -19,12 +19,6 @@
             {{ social_right_content}}
         </div>
         <div id="display_response_id" class="span5"></div>
-        {{ social_auto_extend_link }}
-    </div>
-    <div class="col-md-4">
-        <div class="row">
-            {{ social_right_information }}
-        </div>
     </div>
 </div>
 {% endautoescape %}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/default/social/group_view.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/default/social/group_waiting_list.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/default/social/groups.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/default/social/groups_topics.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}

+ 1 - 3
src/Chamilo/CoreBundle/Resources/views/default/social/home.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}
@@ -13,10 +13,8 @@
             {{ social_search_block }}
             {{ social_skill_block }}
             {{ social_group_block }}
-            {{ social_right_content }}
             <div id="message_ajax_reponse" class=""></div>
             <div id="display_response_id"></div>
-            {{ social_auto_extend_link }}
         </div>
         <div class="col-md-3">
             <!-- Block chat list -->

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/default/social/inbox.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/default/social/invitations.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}

+ 2 - 2
src/Chamilo/CoreBundle/Resources/views/default/social/myfiles.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}
@@ -17,9 +17,9 @@
         </div>
         <div class="row">
             {{ social_right_content }}
+            {% include '@ChamiloCore/default/javascript/editor/elfinder_standalone.html.twig' %}
         </div>
         <div id="display_response_id" class="col-md-12"></div>
-        {{ social_auto_extend_link }}
     </div>
 </div>
 {% endautoescape %}

+ 2 - 2
src/Chamilo/CoreBundle/Resources/views/default/social/profile.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}
@@ -99,7 +99,7 @@
 </div>
 
 {% if form_modals is defined %}
-    {{ form_modals }}
+    {% include '@ChamiloCore/default/social/form_modals.html.twig' %}#}
 {% endif %}
 {% endautoescape %}
 {% endblock %}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/default/social/search.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}

+ 1 - 1
src/Chamilo/CoreBundle/Resources/views/default/social/whoisonline.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}

+ 0 - 36
src/Chamilo/CoreBundle/Resources/views/layout_one_col.html.twig

@@ -1,36 +0,0 @@
-{% extends "@ChamiloTheme/Layout/base-layout.html.twig" %}
-
-{% block page_content %}
-    {% if js is defined %}
-        {% autoescape false %}
-        {% for item in js %}
-            {{ item }}
-        {% endfor %}
-        {% endautoescape %}
-    {% endif %}
-
-    <div class="row">
-        <div class="col-xs-12 col-md-12">
-            {% autoescape false %}
-            {# Breadcrumb #}
-            {% block chamilo_breadcrumb %}
-            {% include '@ChamiloCore/breadcrumb.html.twig' %}
-            {% endblock %}
-
-            {% block chamilo_messages %}
-            {# Flash messages #}
-            {% include 'SonataCoreBundle:FlashMessage:render.html.twig' %}
-            {% endblock %}
-
-            {# Content #}
-            {% block content %}
-            <section id="main_content">
-                {{ content }}
-            </section>
-            {% endblock %}
-            {% endautoescape %}
-        </div>
-    </div>
-{% endblock %}
-
-

+ 0 - 19
src/Chamilo/CoreBundle/Resources/views/layout_one_col_no_content.html.twig

@@ -1,19 +0,0 @@
-{% extends "@ChamiloTheme/Layout/base-layout.html.twig" %}
-
-{% block chamilo_wrap %}
-    {% if js is defined %}
-        {% autoescape false %}
-            {% for item in js %}
-                {{ item }}
-            {% endfor %}
-        {% endautoescape %}
-    {% endif %}
-    {% block content %}
-    {% autoescape false %}w
-        {{ content }}
-    {% endautoescape %}
-    {% endblock %}
-{% endblock %}
-
-{% block chamilo_footer %}
-{% endblock %}

+ 1 - 1
src/Chamilo/CourseBundle/Resources/views/CToolIntro/create.html.twig

@@ -1,4 +1,4 @@
-{% extends "ChamiloCoreBundle::layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block page_title %} {{ title }}{% endblock %}
 {#{% block page_subtitle %}{{ course.code }}{% endblock %}#}

+ 1 - 1
src/Chamilo/CourseBundle/Resources/views/CToolIntro/grid.html.twig

@@ -1,4 +1,4 @@
-{% extends "ChamiloCoreBundle::layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block page_title %} {{ title }}{% endblock %}
 {#{% block page_subtitle %}{{ course.code }}{% endblock %}#}

+ 1 - 1
src/Chamilo/CourseBundle/Resources/views/Home/add.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 {% block content %}
     {% import "@template_style/crud_macros/course_crud.tpl" as actions %}
     <form action="{{ url('course_home.controller:addIconAction', {'course': course.code, 'id_session' : course_session.id, itemName : item.name }) }}" method = "post" {{ form_enctype(form) }}>

+ 1 - 1
src/Chamilo/CourseBundle/Resources/views/Home/index.html.twig

@@ -1,4 +1,4 @@
-{% extends "ChamiloCoreBundle::layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}
 {% autoescape false %}

+ 1 - 1
src/Chamilo/CourseBundle/Resources/views/Home/list.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block content %}ss
     {% if items_from_session %}

+ 142 - 143
src/Chamilo/ThemeBundle/Resources/views/Layout/base-layout.html.twig

@@ -64,6 +64,7 @@
     <link rel="stylesheet" href="{{ asset('assets/jquery-ui/themes/smoothness/theme.css') }}"/>
     <link rel="stylesheet" href="{{ asset('assets/jquery-ui/themes/smoothness/jquery-ui.min.css') }}"/>
     <link rel="stylesheet" href="{{ asset('assets/bootstrap-daterangepicker/daterangepicker.css') }}"/>
+    <link rel="stylesheet" href="{{ asset('assets/chosen/chosen.css') }}"/>
 
     <script src="{{ asset('assets/modernizr/modernizr.js') }}"></script>
     <script src="{{ asset('assets/moment/moment.js') }}"></script>
@@ -87,6 +88,7 @@
     <script src="{{ asset('bundles/ivoryckeditor/ckeditor.js') }}" type="text/javascript"></script>
     <script src="{{ asset('bundles/fosjsrouting/js/router.js') }}"></script>
     <script src="{{ path('fos_js_routing_js', {"callback": "fos.Router.setData"}) }}"></script>
+    <script src="{{ asset('assets/chosen/chosen.jquery.js') }}"></script>
 
     {% block chamilo_header_js %}
     {% include '@ChamiloTheme/Layout/header.js.twig' %}
@@ -101,174 +103,171 @@
     {#<script type="text/javascript" src="{{ asset_url | replace({'/app_dev.php': ''}) }}"></script>#}
     {#{% endjavascripts %}#}
 </head>
-{#<body class="{{ admin_skin|default('skin-blue')}}">#}
+
 <body>
 <noscript>{{ "NoJavascript" | trans }}</noscript>
 {#{% if show_header == true %}#}
 {% block chamilo_wrap %}
-<div id="page-wrap">
-    <!-- page section -->
-    {# Bug and help notifications #}
-    {#{% block help_notifications %}#}
-    {#<ul id="navigation" class="notification-panel">#}
-    {#{{ help_content }}#}
-    {#{{ bug_notification_link }}#}
-    {#</ul>#}
-    {#{% endblock %}#}
+    <div id="page-wrap">
+        <!-- page section -->
+        {# Bug and help notifications #}
+        {#{% block help_notifications %}#}
+        {#<ul id="navigation" class="notification-panel">#}
+        {#{{ help_content }}#}
+        {#{{ bug_notification_link }}#}
+        {#</ul>#}
+        {#{% endblock %}#}
 
-    {# topbar #}
-    {% block topbar %}
-        {#{% include "@template_style/layout/topbar.html.twig" %}#}
-        {#{% if show_toolbar == 1 %}#}
-            {#<div class="clear-header"></div>#}
-        {#{% endif %}#}
-    {% endblock %}
-    <header>
-        <div class="extra-header">
-            {{ header_extra_content }}
-        </div>
+        {# topbar #}
+        {% block topbar %}
+            {#{% include "@template_style/layout/topbar.html.twig" %}#}
+            {#{% if show_toolbar == 1 %}#}
+                {#<div class="clear-header"></div>#}
+            {#{% endif %}#}
+        {% endblock %}
+        <header>
+            <div class="extra-header">
+                {{ header_extra_content }}
+            </div>
 
-        <section id="main" class="container">
-            {% if plugin_header_main %}
-                <div class="row">
-                    <div class="col-lg-12">
-                        {{ plugin_header_main }}
-                    </div>
-                </div>
-            {% endif %}
-            <div class="row">
-                <div class="col-lg-3">
-                    <div class="logo">
-                        {#<a href="{{ url('index') }}">#}
-                        <img src="{{ asset('css/themes/'~ theme ~'/images/header-logo.png') }}"/>
-                        {#</a>#}
-                    </div>
-                </div>
-                <div class="col-lg-9">
-                    <div class="col-sm-4">
-                        {% if plugin_header_left is not null %}
-                            <div id="plugin_header_left">
-                                {{ plugin_header_left }}
-                            </div>
-                        {% endif %}
+            <section id="main" class="container">
+                {% if plugin_header_main %}
+                    <div class="row">
+                        <div class="col-lg-12">
+                            {{ plugin_header_main }}
+                        </div>
                     </div>
-                    <div class="col-sm-4">
-                        {% if plugin_header_center is not null %}
-                            <div id="plugin_header_center">
-                                {{ plugin_header_center }}
-                            </div>
-                        {% endif %}
+                {% endif %}
+                <div class="row">
+                    <div class="col-lg-3">
+                        <div class="logo">
+                            {#<a href="{{ url('index') }}">#}
+                            <img src="{{ asset('css/themes/'~ theme ~'/images/header-logo.png') }}"/>
+                            {#</a>#}
+                        </div>
                     </div>
-                    <div class="col-sm-4">
-                        {% if plugin_header_right is not null %}
-                            <div id="plugin_header_right">
-                                {{ plugin_header_right }}
+                    <div class="col-lg-9">
+                        <div class="col-sm-4">
+                            {% if plugin_header_left is not null %}
+                                <div id="plugin_header_left">
+                                    {{ plugin_header_left }}
+                                </div>
+                            {% endif %}
+                        </div>
+                        <div class="col-sm-4">
+                            {% if plugin_header_center is not null %}
+                                <div id="plugin_header_center">
+                                    {{ plugin_header_center }}
+                                </div>
+                            {% endif %}
+                        </div>
+                        <div class="col-sm-4">
+                            {% if plugin_header_right is not null %}
+                                <div id="plugin_header_right">
+                                    {{ plugin_header_right }}
+                                </div>
+                            {% endif %}
+                            <div class="section-notifications">
+                                <ul id="notifications" class="nav nav-pills pull-right">
+                                    {{ notification_menu }}
+                                </ul>
                             </div>
-                        {% endif %}
-                        <div class="section-notifications">
-                            <ul id="notifications" class="nav nav-pills pull-right">
-                                {{ notification_menu }}
-                            </ul>
+                            {{ accessibility }}
                         </div>
-                        {{ accessibility }}
                     </div>
                 </div>
-            </div>
-        </section>
+            </section>
 
-        <section id="menu-bar">
-            {# menu #}
-            {% block menu %}
-                <nav class="navbar navbar-default">
-                    <div class="container">
-                        <div class="collapse navbar-collapse">
-                        {{ mopa_bootstrap_menu('ChamiloCoreBundle:NavBuilder:leftMenu', {'automenu': 'navbar', 'stacked' : false}) }}
-                        {{ mopa_bootstrap_menu('ChamiloCoreBundle:NavBuilder:rightMenu', {'automenu': 'navbar', 'pull-right' : true} ) }}
+            <section id="menu-bar">
+                {# menu #}
+                {% block menu %}
+                    <nav class="navbar navbar-default">
+                        <div class="container">
+                            <div class="collapse navbar-collapse">
+                            {{ mopa_bootstrap_menu('ChamiloCoreBundle:NavBuilder:leftMenu', {'automenu': 'navbar', 'stacked' : false}) }}
+                            {{ mopa_bootstrap_menu('ChamiloCoreBundle:NavBuilder:rightMenu', {'automenu': 'navbar', 'pull-right' : true} ) }}
+                            </div>
                         </div>
-                    </div>
-                </nav>
-                {#{% include "@template_style/layout/menu.html.twig" %}#}
-            {% endblock %}
-        </section>
-    </header>
-
-<div id="top_main_content" class="container">
-    {#{{ locale_switcher() }}#}
-
-{# course navigation links/shortcuts need to be activated by the admin #}
-    {#{% include "@template_style/layout/course_navigation.html.twig" %}#}
-{#{% endif %}#}
+                    </nav>
+                    {#{% include "@template_style/layout/menu.html.twig" %}#}
+                {% endblock %}
+            </section>
+        </header>
 
-{% block chamilo_header %}
-    {#<header class="header">#}
-        {#{% block chamilo_logo %}#}
-        {#<a href="#" class="logo">#}
-            {#Chamilo#}
-            {#&#123;&#35;{{- chamilo_settings_get('platform.institution') -}}&#35;&#125;#}
-        {#</a>#}
-        {#{% endblock %}#}
-        {#{% block chamilo_main_navbar %}#}
-        {#<!-- Header Navbar: style can be found in header.less -->#}
-        {#{% endblock %}#}
-    {#</header>#}
-{% endblock %}
+        <div id="top_main_content" class="container">
+            {#{{ locale_switcher() }}#}
 
-{% autoescape false %}
-{% include 'SonataCoreBundle:FlashMessage:render.html.twig' %}
-{% endautoescape %}
+        {# course navigation links/shortcuts need to be activated by the admin #}
+            {#{% include "@template_style/layout/course_navigation.html.twig" %}#}
+        {#{% endif %}#}
 
-{% block chamilo_content %}
-    {#Check sonata_block.yml settings#}
-    {#{% include 'SonataSeoBundle:Block:_facebook_sdk.html.twig' %}#}
-    {#{% include 'SonataSeoBundle:Block:_twitter_sdk.html.twig' %}#}
-    {#{% include 'SonataSeoBundle:Block:_pinterest_sdk.html.twig' %}#}
-{% endblock %}
+        {% block chamilo_header %}
+            {#<header class="header">#}
+                {#{% block chamilo_logo %}#}
+                {#<a href="#" class="logo">#}
+                    {#Chamilo#}
+                    {#&#123;&#35;{{- chamilo_settings_get('platform.institution') -}}&#35;&#125;#}
+                {#</a>#}
+                {#{% endblock %}#}
+                {#{% block chamilo_main_navbar %}#}
+                {#<!-- Header Navbar: style can be found in header.less -->#}
+                {#{% endblock %}#}
+            {#</header>#}
+        {% endblock %}
 
-{% block page_content %}
-{% endblock %}
+        {% autoescape false %}
+        {% include 'SonataCoreBundle:FlashMessage:render.html.twig' %}
+        {% endautoescape %}
 
-{% block sonata_page_container %}
-{% endblock %}
+        {% block chamilo_content %}
+            {#Check sonata_block.yml settings#}
+            {#{% include 'SonataSeoBundle:Block:_facebook_sdk.html.twig' %}#}
+            {#{% include 'SonataSeoBundle:Block:_twitter_sdk.html.twig' %}#}
+            {#{% include 'SonataSeoBundle:Block:_pinterest_sdk.html.twig' %}#}
+        {% endblock %}
 
-{#<!-- Right side column. Contains the navbar and content of the page -->#}
-{#<div class="col-md-9">#}
-    {#<!-- Content Header (Page header) -->#}
-    {#{% block content_header %}#}
-    {#<section class="content-header">#}
-        {#{% block content_header_title %}#}
-            {#<h1>#}
-                {#{% block page_title %}{% endblock %}#}
-                {#<small>{% block page_subtitle %}{% endblock %}</small>#}
-            {#</h1>#}
-        {#{% endblock %}#}
+        {% block page_content %}
+        {% endblock %}
 
-        {#{% block chamilo_breadcrumb %}#}
-        {#{{ render(controller('ChamiloThemeBundle:Breadcrumb:breadcrumb', {'request':app.request, 'title' : block('page_title')})) }}#}
-        {#{% endblock %}#}
-    {#</section>#}
-    {#{% endblock %}#}
+        {% block sonata_page_container %}
+        {% endblock %}
 
-    {#<!-- Main content -->#}
-    {#<section class="content">#}
-        {#{% block page_content %}{% endblock %}#}
-    {#</section>#}
-    {#<!-- /.content -->#}
-{#</div>#}
-{#<!-- /.right-side -->#}
+        {#<!-- Right side column. Contains the navbar and content of the page -->#}
+        {#<div class="col-md-9">#}
+            {#<!-- Content Header (Page header) -->#}
+            {#{% block content_header %}#}
+            {#<section class="content-header">#}
+                {#{% block content_header_title %}#}
+                    {#<h1>#}
+                        {#{% block page_title %}{% endblock %}#}
+                        {#<small>{% block page_subtitle %}{% endblock %}</small>#}
+                    {#</h1>#}
+                {#{% endblock %}#}
 
-{% endblock %}
-</div>
-</div>
-{# End wrapper div #}
+                {#{% block chamilo_breadcrumb %}#}
+                {#{{ render(controller('ChamiloThemeBundle:Breadcrumb:breadcrumb', {'request':app.request, 'title' : block('page_title')})) }}#}
+                {#{% endblock %}#}
+            {#</section>#}
+            {#{% endblock %}#}
 
-{% block chamilo_footer %}
-    {% include "@ChamiloCore/default/layout/footer.html.twig" %}
-{% endblock %}
+            {#<!-- Main content -->#}
+            {#<section class="content">#}
+                {#{% block page_content %}{% endblock %}#}
+            {#</section>#}
+            {#<!-- /.content -->#}
+        {#</div>#}
+        {#<!-- /.right-side -->#}
 
-{% block chamilo_footer_js %}
-    {% include '@ChamiloTheme/Layout/footer.js.twig' %}
-{% endblock %}
+        {% endblock %}
+        </div> {# end top_main_content #}
+    </div> {# End page-wrap div #}
 
-{% endblock %} {# End wrapper block#}
+    {% block chamilo_footer %}
+        {% include '@ChamiloTheme/Layout/footer.html.twig' %}
+    {% endblock %}
+    {% block chamilo_footer_js %}
+        {% include '@ChamiloTheme/Layout/footer.js.twig' %}
+    {% endblock %}
+{% endblock %} {# End chamilo_wrap block #}
 </body>
 </html>

+ 9 - 6
src/Chamilo/CoreBundle/Resources/views/default/layout/page_footer.html.twig → src/Chamilo/ThemeBundle/Resources/views/Layout/footer.html.twig

@@ -1,7 +1,9 @@
+{#<footer {% block footer_open_attributes %}{% endblock footer_open_attributes %}>#}
 <footer id="footer-section" class="sticky-footer bgfooter">
+    <!-- start of #footer section -->
     <div class="container">
         <div class="pre-footer">
-            {% if plugin_pre_footer is not null %}
+            {% if plugin_pre_footer %}
             <div id="plugin_pre_footer">
                 {{ plugin_pre_footer }}
             </div>
@@ -52,12 +54,16 @@
                 </div>
             </div>
         </div>
+        {% if footer_extra_content is not null %}
         <div class="extra-footer">
             {{ footer_extra_content }}
         </div>
-    </div>
+        {% endif %}
+    </div><!-- end of #container -->
 </footer>
 
+{{ execution_stats }}
+
 <div class="modal fade" id="expand-image-modal" tabindex="-1" role="dialog" aria-labelledby="expand-image-modal-title" aria-hidden="true">
     <div class="modal-dialog modal-lg">
         <div class="modal-content">
@@ -85,7 +91,4 @@
         </div>
     </div>
 </div>
-
-{% include template ~ '/layout/footer.js.tpl' %}
-
-{{ execution_stats }}
+{{ footer_extra_content }}

+ 22 - 15
src/Chamilo/ThemeBundle/Resources/views/Layout/footer.js.twig

@@ -3,17 +3,17 @@
     $(document).ready( function() {
         // Date time settings.
         moment.locale('{{ app.request.locale }}');
-        //$.datepicker.setDefaults($.datepicker.regional["{{ app.request.locale }}"]);
-        //$.datepicker.regional["local"] = $.datepicker.regional["{{ app.request.locale }}"];
+        $.datepicker.setDefaults($.datepicker.regional["{{ app.request.locale }}"]);
+        $.datepicker.regional["local"] = $.datepicker.regional["{{ app.request.locale }}"];
 
         // Chosen select
-        {#$(".chzn-select").chosen({#}
-            {#disable_search_threshold: 10,#}
-            {#no_results_text: '{{ 'SearchNoResultsFound' | trans }}',#}
-            {#placeholder_text_multiple: '{{ 'SelectSomeOptions' | trans }}',#}
-            {#placeholder_text_single: '{{ 'SelectAnOption' | trans }}',#}
-            {#width: "100%"#}
-        {#});#}
+        $(".chzn-select").chosen({
+            disable_search_threshold: 10,
+            no_results_text: '{{ 'SearchNoResultsFound' | trans | escape('js') }}',
+            placeholder_text_multiple: '{{ 'SelectSomeOptions' | trans | escape('js') }}',
+            placeholder_text_single: '{{ 'SelectAnOption' | trans | escape('js') }}',
+            width: "100%"
+        });
 
         // Bootstrap tabs.
         $('.tab-wrapper a').click(function (e) {
@@ -60,7 +60,7 @@
         });
 
         // Adv multi-select search input.
-        $('.select_class_filter').on('focus', function () {
+        $('.select_class_filter').each( function () {
             var inputId = $(this).attr('id');
             inputId = inputId.replace('-filter', '');
             $("#" + inputId).filterByText($("#" + inputId + "-filter"));
@@ -69,13 +69,14 @@
         $(".jp-jplayer audio").addClass('skip');
 
         // Mediaelement
-        //jQuery('video:not(.skip), audio:not(.skip)').mediaelementplayer(/* Options */);
+        if ( {{ show_media_element }} == 1) {
+            jQuery('video:not(.skip), audio:not(.skip)').mediaelementplayer(/* Options */);
+        }
 
         // Table highlight.
         $("form .data_table input:checkbox").click(function () {
             if ($(this).is(":checked")) {
                 $(this).parentsUntil("tr").parent().addClass("row_selected");
-
             } else {
                 $(this).parentsUntil("tr").parent().removeClass("row_selected");
             }
@@ -86,13 +87,19 @@
             $("input[name=login]").focus();
         }
 
-        /* For IOS users */
-        $('.autocapitalize_off').attr('autocapitalize', 'off');
-
         // Tool tip (in exercises)
         var tip_options = {
             placement: 'right'
         };
         $('.boot-tooltip').tooltip(tip_options);
+        var more = '{{ 'SeeMore' | get_lang | escape('js') }}';
+        var close = '{{ 'Close' | get_lang | escape('js') }}';
+        $('.list-teachers').readmore({
+            speed: 75,
+            moreLink: '<a href="#">' + more + '</a>',
+            lessLink: '<a href="#">' + close + '</a>',
+            collapsedHeight: 35,
+            blockCSS: 'display: block; width: 100%;'
+        });
     });
 </script>

+ 1 - 0
src/Chamilo/ThemeBundle/Resources/views/Layout/form-theme.html.twig

@@ -1,3 +1,4 @@
+{# This file changes/format the symfony2 forms using the Bootstrap UI #}
 {% extends 'form_div_layout.html.twig' %}
 
 {% block widget_attributes %}

+ 88 - 19
src/Chamilo/ThemeBundle/Resources/views/Layout/header.js.twig

@@ -98,23 +98,37 @@ var showTemplates = function (ckeditorName) {
     });
 };
 
+function doneResizing() {
+    var widhtWindow = $(window).width();
+    if ((widhtWindow>=1024) && (widhtWindow>=768)) {
+        $("#profileCollapse").addClass("in");
+        $("#courseCollapse").addClass("in");
+        $("#skillsCollapse").addClass("in");
+        $("#sn-sidebar-collapse").addClass("in");
+        $("#user_image_block").removeClass("text-muted");
+    } else {
+        $("#profileCollapse").removeClass("in");
+        $("#courseCollapse").removeClass("in");
+        $("#skillsCollapse").removeClass("in");
+        $("#sn-avatar-one").removeClass("in");
+        $("#user_image_block").addClass("text-muted");
+    }
+};
+
+
 $(document).ready(function() {
     $("#open-view-list").click(function(){
         $("#student-list-work").fadeIn(300);
     });
-
     $("#closed-view-list").click(function(){
         $("#student-list-work").fadeOut(300);
     });
-
     check_brand();
-
-        //if exists the toolbar admin
-    if($('#toolbar-admin').length){
-        var heigthToolBar= $('#toolbar-admin').height();
-        $('header').css('margin-top', heigthToolBar+'px');
-        $('#page-back').css('padding-top', heigthToolBar+20+'px');
-    }
+    var id;
+    $(window).resize(function() {
+        clearTimeout(id);
+        id = setTimeout(doneResizing, 200);
+    });
 
     // Removes the yellow input in Chrome
     if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
@@ -128,12 +142,12 @@ $(document).ready(function() {
         });
     }
 
-    {#$(".accordion_jquery").accordion({#}
-        {#autoHeight: false,#}
-        {#active: false, // all items closed by default#}
-        {#collapsible: true,#}
-        {#header: ".accordion-heading"#}
-    {#});#}
+    $(".accordion_jquery").accordion({
+        autoHeight: false,
+        active: false, // all items closed by default
+        collapsible: true,
+        header: ".accordion-heading"
+    });
 
     // Global popup
     $('body').on('click', 'a.ajax', function(e) {
@@ -214,7 +228,7 @@ $(document).ready(function() {
     );
 
     /* Make responsive image maps */
-   // $('map').imageMapResize();
+    //$('map').imageMapResize();
 
     jQuery.fn.filterByText = function(textbox) {
         return this.each(function() {
@@ -241,6 +255,11 @@ $(document).ready(function() {
             });
         });
     };
+    $(".black-shadow").mouseenter(function() {
+        $(this).addClass('hovered-course');
+    }).mouseleave(function() {
+         $(this).removeClass('hovered-course');
+    });
 });
 
 $(window).resize(function() {
@@ -248,6 +267,18 @@ $(window).resize(function() {
 });
 
 $(document).scroll(function() {
+    var valor = $('body').outerHeight() - 700;
+    if ($(this).scrollTop() > 100) {
+        $('.bottom_actions').addClass('bottom_actions_fixed');
+    } else {
+        $('.bottom_actions').removeClass('bottom_actions_fixed');
+    }
+
+    if ($(this).scrollTop() > valor) {
+        $('.bottom_actions').removeClass('bottom_actions_fixed');
+    } else {
+        $('.bottom_actions').addClass('bottom_actions_fixed');
+    }
 
     //Exercise warning fixed at the top
     var fixed =  $("#exercise_clock_warning");
@@ -266,7 +297,7 @@ $(document).scroll(function() {
             fixed.css('width', '100%');
         } else {
             fixed.removeClass('navbar-fixed-top');
-            fixed.css('width', '200px');
+            fixed.css('width', '100%');
         }
     }
 
@@ -285,8 +316,10 @@ $(document).scroll(function() {
                 }
                 $('.new_actions').attr('data-top', offset.top + more_top);
             }
-
-            if ($('.new_actions').attr('data-top') - $('.new_actions').outerHeight() <= $(this).scrollTop()) {
+            // Check if the height is enough before fixing the icons menu (or otherwise removing it)
+            // Added a 30px offset otherwise sometimes the menu plays ping-pong when scrolling to
+            // the bottom of the page on short pages.
+            if ($('.new_actions').attr('data-top') - $('.new_actions').outerHeight() <= $(this).scrollTop() + 30) {
                 $('.new_actions').addClass('new_actions-fixed');
             } else {
                 $('.new_actions').removeClass('new_actions-fixed');
@@ -452,4 +485,40 @@ function hideUnhide(inId, inIdTxt, inTxtHide, inTxtUnhide)
         $('#'+inIdTxt).attr("value", inTxtHide);
     }
 }
+
+function expandColumnToogle(buttonSelector, col1Info, col2Info)
+{
+    $(buttonSelector).on('click', function (e) {
+        e.preventDefault();
+
+        col1Info = $.extend({
+            selector: '',
+            width: 4
+        }, col1Info);
+        col2Info = $.extend({
+            selector: '',
+            width: 8
+        }, col2Info);
+
+        if (!col1Info.selector || !col2Info.selector) {
+            return;
+        }
+
+        var col1 = $(col1Info.selector),
+            col2 = $(col2Info.selector);
+
+        $('#expand').toggleClass('hide');
+        $('#contract').toggleClass('hide');
+
+        if (col2.is('.col-md-' + col2Info.width)) {
+            col2.removeClass('col-md-' + col2Info.width).addClass('col-md-12');
+            col1.removeClass('col-md-' + col1Info.width).addClass('hide');
+
+            return;
+        }
+
+        col2.removeClass('col-md-12').addClass('col-md-' + col2Info.width);
+        col1.removeClass('hide').addClass('col-md-' + col1Info.width);
+    });
+}
 </script>

+ 0 - 0
src/Chamilo/CoreBundle/Resources/views/layout_cms.html.twig → src/Chamilo/ThemeBundle/Resources/views/Layout/layout_cms.html.twig


+ 1 - 0
src/Chamilo/CoreBundle/Resources/views/layout_empty.html.twig → src/Chamilo/ThemeBundle/Resources/views/Layout/layout_empty.html.twig

@@ -1,3 +1,4 @@
+{# Just echo content #}
 {% autoescape false %}
 {% block content %}
 {{ content }}

+ 0 - 0
src/Chamilo/CoreBundle/Resources/views/grid.html.twig → src/Chamilo/ThemeBundle/Resources/views/Layout/layout_grid.html.twig


+ 76 - 0
src/Chamilo/ThemeBundle/Resources/views/Layout/layout_one_col.html.twig

@@ -0,0 +1,76 @@
+{% extends '@ChamiloTheme/Layout/base-layout.html.twig' %}
+
+{% block page_content %}
+    {% if js is defined %}
+        {% autoescape false %}
+        {% for item in js %}
+            {{ item }}
+        {% endfor %}
+        {% endautoescape %}
+    {% endif %}
+
+    {% if plugin_main_top %}
+        <div id="plugin_main_top" class="col-md-12">
+            {{ plugin_main_top }}
+        </div>
+    {% endif %}
+    {% if plugin_content_top %}
+        <div id="plugin_content_top" class="col-md-12">
+            {{ plugin_content_top }}
+        </div>
+    {% endif %}
+
+    {% if show_course_shortcut is not null %}
+        <div class="nav-tools">
+            {{ show_course_shortcut }}
+        </div>
+    {% endif %}
+
+    <section id="content-section">
+    <div class="container">
+        <div class="row">
+            <div class="col-xs-12 col-md-12">
+                {% autoescape false %}
+
+                {# Breadcrumb #}
+                {% block chamilo_breadcrumb %}
+                {% include '@ChamiloCore/breadcrumb.html.twig' %}
+                {% endblock %}
+
+                {% block chamilo_messages %}
+                {# Flash messages #}
+                {% include 'SonataCoreBundle:FlashMessage:render.html.twig' %}
+                {% endblock %}
+
+                {% if actions != '' %}
+                    <div class="actions">
+                        {{ actions }}
+                    </div>
+                {% endif %}
+
+                {# Content #}
+                {% block content %}
+                <section id="main_content">
+                    {{ content }}
+                </section>
+                {% endblock %}
+                {% endautoescape %}
+            </div>
+        </div>
+    </div>
+    </section>
+
+     {% if plugin_content_bottom %}
+        <div id="plugin_content_bottom" class="col-md-12">
+            {{ plugin_content_bottom }}
+        </div>
+    {% endif %}
+
+    {% if plugin_main_bottom %}
+        <div id="plugin_main_bottom" class="col-md-12">
+            {{ plugin_main_bottom }}
+        </div>
+    {% endif %}
+{% endblock %}
+
+

+ 1 - 3
src/Chamilo/ThemeBundle/Resources/views/Layout/layout_one_col_no_content.html.twig

@@ -1,6 +1,5 @@
 {% extends "@ChamiloTheme/Layout/base-layout.html.twig" %}
 
-{% autoescape false %}
 {% block chamilo_wrap %}
     {% if js is defined %}
         {% autoescape false %}
@@ -16,7 +15,6 @@
     {% endblock %}
 {% endblock %}
 
+{# Some how twig does not override completely a block that used an "include" call #}
 {% block chamilo_footer %}
 {% endblock %}
-
-{% endautoescape %}

+ 36 - 0
src/Chamilo/CoreBundle/Resources/views/layout_two_col.html.twig → src/Chamilo/ThemeBundle/Resources/views/Layout/layout_two_col.html.twig

@@ -6,8 +6,20 @@
 %}
 
 {% block page_content %}
+    {% if plugin_main_top %}
+    <div id="plugin_main_top" class="col-md-12">
+        {{ plugin_main_top }}
+    </div>
+    {% endif %}
+
     {#  Left column #}
     <div class="col-md-3">
+        {% if plugin_menu_top %}
+        <div id="plugin_menu_top">
+            {{plugin_menu_top}}
+        </div>
+        {% endif %}
+
         {% block chamilo_left_column %}
             <section class="left_column">
             {% if is_granted('IS_AUTHENTICATED_FULLY') %}
@@ -22,11 +34,22 @@
             {#{{ sonata_block_render({'type': 'chamilo_core.block.skill'}) }}#}
             </section>
         {% endblock %}
+        {% if plugin_menu_bottom %}
+            <div id="plugin_menu_bottom">
+                {{ plugin_menu_bottom }}
+            </div>
+        {% endif %}
     </div>
 
     {#  Right column #}
     <div class="col-md-9">
         {% autoescape false %}
+        {% if plugin_content_top %}
+            <div id="plugin_content_top">
+                {{ plugin_content_top }}
+            </div>
+        {% endif %}
+
         {% block chamilo_breadcrumb %}
             {% include '@ChamiloCore/breadcrumb.html.twig' %}
         {% endblock %}
@@ -43,6 +66,19 @@
             </section>
             {% endblock %}
         {% endblock %}
+
+        {% if plugin_content_bottom %}
+        <div id="plugin_content_bottom">
+            {{plugin_content_bottom}}
+        </div>
+        {% endif %}
+
         {% endautoescape %}
     </div>
+
+    {% if plugin_main_bottom %}
+    <div id="plugin_main_bottom" class="col-md-12">
+        {{ plugin_main_bottom }}
+    </div>
+    {% endif %}
 {% endblock %}

+ 10 - 0
src/Chamilo/ThemeBundle/Resources/views/Layout/no_layout.html.twig

@@ -0,0 +1,10 @@
+{% extends "@ChamiloTheme/Layout/base-layout.html.twig" %}
+{# overrides everything inside body no-footer no-header #}
+{% block chamilo_wrap %}
+    {% autoescape false %}
+    {{ content }}
+    {% endautoescape %}
+{% endblock %}
+
+{% block chamilo_footer %}
+{% endblock %}

+ 1 - 1
src/Chamilo/UserBundle/Resources/views/Profile/action.html.twig

@@ -1,4 +1,4 @@
-{% extends "@ChamiloCore/layout_one_col.html.twig" %}
+{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
 
 {% block page_content %}