File tree Expand file tree Collapse file tree 8 files changed +21
-51
lines changed Expand file tree Collapse file tree 8 files changed +21
-51
lines changed Original file line number Diff line number Diff line change @@ -718,7 +718,6 @@ public static function setVueParams(&$params)
718
718
$encoded = json_encode($user);
719
719
}
720
720
$params['user'] = $encoded;*/
721
- $ params ['from_vue ' ] = isset ($ _REQUEST ['from_vue ' ]) ? 1 : 0 ;
722
721
}
723
722
724
723
/**
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ class IndexController extends BaseController
33
33
#[Route('/p/{slug} ' , name: 'public_page ' )]
34
34
public function index (): Response
35
35
{
36
- return $ this ->render ('@ChamiloCore/Index/vue .html.twig ' );
36
+ return $ this ->render ('@ChamiloCore/Layout/no_layout .html.twig ' , [ ' content ' => '' ] );
37
37
}
38
38
39
39
/**
Original file line number Diff line number Diff line change @@ -57,7 +57,6 @@ public function __invoke(ExceptionEvent $event): void
57
57
$ message = $ this ->twig ->render (
58
58
'@ChamiloCore/Exception/error.html.twig ' ,
59
59
[
60
- 'from_vue ' => false ,
61
60
'exception ' => $ exception ,
62
61
]
63
62
);
Original file line number Diff line number Diff line change @@ -45,7 +45,6 @@ public function __invoke(ControllerEvent $event): void
45
45
$ languages = $ this ->languageRepository ->getAllAvailable ()->getQuery ()->getArrayResult ();
46
46
47
47
// $this->twig->addGlobal('text_direction', api_get_text_direction());
48
- $ this ->twig ->addGlobal ('from_vue ' , $ request ->request ->get ('from_vue ' ) ? 1 : 0 );
49
48
$ this ->twig ->addGlobal ('is_authenticated ' , json_encode ($ isAuth ));
50
49
$ this ->twig ->addGlobal ('user_json ' , $ data ?? json_encode ([]));
51
50
$ this ->twig ->addGlobal ('access_url_id ' , $ request ->getSession ()->get ('access_url_id ' ));
Original file line number Diff line number Diff line change 1
- {% extends " @ChamiloCore/Layout/no_layout.html.twig" %}
2
-
3
- {%- block content %}
4
- {% include ' @ChamiloCore/Layout/vue_setup.html.twig' %}
5
- {# {{ encore_entry_script_tags('vue') }}#}
6
- {% endblock %}
Original file line number Diff line number Diff line change 4
4
{% import " @ChamiloCore/Macros/image.html.twig" as macro_image %}
5
5
{% import ' @ChamiloCore/Macros/headers.html.twig' as macro_headers %}
6
6
{% import ' @ChamiloCore/Macros/modals.html.twig' as macro_modals %}
7
-
8
7
{% set modals_block = macro_modals.global_modal (' ' ) %}
9
- {% if not from_vue %}
10
- <!DOCTYPE html>
11
- <html lang =" {{ app .request .locale }}" class =" no-js h-100" >
12
- {% block chamilo_head %}
13
- {%- include " @ChamiloCore/Layout/head.html.twig" %}
8
+ <!DOCTYPE html>
9
+ <html lang =" {{ app .request .locale }}" class =" no-js h-100" >
10
+ {% block chamilo_head %}
11
+ {%- include " @ChamiloCore/Layout/head.html.twig" %}
12
+ {% endblock %}
13
+ <body class =" font-sans antialiased {{ section_name }}" >
14
+ <noscript >{{ " Your browser does not support Javascript" | trans }}</noscript >
15
+ {%- block chamilo_wrap -%}
16
+ {%- block page_content %}
14
17
{% endblock %}
15
- <body class =" font-sans antialiased {{ section_name }}" >
16
- <noscript >{{ " Your browser does not support Javascript" | trans }}</noscript >
17
- {%- block chamilo_wrap -%}
18
- {%- block page_content %}
19
- {% endblock %}
20
- {% endblock -%}
21
- {%- block chamilo_footer -%}
22
- {% endblock -%}
23
- {{ modals_block }}
18
+ {% endblock -%}
19
+
20
+ {%- block chamilo_footer -%}
21
+ {% endblock -%}
22
+
23
+ {{ modals_block }}
24
24
25
- {% include " @ChamiloCore/Layout/foot.html.twig" %}
26
- </body >
27
- </html >
28
- {% else %}
29
- {{ block (' page_content' ) }}
30
- {{ modals_block }}
31
- {% endif %}
25
+ {% include " @ChamiloCore/Layout/foot.html.twig" %}
26
+ </body >
27
+ </html >
Original file line number Diff line number Diff line change 1
1
{% extends ' @ChamiloCore/Layout/base-layout.html.twig' %}
2
2
{%- block page_content %}
3
- {% if from_vue %}
4
- {# Loading legacy js using the $htmlHeadXtra array #}
5
- {% autoescape false %}
6
- {% for js in legacy_javascript %}
7
- {{~ js }}
8
- {% endfor %}
9
- {% endautoescape %}
10
- {% endif %}
11
-
12
3
{%- autoescape false %}
13
4
{% if js is defined %}
14
5
{%- for item in js %}
36
27
{% endautoescape -%}
37
28
38
29
{%- autoescape %}
39
- {% if not from_vue %}
40
30
{%- include ' @ChamiloCore/Layout/vue_setup.html.twig' %}
41
- {% endif %}
42
31
{% endautoescape -%}
43
32
44
- {% set hideContent = ' display: none' %}
45
- {% if from_vue %}
46
- {% set hideContent = ' ' %}
47
- {% endif %}
48
33
{%- autoescape false %}
49
- <section id =" sectionMainContent" class =" section-content" style =" {{ hideContent }} " >
34
+ <section id =" sectionMainContent" class =" section-content" style =" display: none; " >
50
35
{% if introduction is defined %}
51
36
{{ introduction }}
52
37
{% endif %}
Original file line number Diff line number Diff line change 2
2
{# overrides everything inside body no-footer no-header #}
3
3
{% block chamilo_wrap %}
4
4
{%- autoescape %}
5
- {% if not from_vue %}
6
- <div id =" app" data-flashes =" {{ app.flashes ()| json_encode }}" ></div >
7
- {% endif %}
5
+ {%- include ' @ChamiloCore/Layout/vue_setup.html.twig' %}
8
6
{% endautoescape -%}
9
7
{% autoescape false %}
10
8
<section id =" sectionMainContent" class =" section-content" >
You can’t perform that action at this time.
0 commit comments