parent
f2088586ca
commit
4017113fca
@ -1,54 +1,184 @@ |
||||
{% extends '@ChamiloTheme/Layout/layout_cms.html.twig' %} |
||||
{% extends '@ChamiloTheme/Layout/base-layout.html.twig' %} |
||||
|
||||
{% block sonata_page_container %} |
||||
<div class="content"> |
||||
<div class="row page-header"> |
||||
{{ sonata_page_render_container('header', 'global') }} |
||||
</div> |
||||
{% block page_content %} |
||||
|
||||
{% block sonata_page_breadcrumb %} |
||||
<div class="row"> |
||||
{{ sonata_block_render_event('breadcrumb', { 'context': 'page', 'current_uri': app.request.requestUri }) }} |
||||
</div> |
||||
{% block sonata_page_top_bar %} |
||||
{% block page_top_bar %} {# Deprecated block #} |
||||
{% if sonata_page.isEditor or ( app.user and is_granted('ROLE_PREVIOUS_ADMIN') ) %} |
||||
{% if sonata_page.isEditor and sonata_page.isInlineEditionOn %} |
||||
<!-- CMS specific variables --> |
||||
<script> |
||||
jQuery(document).ready(function() { |
||||
Sonata.Page.init({ |
||||
url: { |
||||
block_save_position: '{{ sonata_admin.objectUrl('sonata.page.admin.page', 'edit', page) }}', |
||||
block_edit: '{{ sonata_admin.url('sonata.page.admin.page|sonata.page.admin.block', 'edit', {'id': 'BLOCK_ID'}) }}' |
||||
} |
||||
}); |
||||
}); |
||||
</script> |
||||
{% endif %} |
||||
|
||||
<header class="sonata-bc sonata-page-top-bar navbar navbar-inverse" role="banner" |
||||
{% if sonata_page.isEditor and sonata_page.isInlineEditionOn %} |
||||
data-page-editor='{{ { |
||||
url: { |
||||
block_save_position: sonata_admin.objectUrl('sonata.page.admin.page', 'edit', page), |
||||
block_edit: sonata_admin.url('sonata.page.admin.page|sonata.page.admin.block', 'edit', {'id': 'BLOCK_ID'}) |
||||
} |
||||
}|json_encode()|raw }}' |
||||
{% endif %}> |
||||
<div class="container"> |
||||
<ul class="nav navbar-nav"> |
||||
{% if app.user and is_granted('ROLE_SONATA_ADMIN') %} |
||||
<li><a href="{{ path('sonata_admin_dashboard') }}">{{ "header.sonata_admin_dashboard"|trans({}, 'SonataPageBundle') }}</a></li> |
||||
{% endif %} |
||||
|
||||
{% if sonata_page.isEditor %} |
||||
{% set sites = sonata_page.siteavailables %} |
||||
|
||||
{% if sites|length > 1 and site is defined %} |
||||
<li class="dropdown"> |
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ site.name }} <span class="caret"></span></a> |
||||
<ul class="dropdown-menu"> |
||||
{% for site in sites %} |
||||
<li><a href="{{ site.url }}">{{ site.name }}</a></li> |
||||
{% endfor %} |
||||
</ul> |
||||
</li> |
||||
{% endif %} |
||||
|
||||
<li class="dropdown"> |
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Page <span class="caret"></span></a> |
||||
<ul class="dropdown-menu"> |
||||
{% if page is defined %} |
||||
<li><a href="{{ sonata_admin.objectUrl('sonata.page.admin.page', 'edit', page) }}" target="_new">{{ "header.edit_page"|trans({}, 'SonataPageBundle') }}</a></li> |
||||
<li><a href="{{ sonata_admin.objectUrl('sonata.page.admin.page|sonata.page.admin.snapshot', 'list', page) }}" target="_new">{{ "header.create_snapshot"|trans({}, 'SonataPageBundle') }}</a></li> |
||||
<li class="divider"></li> |
||||
{% endif %} |
||||
|
||||
<li><a href="{{ sonata_admin.url('sonata.page.admin.page', 'list') }}" target="_new">{{ "header.view_all_pages"|trans({}, 'SonataPageBundle') }}</a></li> |
||||
|
||||
{% if error_codes is defined and error_codes|length %} |
||||
<li class="divider"></li> |
||||
<li><a href="{{ path('sonata_page_exceptions_list') }}" target="_new">{{ "header.view_all_exceptions"|trans({}, 'SonataPageBundle') }}</a></li> |
||||
{% endif %} |
||||
</ul> |
||||
</li> |
||||
|
||||
{% if page is defined %} |
||||
<li> |
||||
<a href="{{ sonata_admin.url('sonata.page.admin.page', 'compose', {'id': page.id}) }}"> |
||||
<i class="fa fa-magic"></i> |
||||
{{ 'header.compose_page'|trans({}, 'SonataPageBundle')}} |
||||
</a> |
||||
</li> |
||||
{% endif %} |
||||
|
||||
{% if page is defined and not page.enabled %} |
||||
<li><span style="padding-left: 20px; background: red;"><strong><em>{{ 'header.page_is_disabled'|trans([], 'SonataPageBundle') }}</em></strong></span></li> |
||||
{% endif %} |
||||
|
||||
{% if sonata_page.isInlineEditionOn and page is defined %} |
||||
<li> |
||||
<form class="form-inline" style="margin: 0px"> |
||||
<label class="checkbox inline" for="page-action-enabled-edit"><input type="checkbox" id="page-action-enabled-edit">{{ 'header.show_zone'|trans({}, 'SonataPageBundle') }}</label> |
||||
<input type="submit" class="btn" value="{{ 'btn_save_position'|trans({}, 'SonataPageBundle') }}" id="page-action-save-position"> |
||||
</form> |
||||
</li> |
||||
{% endif %} |
||||
{% endif %} |
||||
|
||||
{% if app.user and is_granted('ROLE_PREVIOUS_ADMIN') %} |
||||
<li><a href="{{ url('homepage', {'_switch_user': '_exit'}) }}">{{ "header.switch_user_exit"|trans({}, 'SonataPageBundle')}}</a></li> |
||||
{% endif %} |
||||
|
||||
</ul> |
||||
</div> |
||||
</header> |
||||
|
||||
{% endif %} |
||||
{% endblock %} |
||||
{% endblock %} |
||||
|
||||
{% if page is defined %} |
||||
<div class="row"> |
||||
{% if page.name != 'global'%} |
||||
{{ sonata_page_render_container('content_top', 'global') }} |
||||
{% block sonata_page_asset_footer %} |
||||
{% block page_asset_footer %} {# Deprecated block #} |
||||
{% if page is defined %} |
||||
{% if page.javascript is not empty %} |
||||
<script> |
||||
{{ page.javascript|raw }} |
||||
</script> |
||||
{% endif %} |
||||
{{ sonata_page_render_container('content_top', page) }} |
||||
</div> |
||||
{% endif %} |
||||
|
||||
<div class="row"> |
||||
{% block page_content %} |
||||
{% if content is defined %} |
||||
{{ content|raw }} |
||||
{% else %} |
||||
{% set content = block('content') is defined ? block('content') : '' %} |
||||
{% if content|length > 0 %} |
||||
{{ content|raw }} |
||||
{% elseif page is defined %} |
||||
{{ sonata_page_render_container('content', page) }} |
||||
{% if page.stylesheet is not empty %} |
||||
<style> |
||||
{{ page.stylesheet|raw }} |
||||
</style> |
||||
{% endif %} |
||||
{% endif %} |
||||
{# |
||||
These includes can be done only at this point as all blocks are loaded, |
||||
Limition : this does not work if a global page is loaded from an ESI tag inside a container block |
||||
#} |
||||
{{ sonata_block_include_stylesheets('screen', app.request.basePath) }} |
||||
{{ sonata_block_include_javascripts('screen', app.request.basePath) }} |
||||
{% endblock %} |
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_container %} |
||||
<div class="container"> |
||||
<div class="content"> |
||||
<div class="row"> |
||||
{{ sonata_page_render_container('header', 'global') }} |
||||
{% if page.name != 'global' %} |
||||
{{ sonata_page_render_container('header', page) }} |
||||
{% endif %} |
||||
</div> |
||||
|
||||
{% block sonata_page_breadcrumb %} |
||||
<div class="row"> |
||||
{{ sonata_block_render_event('breadcrumb', { 'context': 'page', 'current_uri': app.request.requestUri }) }} |
||||
</div> |
||||
{% endblock %} |
||||
|
||||
{% if page is defined %} |
||||
<div class="row"> |
||||
{% if page.name != 'global' %} |
||||
{{ sonata_page_render_container('content_top', 'global') }} |
||||
{% endif %} |
||||
{{ sonata_page_render_container('content_top', page) }} |
||||
</div> |
||||
{% endif %} |
||||
{% endblock %} |
||||
</div> |
||||
|
||||
{% if page is defined %} |
||||
<div class="row"> |
||||
{{ sonata_page_render_container('content_bottom', page) }} |
||||
<div class="row"> |
||||
{% if content is defined %} |
||||
{{ content|raw }} |
||||
{% else %} |
||||
{% set content = block('content') is defined ? block('content') : '' %} |
||||
{% if content|length > 0 %} |
||||
{{ content|raw }} |
||||
{% elseif page is defined %} |
||||
{{ sonata_page_render_container('content', page) }} |
||||
{% endif %} |
||||
{% endif %} |
||||
</div> |
||||
|
||||
{% if page.name != 'global'%} |
||||
{{ sonata_page_render_container('content_bottom', 'global') }} |
||||
{% if page is defined %} |
||||
<div class="row"> |
||||
{{ sonata_page_render_container('content_bottom', page) }} |
||||
{% if page.name != 'global' %} |
||||
{{ sonata_page_render_container('content_bottom', 'global') }} |
||||
{% endif %} |
||||
</div> |
||||
{% endif %} |
||||
</div> |
||||
{% endif %} |
||||
</div> |
||||
|
||||
<footer class="row"> |
||||
{{ sonata_page_render_container('footer', 'global') }} |
||||
</footer> |
||||
|
||||
<div class="row"> |
||||
{{ sonata_page_render_container('footer', 'global') }} |
||||
{% if page.name != 'global' %} |
||||
{{ sonata_page_render_container('footer', page) }} |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
{% endblock %} |
||||
{% endblock %} |
||||
|
||||
|
@ -0,0 +1,80 @@ |
||||
<meta charset="utf-8"> |
||||
{# Check settings to add more metadata in app/config/sonata/sonata_seo.yml #} |
||||
{{ sonata_seo_metadatas() }} |
||||
<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"/> |
||||
<link rel="apple-touch-icon" href="{{ asset('apple-touch-icon.png') }}"/> |
||||
{% autoescape false %} |
||||
{{ favico }} |
||||
{% endautoescape %} |
||||
<title> |
||||
{% block title %} |
||||
{{ chamilo_settings_get('platform.institution') }} - {{ chamilo_settings_get('platform.site_name') }} |
||||
{% endblock %} |
||||
</title> |
||||
|
||||
{# Check chamilo_css key in assetic.yml #} |
||||
{#{%- stylesheets '@chamilo_css' -%}#} |
||||
{#<link rel="stylesheet" href="{{ asset_url }}"/>#} |
||||
{#{% endstylesheets %}#} |
||||
{#{% stylesheets#} |
||||
{#'@MopaBootstrapBundle/Resources/public/less/mopabootstrapbundle.less'#} |
||||
{#'@MopaBootstrapBundle/Resources/public/less/eyecon-datepicker.less'#} |
||||
{#%}#} |
||||
{#<link href="{{ asset_url }}" type="text/css" rel="stylesheet" media="screen" />#} |
||||
{#{% endstylesheets %}#} |
||||
{% set bug_notification_link = '' %} |
||||
{% set help_content = '' %} |
||||
{% set header_extra_content = '' %} |
||||
{% set template = 'default' %} |
||||
{% set notification_menu = '' %} |
||||
{% set accessibility = '' %} |
||||
{% set containerClass = '' %} |
||||
{% set breadcrumb = '' %} |
||||
{% set user_notifications = '' %} |
||||
{% set message_url = '' %} |
||||
{% set profile_link = '' %} |
||||
{% set message_link = '' %} |
||||
|
||||
<link rel="stylesheet" href="{{ asset('build/chamilo.css') }}"/> |
||||
<link rel="stylesheet" href="{{ asset('build/css/base.css') }}"/> |
||||
<link rel="stylesheet" href="{{ asset('build/css/themes/'~ theme ~'/default.css') }}"/> |
||||
<link rel="stylesheet" media="print" href="{{ asset('build/css/print.css') }}"/> |
||||
|
||||
{# chamilo.js is generated using the file webpack.config.js and using yarn read /assets/README.md for more info #} |
||||
<script src="{{ asset('build/chamilo.js') }}"></script> |
||||
<script src="{{ asset('libs/ckeditor/ckeditor.js') }}"></script> |
||||
<script src="{{ asset('libs/readmore-js/readmore.min.js') }}"></script> |
||||
<script src="{{ asset('libs/js-cookie/src/js.cookie.js') }}"></script> |
||||
{#<script src="{{ asset('assets/modernizr/modernizr.js') }}"></script>#} |
||||
|
||||
{# Check chamilo_js key in assetic.yml #} |
||||
{% block javascripts %} |
||||
{#{%- javascripts '@chamilo_js' -%}#} |
||||
{#<script src="{{ asset_url }} "></script>#} |
||||
{#{% endjavascripts %}#} |
||||
|
||||
{#<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>#} |
||||
|
||||
{% block chamilo_header_js %} |
||||
{# Loading legacy js using the $htmlHeadXtra array #} |
||||
{% autoescape false %} |
||||
{% for js in legacy_javascript %} |
||||
{{ js }} |
||||
{% endfor %} |
||||
{% endautoescape %} |
||||
{% include '@ChamiloTheme/Layout/header.js.twig' %} |
||||
{% endblock %} |
||||
|
||||
{#'@MopaBootstrapBundle/Resources/public/js/eyecon-bootstrap-datepicker.js'#} |
||||
|
||||
{#{% javascripts#} |
||||
{#'bundles/mopabootstrap/js/mopabootstrap-collection.js'#} |
||||
{#'bundles/mopabootstrap/js/mopabootstrap-subnav.js'#} |
||||
{#%}#} |
||||
{#<script type="text/javascript" src="{{ asset_url | replace({'/app_dev.php': ''}) }}"></script>#} |
||||
{#{% endjavascripts %}#} |
||||
{% endblock %} |
@ -1,167 +0,0 @@ |
||||
{% extends '@ChamiloTheme/Layout/base-layout.html.twig' %} |
||||
|
||||
{%- block sonata_page_html_tag -%} |
||||
{#<!DOCTYPE html>#} |
||||
{#<html {{ sonata_seo_html_attributes() }}>#} |
||||
{% endblock %} |
||||
{% block sonata_page_head %} |
||||
<head {{ sonata_seo_head_attributes() }}> |
||||
|
||||
<!--[if IE]><meta http-equiv="X-UA-Compatible" content="IE=edge"><![endif]--> |
||||
{{ sonata_seo_title() }} |
||||
{{ sonata_seo_metadatas() }} |
||||
|
||||
{% block sonata_page_stylesheets %} |
||||
{% block page_stylesheets %} {# Deprecated block #} |
||||
{% for stylesheet in sonata_page.assets.stylesheets %} |
||||
<link rel="stylesheet" href="{{ asset(stylesheet) }}" media="all"> |
||||
{% endfor %} |
||||
{% endblock %} |
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_javascripts %} |
||||
{% block page_javascripts %} {# Deprecated block #} |
||||
<!-- Le HTML5 shim, for IE6-8 support of HTML elements --> |
||||
<!--[if lt IE 9]> |
||||
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script> |
||||
<![endif]--> |
||||
|
||||
{% for js in sonata_page.assets.javascripts %} |
||||
<script src="{{ asset(js) }}"></script> |
||||
{% endfor %} |
||||
{% endblock %} |
||||
|
||||
{% endblock %} |
||||
</head> |
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_body_tag %} |
||||
<body class="sonata-bc"> |
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_top_bar %} |
||||
{% block page_top_bar %} {# Deprecated block #} |
||||
{% if sonata_page.isEditor or ( app.user and is_granted('ROLE_PREVIOUS_ADMIN') ) %} |
||||
|
||||
{% if sonata_page.isEditor and sonata_page.isInlineEditionOn %} |
||||
<!-- CMS specific variables --> |
||||
<script> |
||||
jQuery(document).ready(function() { |
||||
Sonata.Page.init({ |
||||
url: { |
||||
block_save_position: '{{ sonata_admin.objectUrl('sonata.page.admin.page', 'edit', page) }}', |
||||
block_edit: '{{ sonata_admin.url('sonata.page.admin.page|sonata.page.admin.block', 'edit', {'id': 'BLOCK_ID'}) }}' |
||||
} |
||||
}); |
||||
}); |
||||
</script> |
||||
{% endif %} |
||||
|
||||
<header class="sonata-bc sonata-page-top-bar navbar navbar-inverse navbar-fixed-top" role="banner" |
||||
{% if sonata_page.isEditor and sonata_page.isInlineEditionOn %} |
||||
data-page-editor='{{ { |
||||
url: { |
||||
block_save_position: sonata_admin.objectUrl('sonata.page.admin.page', 'edit', page), |
||||
block_edit: sonata_admin.url('sonata.page.admin.page|sonata.page.admin.block', 'edit', {'id': 'BLOCK_ID'}) |
||||
} |
||||
}|json_encode()|raw }}' |
||||
{% endif %}> |
||||
<div class="container"> |
||||
<ul class="nav navbar-nav"> |
||||
{% if app.user and is_granted('ROLE_SONATA_ADMIN') %} |
||||
<li><a href="{{ path('sonata_admin_dashboard') }}">{{ "header.sonata_admin_dashboard"|trans({}, 'SonataPageBundle') }}</a></li> |
||||
{% endif %} |
||||
|
||||
{% if sonata_page.isEditor %} |
||||
{% set sites = sonata_page.siteavailables %} |
||||
|
||||
{% if sites|length > 1 and site is defined %} |
||||
<li class="dropdown"> |
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ site.name }} <span class="caret"></span></a> |
||||
<ul class="dropdown-menu"> |
||||
{% for site in sites %} |
||||
<li><a href="{{ site.url }}">{{ site.name }}</a></li> |
||||
{% endfor %} |
||||
</ul> |
||||
</li> |
||||
{% endif %} |
||||
|
||||
<li class="dropdown"> |
||||
<a href="#" class="dropdown-toggle" data-toggle="dropdown">Page <span class="caret"></span></a> |
||||
<ul class="dropdown-menu"> |
||||
{% if page is defined %} |
||||
<li><a href="{{ sonata_admin.objectUrl('sonata.page.admin.page', 'edit', page) }}" target="_new">{{ "header.edit_page"|trans({}, 'SonataPageBundle') }}</a></li> |
||||
<li><a href="{{ sonata_admin.objectUrl('sonata.page.admin.page|sonata.page.admin.snapshot', 'list', page) }}" target="_new">{{ "header.create_snapshot"|trans({}, 'SonataPageBundle') }}</a></li> |
||||
<li class="divider"></li> |
||||
{% endif %} |
||||
|
||||
<li><a href="{{ sonata_admin.url('sonata.page.admin.page', 'list') }}" target="_new">{{ "header.view_all_pages"|trans({}, 'SonataPageBundle') }}</a></li> |
||||
|
||||
{% if error_codes is defined and error_codes|length %} |
||||
<li class="divider"></li> |
||||
<li><a href="{{ path('sonata_page_exceptions_list') }}" target="_new">{{ "header.view_all_exceptions"|trans({}, 'SonataPageBundle') }}</a></li> |
||||
{% endif %} |
||||
</ul> |
||||
</li> |
||||
|
||||
{% if page is defined %} |
||||
<li> |
||||
<a href="{{ sonata_admin.url('sonata.page.admin.page', 'compose', {'id': page.id}) }}"> |
||||
<i class="fa fa-magic"></i> |
||||
{{ 'header.compose_page'|trans({}, 'SonataPageBundle')}} |
||||
</a> |
||||
</li> |
||||
{% endif %} |
||||
|
||||
{% if page is defined and not page.enabled %} |
||||
<li><span style="padding-left: 20px; background: red;"><strong><em>{{ 'header.page_is_disabled'|trans([], 'SonataPageBundle') }}</em></strong></span></li> |
||||
{% endif %} |
||||
|
||||
{% if sonata_page.isInlineEditionOn and page is defined %} |
||||
<li> |
||||
<form class="form-inline" style="margin: 0px"> |
||||
<label class="checkbox inline" for="page-action-enabled-edit"><input type="checkbox" id="page-action-enabled-edit">{{ 'header.show_zone'|trans({}, 'SonataPageBundle') }}</label> |
||||
<input type="submit" class="btn" value="{{ 'btn_save_position'|trans({}, 'SonataPageBundle') }}" id="page-action-save-position"> |
||||
</form> |
||||
</li> |
||||
{% endif %} |
||||
{% endif %} |
||||
|
||||
{% if app.user and is_granted('ROLE_PREVIOUS_ADMIN') %} |
||||
<li><a href="{{ url('homepage', {'_switch_user': '_exit'}) }}">{{ "header.switch_user_exit"|trans({}, 'SonataPageBundle')}}</a></li> |
||||
{% endif %} |
||||
|
||||
</ul> |
||||
</div> |
||||
</header> |
||||
|
||||
{% endif %} |
||||
{% endblock %} |
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_container %} |
||||
{% block page_container %}{% endblock %} {# Deprecated block #} |
||||
{% endblock %} |
||||
|
||||
{% block sonata_page_asset_footer %} |
||||
{% block page_asset_footer %} {# Deprecated block #} |
||||
{% if page is defined %} |
||||
{% if page.javascript is not empty %} |
||||
<script> |
||||
{{ page.javascript|raw }} |
||||
</script> |
||||
{% endif %} |
||||
{% if page.stylesheet is not empty %} |
||||
<style> |
||||
{{ page.stylesheet|raw }} |
||||
</style> |
||||
{% endif %} |
||||
{% endif %} |
||||
{# |
||||
These includes can be done only at this point as all blocks are loaded, |
||||
Limition : this does not work if a global page is loaded from an ESI tag inside a container block |
||||
#} |
||||
{{ sonata_block_include_stylesheets('screen', app.request.basePath) }} |
||||
{{ sonata_block_include_javascripts('screen', app.request.basePath) }} |
||||
{% endblock %} |
||||
{% endblock %} |
Loading…
Reference in new issue