diff --git a/public/main/inc/lib/template.lib.php b/public/main/inc/lib/template.lib.php index ddf4ecdfed3..7c0124a794f 100644 --- a/public/main/inc/lib/template.lib.php +++ b/public/main/inc/lib/template.lib.php @@ -718,7 +718,6 @@ public static function setVueParams(&$params) $encoded = json_encode($user); } $params['user'] = $encoded;*/ - $params['from_vue'] = isset($_REQUEST['from_vue']) ? 1 : 0; } /** diff --git a/src/CoreBundle/Controller/IndexController.php b/src/CoreBundle/Controller/IndexController.php index 8a68c2b603e..e7c165fc73f 100644 --- a/src/CoreBundle/Controller/IndexController.php +++ b/src/CoreBundle/Controller/IndexController.php @@ -33,7 +33,7 @@ class IndexController extends BaseController #[Route('/p/{slug}', name: 'public_page')] public function index(): Response { - return $this->render('@ChamiloCore/Index/vue.html.twig'); + return $this->render('@ChamiloCore/Layout/no_layout.html.twig', ['content' => '']); } /** diff --git a/src/CoreBundle/EventListener/ExceptionListener.php b/src/CoreBundle/EventListener/ExceptionListener.php index 9de73311dca..4ccf884904e 100644 --- a/src/CoreBundle/EventListener/ExceptionListener.php +++ b/src/CoreBundle/EventListener/ExceptionListener.php @@ -57,7 +57,6 @@ public function __invoke(ExceptionEvent $event): void $message = $this->twig->render( '@ChamiloCore/Exception/error.html.twig', [ - 'from_vue' => false, 'exception' => $exception, ] ); diff --git a/src/CoreBundle/EventListener/TwigListener.php b/src/CoreBundle/EventListener/TwigListener.php index 923b1a6bb5d..92ede5340f4 100644 --- a/src/CoreBundle/EventListener/TwigListener.php +++ b/src/CoreBundle/EventListener/TwigListener.php @@ -45,7 +45,6 @@ public function __invoke(ControllerEvent $event): void $languages = $this->languageRepository->getAllAvailable()->getQuery()->getArrayResult(); // $this->twig->addGlobal('text_direction', api_get_text_direction()); - $this->twig->addGlobal('from_vue', $request->request->get('from_vue') ? 1 : 0); $this->twig->addGlobal('is_authenticated', json_encode($isAuth)); $this->twig->addGlobal('user_json', $data ?? json_encode([])); $this->twig->addGlobal('access_url_id', $request->getSession()->get('access_url_id')); diff --git a/src/CoreBundle/Resources/views/Index/vue.html.twig b/src/CoreBundle/Resources/views/Index/vue.html.twig deleted file mode 100644 index 0502d8bbd99..00000000000 --- a/src/CoreBundle/Resources/views/Index/vue.html.twig +++ /dev/null @@ -1,6 +0,0 @@ -{% extends "@ChamiloCore/Layout/no_layout.html.twig" %} - -{%- block content %} - {% include '@ChamiloCore/Layout/vue_setup.html.twig' %} - {# {{ encore_entry_script_tags('vue') }}#} -{% endblock %} diff --git a/src/CoreBundle/Resources/views/Layout/base-layout.html.twig b/src/CoreBundle/Resources/views/Layout/base-layout.html.twig index 7f5d344808d..f77267eb463 100644 --- a/src/CoreBundle/Resources/views/Layout/base-layout.html.twig +++ b/src/CoreBundle/Resources/views/Layout/base-layout.html.twig @@ -4,28 +4,24 @@ {% import "@ChamiloCore/Macros/image.html.twig" as macro_image %} {% import '@ChamiloCore/Macros/headers.html.twig' as macro_headers %} {% import '@ChamiloCore/Macros/modals.html.twig' as macro_modals %} - {% set modals_block = macro_modals.global_modal('') %} -{% if not from_vue %} - - - {% block chamilo_head %} - {%- include "@ChamiloCore/Layout/head.html.twig" %} + + +{% block chamilo_head %} + {%- include "@ChamiloCore/Layout/head.html.twig" %} +{% endblock %} + + +{%- block chamilo_wrap -%} + {%- block page_content %} {% endblock %} - - - {%- block chamilo_wrap -%} - {%- block page_content %} - {% endblock %} - {% endblock -%} - {%- block chamilo_footer -%} - {% endblock -%} - {{ modals_block }} +{% endblock -%} + +{%- block chamilo_footer -%} +{% endblock -%} + +{{ modals_block }} - {% include "@ChamiloCore/Layout/foot.html.twig" %} - - -{% else %} - {{ block('page_content') }} - {{ modals_block }} -{% endif %} +{% include "@ChamiloCore/Layout/foot.html.twig" %} + + 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 78aaac299fc..9a1e3461196 100644 --- a/src/CoreBundle/Resources/views/Layout/layout_one_col.html.twig +++ b/src/CoreBundle/Resources/views/Layout/layout_one_col.html.twig @@ -1,14 +1,5 @@ {% extends '@ChamiloCore/Layout/base-layout.html.twig' %} {%- block page_content %} - {% if from_vue %} - {# Loading legacy js using the $htmlHeadXtra array #} - {% autoescape false %} - {% for js in legacy_javascript %} - {{~ js }} - {% endfor %} - {% endautoescape %} - {% endif %} - {%- autoescape false %} {% if js is defined %} {%- for item in js %} @@ -36,17 +27,11 @@ {% endautoescape -%} {%- autoescape %} - {% if not from_vue %} {%- include '@ChamiloCore/Layout/vue_setup.html.twig' %} - {% endif %} {% endautoescape -%} - {% set hideContent = 'display: none' %} - {% if from_vue %} - {% set hideContent = '' %} - {% endif %} {%- autoescape false %} -
+