Add liip_theme in order to handel chamilo templates

pull/2528/head
jmontoyaa 8 years ago
parent 2da1d004c1
commit c24343b2f0
  1. 1
      config/bundles.php
  2. 6
      config/packages/liip_theme.yaml
  3. 7
      config/routes.yaml
  4. 8
      main/inc/lib/template.lib.php
  5. 2
      main/template/default/social/edit_profile.html.twig
  6. 52
      src/ThemeBundle/Resources/views/Default/form.html.twig
  7. 1
      src/ThemeBundle/Resources/views/Default/index.html.twig
  8. 0
      src/ThemeBundle/Resources/views/Layout/blank.html.twig
  9. 0
      src/ThemeBundle/Resources/views/Layout/blank_no_header.html.twig
  10. 1
      src/ThemeBundle/Resources/views/Layout/layout_two_col.html.twig
  11. 9
      templates/themes/default/ChamiloThemeBundle/Layout/layout_one_col.html.twig.dist
  12. 7
      templates/themes/default/ChamiloThemeBundle/Layout/layout_two_col.html.twig.dist

@ -64,4 +64,5 @@ return [
Knp\Bundle\MarkdownBundle\KnpMarkdownBundle::class => ['all' => true],
Sonata\FormatterBundle\SonataFormatterBundle::class => ['all' => true],
HWI\Bundle\OAuthBundle\HWIOAuthBundle::class => ['all' => true],
Liip\ThemeBundle\LiipThemeBundle::class => ['all' => true],
];

@ -0,0 +1,6 @@
liip_theme:
themes: ['default', 'my_theme']
active_theme: 'default'
path_patterns:
bundle_resource:
- '%kernel.root_dir%/../templates/themes/%%current_theme%%/%%bundle_name%%/%%template%%'

@ -40,9 +40,10 @@ _admin:
#_api:
# resource: routing_api.yml
# prefix: /api
#liip_theme:
# resource: "@LiipThemeBundle/Resources/config/routing.xml"
# prefix: /theme
liip_theme:
resource: "@LiipThemeBundle/Resources/config/routing.xml"
prefix: /theme
#app_settings:
# resource: |

@ -420,8 +420,8 @@ class Template
*/
public function display_blank_template()
{
$tpl = $this->get_template('layout/blank.tpl');
$this->display($tpl);
$template = '@ChamiloTheme/Layout/blank.html.twig';
$this->returnResponse($this->params, $template);
}
/**
@ -429,8 +429,8 @@ class Template
*/
public function displayBlankTemplateNoHeader()
{
$tpl = $this->get_template('layout/blank_no_header.tpl');
$this->display($tpl);
$template = '@ChamiloTheme/Layout/blank_no_header.html.twig';
$this->returnResponse($this->params, $template);
}
/**

@ -1,4 +1,4 @@
{% extends template ~ "/layout/layout_1_col.html.twig" %}
{% extends "@ChamiloTheme/Layout/layout_one_col.html.twig" %}
{% block content %}
{% autoescape false %}

@ -1,52 +0,0 @@
{% extends '@ChamiloTheme/Layout/base-layout.html.twig' %}
{% block page_content %}
<div class="row">
<div class="col-md-4">
</div>
<div class="col-md-4">
</div>
<div class="col-md-4">
</div>
</div>
<div class="row">
<div class="col-md-6">
<div class="box box-primary">
<div class="box-header">
<h3 class="box-title">Form Theme</h3>
</div>
<div class="box-body">
{{ form(form) }}
</div>
<div class="box-footer">
<div class="pull-right">
<button type="reset" class="btn">Cancel</button>
<button type="submit" class="btn btn-primary">Submit</button>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<div class="box box-solid box-primary">
{{ macro.box_header('built from macro', true, false, 'primary') }}
<div class="box-body">
some content...
</div>
</div>
</div>
</div>
{% endblock %}
{% block page_title %} Forms {% endblock %}
{% block page_subtitle %} demonstration {% endblock %}

@ -1 +0,0 @@
{% extends '@ChamiloTheme/Layout/base-layout.html.twig' %}

@ -5,7 +5,6 @@
app.request.attributes.get('_route_params'))
%}
{% set pathInfo = 1 %}
{% block page_content %}
{% autoescape false %}
{% if plugin_main_top %}

@ -0,0 +1,9 @@
{% extends '@ChamiloTheme/Layout/base-layout.html.twig' %}
{# Edit the default chamilo template #}
{% block page_content %}
{{ parent() }}
{% endblock %}

@ -0,0 +1,7 @@
{% extends '@ChamiloTheme/Layout/base-layout.html.twig' %}
{# Edit the default chamilo template #}
{% block page_content %}
{{ parent() }}
{% endblock %}
Loading…
Cancel
Save