Forráskód Böngészése

Fix ofaj footer/header after merge

jmontoyaa 7 éve
szülő
commit
30a5512996

+ 1 - 29
main/inc/lib/userportal.lib.php

@@ -879,7 +879,7 @@ class IndexManager
     /**
      * @return array
      */
-    public function return_profile_block($diagnosisComplete = null)
+    public function return_profile_block()
     {
         $userInfo = api_get_user_info();
         $userId = api_get_user_id();
@@ -977,34 +977,6 @@ class IndexManager
                 'title' => get_lang('VideoConference')
             ];
         }
-        // ofaj
-        /*$diagnosis = '';
-        if (api_is_drh() || api_is_student_boss()) {
-            $diagnosis = Display::url(get_lang('DiagnosisManagement'), api_get_path(WEB_PATH).'load_search.php').'<br />';
-            $diagnosis .= Display::url(get_lang('DiagnosticForm'), api_get_path(WEB_PATH).'search.php');
-        } else {
-            if (api_is_student()) {
-                if ($diagnosisComplete === false ||
-                    is_array($diagnosisComplete) && empty($diagnosisComplete['value'])
-                ) {
-                    $diagnosis = Display::url(
-                        get_lang('DiagnosticForm'),
-                        api_get_path(WEB_PATH).'search.php'
-                    );
-                }
-            }
-        }
-
-        if (!empty($diagnosis)) {
-            $html .= self::show_right_block(
-                get_lang('Diagnostic'),
-                $diagnosis,
-                'diagnosis_block',
-                null,
-                'diagnosis',
-                'diagnosisCollapse'
-            );
-        }*/
 
         return $items;
     }

+ 4 - 0
main/template/default/layout/layout_2_col.tpl

@@ -108,6 +108,10 @@
                 <!-- end block profile -->
                 {% endif %}
 
+                {% if diagnosis_block %}
+                    {{ diagnosis_block }}
+                {% endif %}
+
                 {% if course_block %}
                 <!-- block course -->
                 <div class="panel-group" id="course" role="tablist" aria-multiselectable="true">

+ 6 - 3
main/template/rainbow/layout/head.tpl

@@ -1,7 +1,7 @@
 <meta charset="{{ system_charset }}" />
 <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 href="https://www.gnu.org/licenses/gpl-3.0.en.html" rel="license" />
 <!-- Force latest IE rendering engine or ChromeFrame if installed -->
 <!--[if IE]>
 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
@@ -10,7 +10,9 @@
 {{ favico }}
 <link rel="apple-touch-icon" href="{{ _p.web }}apple-touch-icon.png" />
 <meta name="apple-mobile-web-app-capable" content="yes" />
-<meta name="Generator" content="{{ _s.software_name }} {{ _s.system_version|slice(0,1) }}" />
+<meta name="generator" content="{{ _s.software_name }} {{ _s.system_version|slice(0,1) }}" />
+{#  Use the latest engine in ie8/ie9 or use google chrome engine if available  #}
+{#  Improve usability in portal devices #}
 <meta name="viewport" content="width=device-width, initial-scale=1.0">
 <title>{{ title_string }}</title>
 {{ social_meta }}
@@ -18,6 +20,7 @@
 {{ js_file_to_string }}
 {{ extra_headers }}
 <script>
+
 /* Global chat variables */
 var ajax_url = '{{ _p.web_ajax }}chat.ajax.php';
 var online_button = '{{ online_button }}';
@@ -25,8 +28,8 @@ var offline_button = '{{ offline_button }}';
 var connect_lang = '{{ "ChatConnected"|get_lang }}';
 var disconnect_lang = '{{ "ChatDisconnected"|get_lang }}';
 </script>
+
 {% include template ~ '/layout/header.js.tpl' %}
 
 {{ css_custom_file_to_string }}
 {{ css_style_print }}
-{{ header_extra_content }}

+ 43 - 12
main/template/rainbow/layout/layout_1_col.tpl

@@ -1,16 +1,47 @@
-{% extends template ~ "/layout/main.tpl" %}
+{% extends template ~ "/layout/page.tpl" %}
+
 {% block body %}
-    <div class="container{{ fluid == true ? '-fluid':'' }}">
-        {% include template ~ "/layout/page_body.tpl" %}
-        {% block content %}
-            {% if content is not null %}
-                <section id="main_content" class="row">
-                    <div class="col-md-12">
+    {% if plugin_main_top %}
+        <div class="row">
+            <div id="plugin_main_top" class="col-md-12">
+                {{ plugin_main_top }}
+            </div>
+        </div>
+    {% endif %}
+    {% if plugin_content_top %}
+        <div class="row">
+            <div id="plugin_content_top" class="col-md-12">
+                {{ plugin_content_top }}
+            </div>
+        </div>
+    {% endif %}
+
+    <div class="row">
+        <div class="col-xs-12 col-md-12">
+            {% include template ~ "/layout/page_body.tpl" %}
+            {% block content %}
+                {% if content is not null %}
+                    <section id="main_content">
                         {{ content }}
-                    </div>
-                </section>
-            {% endif %}
-        {% endblock %}
-        &nbsp;
+                    </section>
+                {% endif %}
+            {% endblock %}
+        </div>
     </div>
+
+    {% if plugin_content_bottom %}
+        <div class="row">
+            <div id="plugin_content_bottom" class="col-md-12">
+                {{ plugin_content_bottom }}
+            </div>
+        </div>
+    {% endif %}
+
+    {% if plugin_main_bottom %}
+        <div class="row">
+            <div id="plugin_main_bottom" class="col-md-12">
+                {{ plugin_main_bottom }}
+            </div>
+        </div>
+    {% endif %}
 {% endblock %}

+ 323 - 131
main/template/rainbow/layout/layout_2_col.tpl

@@ -1,146 +1,338 @@
-{% extends template ~ "/layout/main.tpl" %}
+{% extends template ~ "/layout/page.tpl" %}
 
 {% block body %}
-{% if section_name != 'section-mycourses' %}
-<div class="container">
+    {% if plugin_main_top %}
+        <div class="row">
+            <div class="page-main-top" class="col-md-12">
+                {{ plugin_main_top }}
+            </div>
+        </div>
+    {% endif %}
     <div class="row">
-        <div class="col-md-3 menu-column">
-            {% block login_form %}
-                    {% if _u.logged  == 0 %}
-                            {% include template ~ "/layout/login_form.tpl" %}
+        <div class="col-md-9 col-md-push-3">
+            <div class="page-content">
+                {% if plugin_content_top %}
+                    <div class="page-content-top">
+                        {{ plugin_content_top }}
+                    </div>
+                {% endif %}
+
+                {{ sniff_notification }}
+
+                {% if home_page_block %}
+                    <article id="homepage-home">
+                        {{ home_page_block }}
+                    </article>
+                {% endif %}
+
+                {% block page_body %}
+                    {% include template ~ "/layout/page_body.tpl" %}
+                {% endblock %}
+
+                {% if welcome_to_course_block %}
+                    <article id="homepage-course">
+                        {{ welcome_to_course_block }}
+                    </article>
+                {% endif %}
+
+                {% block content %}
+                    {% if content is not null %}
+                        <section id="page" class="{{ course_history_page }}">
+                            {{ content }}
+                        </section>
                     {% endif %}
-            {% endblock %}
-            {% if _u.logged  == 1 %}
-                {{ user_image_block }}
-            {% endif %}
-            {{ profile_block }}
-        </div>
-        <div class="col-md-9">
-            {% if announcements_block %}
-                <section id="homepage-announcements">
-                {{ announcements_block }}
-                </section>
-            {% endif %}
+                {% endblock %}
+
+                {% if announcements_block %}
+                    <article id="homepage-announcements">
+                        {{ announcements_block }}
+                    </article>
+                {% endif %}
+
+                {% if course_category_block %}
+                    <article id="homepage-course-category">
+                        {{ course_category_block }}
+                    </article>
+                {% endif %}
+
+                {% if plugin_content_bottom %}
+                    <div id="plugin_content_bottom">
+                        {{ plugin_content_bottom }}
+                    </div>
+                {% endif %}
+            </div>
         </div>
-    </div>
-</div>
-<div class="container">
-    <div class="row">
-        <div class="col-md-12">
-            {% if home_page_block %}
-                <section id="homepage-home">
-                    {{ home_page_block }}
-                </section>
-            {% endif %}
-
-            <div id="latest_blocks"></div>
-
-            <!-- block statistics -->
-            <div class="statistics">
-                <div class="row">
-                    <div class="col-xs-4 col-md-4">
-                        <ul class="items">
-                            <li><i class="fa fa-user fa-4x icon-color" aria-hidden="true"></i></li>
-                            <li>
-                                <h2 class="number">{{ total_users }}</h2>
-                                <p class="text">{{ "RegisteredUsers"|get_lang }}</p>
-                            </li>
-                        </ul>
+        <div class="col-md-3 col-md-pull-9">
+            <div class="sidebar">
+                {% if plugin_menu_top %}
+                    <div class="siderbar-menu-top">
+                        {{ plugin_menu_top }}
                     </div>
-                    <div class="col-xs-4 col-md-4">
-                        <ul class="items">
-                            <li><i class="fa fa-book fa-4x icon-color" aria-hidden="true"></i></li>
-                            <li>
-                                <h2 class="number">{{ total_courses }}</h2>
-                                <p class="text">{{ "OpenCourses"|get_lang }}</p>
-                            </li>
-                        </ul>
+                {% endif %}
+
+                {% include template ~ "/layout/login_form.tpl" %}
+
+                {% if _u.logged  == 1 %}
+                    {{ user_image_block }}
+                {% endif %}
+
+                {% if profile_block %}
+                <!-- block profile -->
+                <div class="panel-group" id="profile" role="tablist" aria-multiselectable="true">
+                    <div class="panel panel-default" id="profile_block">
+                        <div class="panel-heading" role="tab">
+                            <h4 class="panel-title">
+                                <a role="button" data-toggle="collapse" data-parent="#profile" href="#profileCollapse" aria-expanded="true" aria-controls="profileCollapse">
+                                    {{ 'Profile' | get_lang }}
+                                </a>
+                            </h4>
+                        </div>
+                        <div style="" aria-expanded="true" id="profileCollapse" class="panel-collapse collapse in" role="tabpanel">
+                            <div class="panel-body">
+                                <ul class="list-group">
+                                    {% for item in profile_block %}
+                                    <li class="list-group-item {{ item.class }}">
+                                        <span class="item-icon">
+                                            {{ item.icon }}
+                                        </span>
+                                        <a href="{{ item.link }}">{{ item.title }}</a>
+                                    </li>
+                                    {% endfor %}
+                                </ul>
+                            </div>
+                        </div>
                     </div>
-                    <div class="col-xs-4 col-md-4">
-                        <ul class="items">
-                            <li><i class="fa fa-signal fa-4x icon-color" aria-hidden="true"></i></li>
-                            <li>
-                                <h2 class="number">{{ total_exercises }}</h2>
-                                <p class="text">{{ "Exercises"|get_lang }}</p>
-                            </li>
-                        </ul>
+                </div>
+                <!-- end block profile -->
+                {% endif %}
+
+                {% if course_block %}
+                <!-- block course -->
+                <div class="panel-group" id="course" role="tablist" aria-multiselectable="true">
+                    <div class="panel panel-default" id="course_block">
+                        <div class="panel-heading" role="tab">
+                            <h4 class="panel-title">
+                                <a role="button" data-toggle="collapse" data-parent="#course" href="#courseCollapse" aria-expanded="true" aria-controls="courseCollapse">
+                                    {{ 'Courses' | get_lang }}
+                                </a>
+                            </h4>
+                        </div>
+                        <div style="" aria-expanded="true" id="courseCollapse" class="panel-collapse collapse in" role="tabpanel">
+                            <div class="panel-body">
+                                <ul class="list-group">
+                                    {% for item in course_block %}
+                                    <li class="list-group-item {{ item.class }}">
+                                        <span class="item-icon">
+                                            {{ item.icon }}
+                                        </span>
+                                        <a href="{{ item.link }}">{{ item.title }}</a>
+                                    </li>
+                                    {% endfor %}
+                                </ul>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <!-- end block course -->
+                {% endif %}
+
+                {% if grade_book_sidebar %}
+                    <div class="panel-group" id="skill" role="tablist" aria-multiselectable="true">
+                    <div class="panel panel-default" id="gradebook_block">
+                        <div class="panel-heading" role="tab">
+                            <h4 class="panel-title">
+                                <a role="button" data-toggle="collapse" data-parent="#skill" href="#skillCollapse" aria-expanded="true" aria-controls="skillCollapse">
+                                    {{ 'Gradebook' | get_lang }}
+                                </a>
+                            </h4>
+                        </div>
+                        <div style="" aria-expanded="true" id="skillCollapse" class="panel-collapse collapse in" role="tabpanel">
+                            <div class="panel-body">
+                                <ul class="list-group">
+                                    <li class="list-group-item {{ item.class }}">
+                                        {{ 'Progress' | get_lang  }} : {{ grade_book_progress }} %
+                                        <br />
+                                        {% for badge in grade_book_badge_list %}
+                                            <div class="badge_sidebar">
+                                            {% for skill in badge.skills %}
+                                                {% if badge.finished %}
+                                                    <img class="badge_sidebar_image " src = "{{ skill.web_icon_path }}" />
+                                                {% else %}
+                                                    <img class="badge_sidebar_image badge_sidebar_image_transparency" src = "{{ skill.web_icon_path }}" />
+                                                {% endif %}
+                                                <div class="badge_sidebar_title">
+                                                {{ skill.name }}
+                                                </div>
+                                            {% endfor %}
+                                            </div>
+                                            {#<div class="badge_sidebar_title">#}
+                                            {#{{ badge.name }}#}
+                                            {#</div>#}
+                                        {% endfor %}
+                                    </li>
+                                </ul>
+                            </div>
+                        </div>
                     </div>
                 </div>
+
+                {% endif %}
+
+                {% if skills_block %}
+                <!-- block skills -->
+                <div class="panel-group" id="skill" role="tablist" aria-multiselectable="true">
+                    <div class="panel panel-default" id="skill_block">
+                        <div class="panel-heading" role="tab">
+                            <h4 class="panel-title">
+                                <a role="button" data-toggle="collapse" data-parent="#skill" href="#skillCollapse" aria-expanded="true" aria-controls="skillCollapse">
+                                    {{ 'Skills' | get_lang }}
+                                </a>
+                            </h4>
+                        </div>
+                        <div style="" aria-expanded="true" id="skillCollapse" class="panel-collapse collapse in" role="tabpanel">
+                            <div class="panel-body">
+                                <ul class="list-group">
+                                    {% for item in skills_block %}
+                                    <li class="list-group-item {{ item.class }}">
+                                        <span class="item-icon">
+                                            {{ item.icon }}
+                                        </span>
+                                        <a href="{{ item.link }}">{{ item.title }}</a>
+                                    </li>
+                                    {% endfor %}
+                                </ul>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                <!-- end block skills -->
+                {% endif %}
+
+                {{ teacher_block }}
+                {{ certificates_search_block }}
+                {{ notice_block }}
+                {{ help_block }}
+
+                <!-- block navigation -->
+                {% if navigation_course_links %}
+                <div class="panel-group" id="menu" role="tablist" aria-multiselectable="true">
+                    <div class="panel panel-default" id="menu_block">
+                        <div class="panel-heading" role="tab">
+                            <h4 class="panel-title">
+                                <a role="button" data-toggle="collapse" data-parent="#menu" href="#menuCollapse" aria-expanded="true" aria-controls="menuCollapse">
+                                    {{ 'MainNavigation' | get_lang }}
+                                </a>
+                            </h4>
+                        </div>
+                        <div style="" aria-expanded="true" id="menuCollapse" class="panel-collapse collapse in" role="tabpanel">
+                            <div class="panel-body">
+                                <ul class="nav nav-pills nav-stacked">
+                                    {% for item in navigation_course_links %}
+                                    <li>
+                                        <a href="{{ item.link }}">{{ item.title }}</a>
+                                    </li>
+                                    {% endfor %}
+                                </ul>
+                            </div>
+                        </div>
+                    </div>
+                </div>
+                {% endif %}
+                <!-- end block navigation -->
+
+                {{ search_block }}
+                {{ classes_block }}
+
+                {% if plugin_menu_bottom %}
+                    <div class="sidebar-menu-bottom">
+                        {{ plugin_menu_bottom }}
+                    </div>
+                {% endif %}
             </div>
-            <!-- end block statistics -->
-
-            <!-- HOT COURSE -->
-            {% include template ~ "/layout/hot_courses.tpl" %}
-            <!-- END HOT COURSE -->
-            <!-- CMS -->
-
-            {#{% include template ~ "/layout/cms.tpl" %}#}
-            <script>
-            $(document).ready(function() {
-                $.ajax({
-                    url: "{{ _p.web_url }}{{ document_language }}-{{ document_language }}/cms/page/latest/3?_locale={{ document_language }}",
-                    success: function (data) {
-                        $('#latest_pages').html(data);
-                    }
+        </div>
+    </div>
+
+    <div class="container">
+        <div class="row">
+            <div class="col-md-12">
+                {% if home_page_block %}
+                    <section id="homepage-home">
+                        {{ home_page_block }}
+                    </section>
+                {% endif %}
+
+                <div id="latest_blocks"></div>
+
+                <!-- block statistics -->
+                <div class="statistics">
+                    <div class="row">
+                        <div class="col-xs-4 col-md-4">
+                            <ul class="items">
+                                <li><i class="fa fa-user fa-4x icon-color" aria-hidden="true"></i></li>
+                                <li>
+                                    <h2 class="number">{{ total_users }}</h2>
+                                    <p class="text">{{ "RegisteredUsers"|get_lang }}</p>
+                                </li>
+                            </ul>
+                        </div>
+                        <div class="col-xs-4 col-md-4">
+                            <ul class="items">
+                                <li><i class="fa fa-book fa-4x icon-color" aria-hidden="true"></i></li>
+                                <li>
+                                    <h2 class="number">{{ total_courses }}</h2>
+                                    <p class="text">{{ "OpenCourses"|get_lang }}</p>
+                                </li>
+                            </ul>
+                        </div>
+                        <div class="col-xs-4 col-md-4">
+                            <ul class="items">
+                                <li><i class="fa fa-signal fa-4x icon-color" aria-hidden="true"></i></li>
+                                <li>
+                                    <h2 class="number">{{ total_exercises }}</h2>
+                                    <p class="text">{{ "Exercises"|get_lang }}</p>
+                                </li>
+                            </ul>
+                        </div>
+                    </div>
+                </div>
+                <!-- end block statistics -->
+
+                <!-- HOT COURSE -->
+                {% include template ~ "/layout/hot_courses.tpl" %}
+                <!-- END HOT COURSE -->
+                <!-- CMS -->
+
+                {#{% include template ~ "/layout/cms.tpl" %}#}
+                <script>
+                $(document).ready(function() {
+                    $.ajax({
+                        url: "{{ _p.web_url }}{{ document_language }}-{{ document_language }}/cms/page/latest/3?_locale={{ document_language }}",
+                        success: function (data) {
+                            $('#latest_pages').html(data);
+                        }
+                    });
                 });
-            });
-
-            $(document).ready(function() {
-                $.ajax({
-                    url: "{{ _p.web_url }}{{ document_language }}-{{ document_language }}/cms/page/blocks/4?_locale={{ document_language }}",
-                    success: function (data) {
-                        $('#latest_blocks').html(data);
-                    }
+
+                $(document).ready(function() {
+                    $.ajax({
+                        url: "{{ _p.web_url }}{{ document_language }}-{{ document_language }}/cms/page/blocks/4?_locale={{ document_language }}",
+                        success: function (data) {
+                            $('#latest_blocks').html(data);
+                        }
+                    });
                 });
-            });
-            </script>
-            <div id="latest_pages"></div>
-            <!-- END CSS -->
+                </script>
+                <div id="latest_pages"></div>
+                <!-- END CSS -->
+            </div>
         </div>
     </div>
-</div>
-{% endif %}
-
-{% if section_name != 'section-mycampus' %}
-<div class="container">
-<div class="row">
-    <div class="col-md-3 menu-column">
-        {% if _u.logged  == 1 %}
-            {{ user_image_block }}
-        {% endif %}
-        {{ profile_block }}
-        {{ course_block }}
-        {{ skills_block }}
-        {{ certificates_search_block }}
-    </div>
-    <div class="col-md-9">
-        {{ sniff_notification }}
-
-        {% block page_body %}
-        {% include template ~ "/layout/page_body.tpl" %}
-        {% endblock %}
-
-        {% if welcome_to_course_block %}
-            <section id="homepage-course">
-            {{ welcome_to_course_block }}
-            </section>
-        {% endif %}
-
-        {% block content %}
-        {% if content is not null %}
-            <section id="page-content" class="{{ course_history_page }}">
-                {{ content }}
-            </section>
-        {% endif %}
-        {% endblock %}
-
-        {% if course_category_block %}
-            <section id="homepage-course-category">
-                {{ course_category_block }}
-            </section>
-        {% endif %}
-    </div>
-</div>
-</div>
-{% endif %}
+
+    {% if plugin_main_bottom %}
+        <div class="row">
+            <div class="page-main-bottom" class="col-md-12">
+                {{ plugin_main_bottom }}
+            </div>
+        </div>
+    {% endif %}
 {% endblock %}

+ 5 - 3
main/template/rainbow/layout/page.tpl

@@ -6,7 +6,7 @@
 <html lang="{{ document_language }}" class="no-js"> <!--<![endif]-->
 <head>
 {% block head %}
-    {% include template ~ "/layout/head.tpl" %}
+{% include template ~ "/layout/head.tpl" %}
 {% endblock %}
 </head>
 <body dir="{{ text_direction }}" class="{{ section_name }} {{ login_class }}">
@@ -44,9 +44,11 @@
 	<section id="content-section">
         <div class="container">
             {% block breadcrumb %}
-                {{ breadcrumb }}
+                <div id="page-breadcrumb">
+                    {{ breadcrumb }}
+                </div>
             {% endblock %}
-            
+
             {% block body %}
                 {{ content }}
             {% endblock %}

+ 42 - 48
main/template/rainbow/layout/page_footer.tpl

@@ -1,67 +1,61 @@
-<footer id="footer-section" class="sticky-footer bgfooter">
-    <div class="container">
-        <div class="pre-footer">
-            {% if plugin_pre_footer is not null %}
-            <div id="plugin_pre_footer">
+<footer class="sticky-footer"> <!-- start of #footer section -->
+    <div class="pre-footer">
+        {% if plugin_pre_footer is not null %}
+            <div id="plugin_pre_footer" class="text-center">
                 {{ plugin_pre_footer }}
             </div>
-            {% endif %}
-        </div>
-        <div class="sub-footer">
-            <div class="row">
-                <div class="col-md-4">
-                    {% if session_teachers is not null %}
+        {% endif %}
+    </div>
+    <div class="sub-footer">
+    <div class="container">
+        <div class="row">
+            <div id="footer_left" class="col-md-8">
+                <div class="partners">
+                    <a href="http://www.bosch-stiftung.de" target="_blank">
+                        <img src="{{ _p.web_css_theme }}images/rbs_logo_rgb.png"/>
+                    </a>
+                    <a href="http://www.cavilam.com" target="_blank">
+                        <img src="{{ _p.web_css_theme }}images/logo_cavilam.png"/>
+                    </a>
+                    <a href="http://www.dw.com" target="_blank">
+                        <img src="{{ _p.web_css_theme }}images/logo-dw.png"/>
+                    </a>
+                </div>
+            </div>
+            <div id="footer_right" class="col-md-4">
+                {% if session_teachers is not null %}
                     <div class="session-teachers">
                         {{ session_teachers }}
                     </div>
-                    {% endif %}
-                    {% if teachers is not null %}
-                    <div class="teachers">
+                {% endif %}
+                {% if teachers is not null %}
+                    <div id="teachers">
                         {{ teachers }}
                     </div>
-                    {% endif %}
-                    {% if plugin_footer_left is not null %}
-                    <div id="plugin_footer_left">
-                        {{ plugin_footer_left }}
+                {% endif %}
+                {% if administrator_name is not null %}
+                    <div id="admin_name">
+                        <a href="{{ "URLOFAJ" | get_lang }}">{{ "OFAJ" | get_lang }}</a>
                     </div>
-                    {% endif %}
+                {% endif %}
+                <div id="software_name">
+	                <a href="{{_p.web}}" target="_blank">{{ "PoweredByX" |get_lang | format(_s.software_name) }}</a>
+                    &copy; {{ "now"|date("Y") }}
                 </div>
-                <div class="col-md-4">
-                    {% if plugin_footer_center is not null %}
-                    <div id="plugin_footer_center">
-                        {{ plugin_footer_center }}
-                    </div>
-                    {% endif %}
+                <div id="mentions_legales">
+                        <a href="{{_p.web}}{{ "MentionsLegalesLink" |get_lang }}" target="_blank">{{ "MentionsLegales" |get_lang }}</a> - <a href="{{_p.web}}{{ "CGULink" |get_lang }}" target="_blank">{{ "CGU" |get_lang }}</a>
                 </div>
-                <div class="col-md-4 text-right">
-                    {% if administrator_name is not null %}
-                    <div class="administrator-name">
-                        {{ administrator_name }}
-                    </div>
-                    {% endif %}
-
-                    {% if _s.software_name is not empty %}
-                        <div class="software-name">
-                            <a href="{{_p.web}}" target="_blank">
-                                {{ "PoweredByX" |get_lang | format(_s.software_name) }}
-                            </a>&copy; {{ "now"|date("Y") }}
-                        </div>
-                    {% endif %}
-
-                    {% if plugin_footer_right is not null %}
-                    <div id="plugin_footer_right">
-                        {{ plugin_footer_right }}
-                    </div>
-                    {% endif %}
-                </div>
-            </div>
-        </div>
+                &nbsp;
+            </div><!-- end of #footer_right -->
+        </div><!-- end of #row -->
         <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">
     <div class="modal-dialog modal-lg">
         <div class="modal-content">

+ 45 - 36
main/template/rainbow/layout/page_header.tpl

@@ -2,53 +2,62 @@
     {{ help_content }}
     {{ bug_notification }}
 </div>
-    {% block topbar %}
-        {% include template ~ "/layout/topbar.tpl" %}
-    {% endblock %}
+{% block topbar %}
+    {% include template ~ "/layout/topbar.tpl" %}
+{% endblock %}
 <div class="extra-header">{{ header_extra_content }}</div>
-<header id="header-section">
-<section>
+<header id="header-section" class="header-movil">
     <div class="container">
-	<div class="row">
-	    <div class="col-md-3">
-	    	<div class="logo">
-                {{ logo }}
-            </div>
-	    </div>
-            <div class="col-md-9">
-                <div class="col-sm-4">
-                    {% if plugin_header_left is not null %}
-                    <div id="plugin_header_left">
-                        {{ plugin_header_left }}
-                    </div>
-                    {% endif %}
+        <div class="row">
+            <div class="col-md-3">
+                <div class="logo">
+                    {{ logo }}
                 </div>
-                <div class="col-sm-4">
-                    {% if plugin_header_center is not null %}
-                    <div id="plugin_header_center">
-                        {{ plugin_header_center }}
+            </div>
+            <div class="col-md-6">
+                <div class="row">
+                    <div class="col-sm-4">
+                        {% if plugin_header_left is not null %}
+                            <div id="plugin_header_left">
+                                {{ plugin_header_left }}
+                            </div>
+                        {% endif %}
                     </div>
-                    {% endif %}
-                </div>
-                <div class="col-sm-4">
-                    {% if plugin_header_right is not null %}
-                    <div id="plugin_header_right">
-                        {{ plugin_header_right }}
+                    <div class="col-sm-4">
+                        {% if plugin_header_center is not null %}
+                            <div id="plugin_header_center">
+                                {{ plugin_header_center }}
+                            </div>
+                        {% endif %}
                     </div>
-                    {% endif %}
-                    <div class="section-notifications">
-                        <ul id="notifications" class="nav nav-pills pull-right">
-                            {{ notification_menu }}
-                        </ul>
+                    <div class="col-sm-4">
+                        {% if plugin_header_right is not null %}
+                            <div id="plugin_header_right">
+                                {{ plugin_header_right }}
+                            </div>
+                        {% endif %}
+                        <script>
+                            $(document).on('ready', function () {
+                                $("#notifications").load("{{ _p.web_main }}inc/ajax/online.ajax.php?a=get_users_online");
+                            });
+                        </script>
+                        <div class="section-notifications">
+                            <ul id="notifications" class="nav nav-pills pull-right">
+                            </ul>
+                        </div>
+                        {{ accessibility }}
                     </div>
-                    {{ accessibility }}
+                </div>
+            </div>
+             <div class="col-md-3">
+                 <div class="logo-ofaj pull-right">
+                    <a href="#"><img class="img-responsive" src="{{ _p.web_css_theme }}images/logo-ofaj.png"/></a>
                 </div>
             </div>
         </div>
     </div>
-</section>
+</header>
 {% block menu %}
     {% include template ~ "/layout/menu.tpl" %}
 {% endblock %}
-</header>
 {% include template ~ "/layout/course_navigation.tpl" %}

+ 31 - 1
user_portal.php

@@ -300,7 +300,37 @@ if (api_is_student()) {
     }
 }
 
-$controller->tpl->assign('profile_block', $controller->return_profile_block($diagnosisComplete));
+// ofaj
+$diagnosis = '';
+if (api_is_drh() || api_is_student_boss()) {
+    $diagnosis = Display::url(get_lang('DiagnosisManagement'), api_get_path(WEB_PATH).'load_search.php').'<br />';
+    $diagnosis .= Display::url(get_lang('DiagnosticForm'), api_get_path(WEB_PATH).'search.php');
+} else {
+    if (api_is_student()) {
+        if ($diagnosisComplete === false ||
+            is_array($diagnosisComplete) && empty($diagnosisComplete['value'])
+        ) {
+            $diagnosis = Display::url(
+                get_lang('DiagnosticForm'),
+                api_get_path(WEB_PATH).'search.php'
+            );
+        }
+    }
+}
+$block = '';
+if (!empty($diagnosis)) {
+    $block .= $controller->show_right_block(
+        get_lang('Diagnostic'),
+        $diagnosis,
+        'diagnosis_block',
+        null,
+        'diagnosis',
+        'diagnosisCollapse'
+    );
+}
+
+$controller->tpl->assign('diagnosis_block', $block);
+$controller->tpl->assign('profile_block', $controller->return_profile_block());
 $controller->tpl->assign('user_image_block', $controller->return_user_image_block());
 $controller->tpl->assign('course_block', $controller->return_course_block());
 $controller->tpl->assign('navigation_course_links', $controller->return_navigation_links());