diff --git a/.travis.yml b/.travis.yml index 69c706127f..df289cbc55 100755 --- a/.travis.yml +++ b/.travis.yml @@ -103,7 +103,7 @@ script: - sed -i "s/APP_ENV='dev'/APP_ENV='test'/g" .env.local - cd tests/behat - ../../vendor/behat/behat/bin/behat features/adminFillUsers.feature -vvv -# - ../../vendor/behat/behat/bin/behat features/adminSettings.feature -v + - ../../vendor/behat/behat/bin/behat features/adminSettings.feature -vvv # - ../../vendor/behat/behat/bin/behat features/career.feature -v # - ../../vendor/behat/behat/bin/behat features/class.feature -v # - ../../vendor/behat/behat/bin/behat features/companyReports.feature -v diff --git a/assets/vue/App.vue b/assets/vue/App.vue index 669449077c..f294fdae29 100644 --- a/assets/vue/App.vue +++ b/assets/vue/App.vue @@ -123,12 +123,14 @@ export default { let payload = {isAuthenticated: isAuthenticated, user: user}; this.$store.dispatch("security/onRefresh", payload); - if (this.$parent.$el.attributes["data-messages"]) { - let messages = JSON.parse(this.$parent.$el.attributes["data-messages"].value); - if (messages) { - Array.from(messages).forEach(element => - this.showMessage(element) - ); + if (this.$parent.$el.attributes["data-flashes"]) { + let flashes = JSON.parse(this.$parent.$el.attributes["data-flashes"].value); + if (flashes) { + for (const key in flashes) { + for (const text in flashes[key]) { + this.showMessage(flashes[key][text], key); + } + } } } diff --git a/assets/vue/mixins/NotificationMixin.js b/assets/vue/mixins/NotificationMixin.js index 27bc4b0e3f..156e6ce2b9 100644 --- a/assets/vue/mixins/NotificationMixin.js +++ b/assets/vue/mixins/NotificationMixin.js @@ -13,7 +13,6 @@ export default { }, showError(error) { - console.log(error); //this.showMessage(error, 'danger'); }, diff --git a/src/CoreBundle/Resources/views/Index/vue.html.twig b/src/CoreBundle/Resources/views/Index/vue.html.twig index 7151df371b..6afbc1c6ff 100644 --- a/src/CoreBundle/Resources/views/Index/vue.html.twig +++ b/src/CoreBundle/Resources/views/Index/vue.html.twig @@ -3,7 +3,7 @@ {% block content %}
diff --git a/src/CoreBundle/Resources/views/Layout/base-layout.html.twig b/src/CoreBundle/Resources/views/Layout/base-layout.html.twig index 7b14baf970..2df50c8fb4 100644 --- a/src/CoreBundle/Resources/views/Layout/base-layout.html.twig +++ b/src/CoreBundle/Resources/views/Layout/base-layout.html.twig @@ -3,59 +3,35 @@ {% import "@ChamiloCore/Macros/buttons.html.twig" as macro_buttons %} {% import "@ChamiloCore/Macros/image.html.twig" as macro_image %} {% import '@ChamiloCore/Macros/headers.html.twig' as macro_headers %} - +{# Chamilo theme #} +{% set theme = 'chamilo' %} {% if not from_vue %} - - - {# Chamilo theme #} - {% set theme = 'chamilo' %} + + {% block chamilo_head %} - - {% include "@ChamiloCore/Layout/head.html.twig" %} - + + {% include "@ChamiloCore/Layout/head.html.twig" %} + {% endblock %} - - {% block chamilo_wrap %} - {% block page_header %} - {# {% include '@ChamiloCore/Layout/header.html.twig' %} #} - {% endblock %} - {#
#} - {% block page_sidebar %} - {# {% include '@ChamiloCore/Layout/sidebar.html.twig' %} #} - {% endblock %} - - {#
#} - {% block chamilo_breadcrumb %} - -{# {% include '@ChamiloCore/Layout/breadcrumb.html.twig' %}#} - - {% endblock %} - - {% block page_content %} - {% endblock %} - {#
#} - {#
#} + {% block page_content %} + {% endblock %} {% endblock %} - {% block chamilo_footer %} - - {# {% include '@ChamiloCore/Layout/footer.html.twig' %} #} - {% endblock %} - - - + + {% else %} {{ block('page_content') }} {% endif %} diff --git a/src/CoreBundle/Resources/views/Layout/layout_one_col.html.twig b/src/CoreBundle/Resources/views/Layout/layout_one_col.html.twig index 22f4b39c4a..bd4c52d11d 100644 --- a/src/CoreBundle/Resources/views/Layout/layout_one_col.html.twig +++ b/src/CoreBundle/Resources/views/Layout/layout_one_col.html.twig @@ -28,15 +28,16 @@ {% endif %} {% autoescape %} -
- {% endautoescape %} {% set hideContent = 'display: none' %} @@ -45,25 +46,19 @@ {% endif %}
- {% autoescape false %} - {% block chamilo_messages %} - {% include '@ChamiloCore/FlashMessage/render.html.twig' %} - {% endblock %} + {% autoescape false %} + {% if introduction is defined %} + {{ introduction }} + {% endif %} -{#
#} - {% if introduction is defined %} - {{ introduction }} - {% endif %} + {% if actions != '' %} + {{ actions }} + {% endif %} - {% if actions != '' %} - {{ actions }} - {% endif %} - {# Content #} - {% block content %} - {{ content }} - {% endblock %} -{#
#} - {% endautoescape %} + {% block content %} + {{ content }} + {% endblock %} + {% endautoescape %}
{% if plugin_content_bottom %} diff --git a/src/CoreBundle/Resources/views/Layout/login-layout.html.twig b/src/CoreBundle/Resources/views/Layout/login-layout.html.twig index 4a62f4b620..3d20e6a112 100644 --- a/src/CoreBundle/Resources/views/Layout/login-layout.html.twig +++ b/src/CoreBundle/Resources/views/Layout/login-layout.html.twig @@ -1,6 +1,6 @@ {% import '@ChamiloCore/Macros/box.html.twig' as macro %} - + diff --git a/src/CoreBundle/Resources/views/Lti/launch.html.twig b/src/CoreBundle/Resources/views/Lti/launch.html.twig index 22509ae1a0..eaf531c0a0 100644 --- a/src/CoreBundle/Resources/views/Lti/launch.html.twig +++ b/src/CoreBundle/Resources/views/Lti/launch.html.twig @@ -1,4 +1,4 @@ - +