LP: Fix layout for lp view

pull/5268/head
christianbeeznst 2 years ago
parent 7f23b2c1b9
commit 91296bb940
  1. 2
      assets/vue/App.vue
  2. 12
      assets/vue/components/layout/DashboardLayout.vue
  3. 20
      src/CoreBundle/Resources/views/Index/vue.html.twig
  4. 5
      src/CoreBundle/Resources/views/Layout/no_layout.html.twig

@ -79,7 +79,7 @@ const layout = computed(() => {
const queryParams = new URLSearchParams(window.location.search)
if (queryParams.has("lp") || (queryParams.has("origin") && "learnpath" === queryParams.get("origin"))) {
if (queryParams.has("lp_id") || (queryParams.has("origin") && "learnpath" === queryParams.get("origin"))) {
return "EmptyLayout"
}

@ -1,7 +1,10 @@
<template>
<Topbar v-if="!hideInterface" />
<Sidebar v-if="!hideInterface && securityStore.isAuthenticated" />
<div v-if="!hideInterface" class="app-main" :class="{ 'app-main--no-sidebar': !securityStore.isAuthenticated }">
<Topbar />
<Sidebar v-if="securityStore.isAuthenticated" />
<div
class="app-main"
:class="{ 'app-main--no-sidebar': !securityStore.isAuthenticated }"
>
<Breadcrumb v-if="showBreadcrumb" />
<slot />
<router-view />
@ -9,7 +12,6 @@
</template>
<script setup>
import { ref } from "vue"
import Breadcrumb from "../../components/Breadcrumb.vue"
import Topbar from "../../components/layout/Topbar.vue"
import Sidebar from "../../components/layout/Sidebar.vue"
@ -23,6 +25,4 @@ defineProps({
})
const securityStore = useSecurityStore()
const chamiloAppSettings = window.ChamiloAppSettings || {}
const hideInterface = ref(!!chamiloAppSettings.hideInterface)
</script>

@ -1,18 +1,6 @@
{% extends "@ChamiloCore/Layout/base-layout.html.twig" %}
{% block chamilo_wrap %}
{%- autoescape %}
{% if not from_vue %}
<div id="app" data-flashes="{{ app.flashes()|json_encode }}"></div>
{% endif %}
{% endautoescape -%}
{% autoescape false %}
<section id="sectionMainContent" class="section-content">
{%- block content %}
{% include '@ChamiloCore/Layout/vue_setup.html.twig' %}
{% endblock -%}
</section>
{% endautoescape %}
{% endblock %}
{% extends "@ChamiloCore/Layout/no_layout.html.twig" %}
{% block chamilo_footer %}
{%- block content %}
{% include '@ChamiloCore/Layout/vue_setup.html.twig' %}
{# {{ encore_entry_script_tags('vue') }}#}
{% endblock %}

@ -13,11 +13,6 @@
{% endblock -%}
</section>
{% endautoescape %}
<script>
window.ChamiloAppSettings = {
hideInterface: {{ not from_vue ? 'true' : 'false' }},
};
</script>
{% endblock %}
{% block chamilo_footer %}

Loading…
Cancel
Save