Skip to content

Commit

Permalink
new structure tpl chamilo 1.11.x BT#11338
Browse files Browse the repository at this point in the history
  • Loading branch information
aragonc committed Jun 30, 2016
1 parent 00f16d6 commit d6f2768
Show file tree
Hide file tree
Showing 12 changed files with 126 additions and 294 deletions.
34 changes: 13 additions & 21 deletions app/Resources/public/css/base.css
Expand Up @@ -9,29 +9,21 @@
yannik.warnier@beeznest.com
Version: 1.0
*/
pre {
margin-top:50px !important;
}
html,body {
margin: 0;
padding: 0;
height: 100%;
}
#page-wrap{
min-height: 100%;
margin-bottom: 0;
}
#page-wrap:after{
content: "";
display: block;
clear: both;
html{
position: relative;
min-height: 100%;
}
footer {
padding-top: 15px;
body{
margin-bottom: 60px;
}
footer #footer_right{
text-align: right;
/* Sticky footer style */
.sticky-footer{
position: absolute;
bottom: 0;
width: 100%;
height: 60px;
}
/* End Sticky footer style */
select {
width : auto;
}
Expand Down Expand Up @@ -5917,7 +5909,7 @@ a.sessionView {
}
@media (min-width:320px) and (max-width: 479px){
footer {
height: 12em;

padding-top: 15px;
}
footer #footer_right{
Expand Down
86 changes: 39 additions & 47 deletions main/template/default/layout/footer.tpl
@@ -1,69 +1,61 @@
{# Plugins for pref footer section #}
{% if plugin_pre_footer is not null %}
<div id="plugin_pre_footer">
{{ plugin_pre_footer }}
</div>
{% endif %}

<footer> <!-- start of #footer section -->
<footer id="footer-section" class="sticky-footer">
<div class="container">
<div class="row">
<div id="footer_left" class="col-md-4">
{% if session_teachers is not null %}
<div id="session_teachers">
<div class="pre-footer">
{% if plugin_pre_footer is not null %}
<div id="plugin_pre_footer">
{{ plugin_pre_footer }}
</div>
{% endif %}
</div>
<div class="sub-footer">
<div class="row">
<div class="col-md-4">
{% if session_teachers is not null %}
<div class="session-teachers">
{{ session_teachers }}
</div>
{% endif %}

{% if teachers is not null %}
<div id="teachers">
{% endif %}
{% if teachers is not null %}
<div class="teachers">
{{ teachers }}
</div>
{% endif %}

{# Plugins for footer section #}
{% if plugin_footer_left is not null %}
{% endif %}
{% if plugin_footer_left is not null %}
<div id="plugin_footer_left">
{{ plugin_footer_left }}
</div>
{% endif %}
&nbsp;
</div>

<div id="footer_center" class="col-md-4">
{# Plugins for footer section #}
{% if plugin_footer_center is not null %}
{% endif %}
</div>
<div class="col-md-4">
{% if plugin_footer_center is not null %}
<div id="plugin_footer_center">
{{ plugin_footer_center }}
</div>
{% endif %}
&nbsp;
</div>

<div id="footer_right" class="col-md-4">
{% if administrator_name is not null %}
<div id="admin_name">
{% endif %}
</div>
<div class="col-md-4">
{% if administrator_name is not null %}
<div class="administrator-name">
{{ administrator_name }}
</div>
{% endif %}

<div id="software_name">
<a href="{{_p.web}}" target="_blank">{{ "PoweredByX" |get_lang | format(_s.software_name) }}</a>
&copy; {{ "now"|date("Y") }}
</div>
{# Plugins for footer section #}
{% if plugin_footer_right is not null %}
{% endif %}
<div class="software-name">
<a href="{{_p.web}}" target="_blank">
{{ "PoweredByX" |get_lang | format(_s.software_name) }}
</a>&copy; {{ "now"|date("Y") }}
</div>
{% if plugin_footer_right is not null %}
<div id="plugin_footer_right">
{{ plugin_footer_right }}
</div>
{% endif %}
&nbsp;
</div><!-- end of #footer_right -->
</div><!-- end of #row -->
{% endif %}
</div>
</div>
</div>
<div class="extra-footer">
{{ footer_extra_content }}
</div>
</div><!-- end of #container -->
</div>
</footer>

<div class="modal fade" id="expand-image-modal" tabindex="-1" role="dialog" aria-labelledby="expand-image-modal-title" aria-hidden="true">
Expand Down
4 changes: 1 addition & 3 deletions main/template/default/layout/head.tpl
Expand Up @@ -6,7 +6,6 @@
<!--[if IE]>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<![endif]-->

{{ prefetch }}
{{ favico }}
<link rel="apple-touch-icon" href="{{ _p.web }}apple-touch-icon.png" />
Expand All @@ -33,6 +32,5 @@ var disconnect_lang = '{{ "ChatDisconnected"|get_lang }}';
{% include template ~ '/layout/header.js.tpl' %}

{{ css_custom_file_to_string }}
{{ css_style_print }}
{# Extra header configured in admin section, only shown to non-admins #}
{{ css_style_print }}11
{{ header_extra_content }}
22 changes: 6 additions & 16 deletions main/template/default/layout/header.js.tpl
Expand Up @@ -82,15 +82,11 @@ $(document).ready(function(){
$("#student-list-work").fadeOut(300);
});
check_brand();
var id;
$(window).resize(function() {
clearTimeout(id);
id = setTimeout(doneResizing, 200);
});
var id;
$(window).resize(function() {
clearTimeout(id);
id = setTimeout(doneResizing, 200);
});
function doneResizing(){
var widhtWindow = $(window).width();
Expand All @@ -108,13 +104,7 @@ function doneResizing(){
$("#user_image_block").addClass("invisible");
}
};
/* if($('#toolbar-admin').length){
var heigthToolBar= $('#toolbar-admin').height();
$('header').css('margin-top', heigthToolBar+'px');
$('#page-back').css('padding-top', heigthToolBar+20+'px');
} */
// Removes the yellow input in Chrome
// Removes the yellow input in Chrome
if (navigator.userAgent.toLowerCase().indexOf("chrome") >= 0) {
$(window).load(function(){
$('input:-webkit-autofill').each(function(){
Expand Down
3 changes: 1 addition & 2 deletions main/template/default/layout/layout_1_col.tpl
@@ -1,6 +1,5 @@
{% extends template ~ "/layout/main.tpl" %}
{% extends template ~ "/layout/page.tpl" %}

{# 1 column #}
{% block body %}
{# Plugin main top #}
{% if plugin_main_top %}
Expand Down
73 changes: 15 additions & 58 deletions main/template/default/layout/layout_2_col.tpl
@@ -1,98 +1,60 @@
{% extends template ~ "/layout/main.tpl" %}
{% extends template ~ "/layout/page.tpl" %}

{% block body %}
{# Main content #}

{# Plugin main top #}
{% if plugin_main_top %}
<div id="plugin_main_top" class="col-md-12">
{{ plugin_main_top }}
</div>
{% endif %}

{# Right column #}
<div class="col-md-3 menu-column">
{% if plugin_menu_top %}
<div id="plugin_menu_top">
{{plugin_menu_top}}
</div>
{% endif %}

{# if user is not login show the login form #}
{% block login_form %}
{% if _u.logged == 0 %}
{% include template ~ "/layout/login_form.tpl" %}
{% endif %}
{% endblock %}

{# User picture #}
{% if _u.logged == 1 %}
{{ user_image_block }}
{% endif %}
{# User Profile links #}
{{ profile_block }}


{# Course block - admin #}
{{ course_block }}

{# Course block - teacher #}
{{ teacher_block }}

{# Skills #}
{{ profile_block }}
{{ course_block }}
{{ teacher_block }}
{{ skills_block }}

{# Certificates search block #}
{{ certificates_search_block }}

{# Notice #}
{{ notice_block }}

{# Help #}
{{ help_block }}

{# Links that are not added in the tabs #}
{{ navigation_course_links }}

{# Search (xapian) #}
{{ search_block }}

{# Classes #}
{{ classes_block }}

{# Plugin courses sidebar #}
{# Plugins for footer section #}

{{ notice_block }}
{{ help_block }}
{{ navigation_course_links }}
{{ search_block }}
{{ classes_block }}

{% if plugin_menu_bottom %}
<div id="plugin_menu_bottom">
{{ plugin_menu_bottom }}
</div>
{% endif %}
</div>

<div class="col-md-9">
{# Plugin bottom #}
{% if plugin_content_top %}
<div id="plugin_content_top">
{{ plugin_content_top }}
</div>
{% endif %}

{# Portal homepage #}
{% if home_page_block %}
<section id="homepage-home">
{{ home_page_block }}
</section>
{% endif %}

{# ?? #}
{{ sniff_notification }}


{{ sniff_notification }}

{% block page_body %}
{% include template ~ "/layout/page_body.tpl" %}
{% endblock %}

{# Welcome to course block #}

{% if welcome_to_course_block %}
<section id="homepage-course">
{{ welcome_to_course_block }}
Expand All @@ -107,24 +69,20 @@
{% endif %}
{% endblock %}

{# Announcements #}
{% if announcements_block %}
<section id="homepage-announcements">
{{ announcements_block }}
</section>
{% endif %}

{# Course categories (must be turned on in the admin settings) #}
{% if course_category_block %}
<section id="homepage-course-category">
{{ course_category_block }}
</section>
{% endif %}

{# Hot courses template #}
{% include template ~ "/layout/hot_courses.tpl" %}
{% include template ~ "/layout/hot_courses.tpl" %}

{# Content bottom #}
{% if plugin_content_bottom %}
<div id="plugin_content_bottom">
{{plugin_content_bottom}}
Expand All @@ -133,7 +91,6 @@
&nbsp;
</div>

{# Plugin main bottom #}
{% if plugin_main_bottom %}
<div id="plugin_main_bottom" class="col-md-12">
{{ plugin_main_bottom }}
Expand Down
4 changes: 2 additions & 2 deletions main/template/default/layout/layout_3_col.tpl
@@ -1,5 +1,5 @@
{# This template is NOT used in chamilo 1.9 #}
{% extends template ~ "/layout/main.tpl" %}

{% extends template ~ "/layout/page.tpl" %}

{% block body %}
<div id="maincontent" class="maincontent">
Expand Down
19 changes: 0 additions & 19 deletions main/template/default/layout/main.tpl

This file was deleted.

0 comments on commit d6f2768

Please sign in to comment.