Browse Source

UI changes see BT#13590

- new css class added "course_section_title"
- get correction session image
jmontoyaa 7 years ago
parent
commit
eebca20f5e

+ 5 - 0
app/Resources/public/css/themes/rainbow/default.css

@@ -1948,3 +1948,8 @@ blockquote p {
 .future_session a {
     color: #666 !important;
 }
+
+.course_section_title {
+    color: #162A83;
+    font-weight: bold;
+}

+ 12 - 3
main/inc/lib/userportal.lib.php

@@ -1396,7 +1396,7 @@ class IndexManager
                 }
                 $this->tpl->assign('courses', $specialCourses);
                 // Ofaj
-                $specialCourseList = '<h4>'.get_lang('Mytools').'</h4><hr />';
+                $specialCourseList = '<h4 class="course_section_title">'.get_lang('Mytools').'</h4><hr />';
                 $specialCourseList .= $this->tpl->fetch(
                     $this->tpl->get_template($coursesWithoutCategoryTemplate)
                 );
@@ -1429,7 +1429,7 @@ class IndexManager
 
                 $listCourse = $this->tpl->fetch($this->tpl->get_template($coursesWithCategoryTemplate));
                 // ofaj
-                $listCourse .= '<h4>'.get_lang('MyCourses').'</h4><hr />';
+                $listCourse .= '<h4 class="course_section_title">'.get_lang('MyCourses').'</h4><hr />';
                 $listCourse .= $this->tpl->fetch($this->tpl->get_template($coursesWithoutCategoryTemplate));
             }
 
@@ -1759,6 +1759,13 @@ class IndexManager
                                 // Category
                                 if ($count > 0) {
                                     $session_box = Display::get_session_title_box($session_id);
+                                    // ofaj
+                                    $extraFieldValue = new ExtraFieldValue('session');
+                                    $imageField = $extraFieldValue->get_values_by_handler_and_field_variable(
+                                        $session_id,
+                                        'image'
+                                    );
+
                                     $sessionParams[0]['id'] = $session_id;
                                     $sessionParams[0]['date'] = $session_box['dates'];
                                     $sessionParams[0]['duration'] = isset($session_box['duration']) ? ' '.$session_box['duration'] : null;
@@ -1769,8 +1776,10 @@ class IndexManager
                                     $sessionParams[0]['courses'] = $html_courses_session;
                                     $sessionParams[0]['show_simple_session_info'] = $showSimpleSessionInfo;
                                     $sessionParams[0]['coach_name'] = !empty($session_box['coach']) ? $session_box['coach'] : null;
+                                    // ofaj
                                     $sessionParams[0]['is_old'] = $markAsOld;
                                     $sessionParams[0]['is_future'] = $markAsFuture;
+                                    $sessionParams[0]['image'] = isset($imageField['value']) ? $imageField['value'] : null;
 
                                     $actions = api_get_path(WEB_CODE_PATH).'session/resume_session.php?id_session='.$session_id;
                                     // Ofaj fix see BT#12325 1 session has 1 course
@@ -1872,7 +1881,7 @@ class IndexManager
                     // ofaj
                     $sessions_with_no_category = '';
                     if (!empty($listSession)) {
-                        $sessions_with_no_category .= '<h4>'. get_lang('MyCourses').'</h4><hr />';
+                        $sessions_with_no_category .= '<h4 class="course_section_title">'. get_lang('MyCourses').'</h4><hr />';
                     }
                     $sessions_with_no_category .= $this->tpl->fetch(
                         $this->tpl->get_template('/user_portal/grid_session.tpl')

+ 1 - 1
main/template/rainbow/user_portal/classic_session.tpl

@@ -79,7 +79,7 @@
                     {{ row.date }}
                     </span>
                 </div>
-                <div class="sessions-items"> 
+                <div class="sessions-items">
                     {% for item in row.courses %}
                     <div class="courses">
                         <div class="row">

+ 1 - 1
main/template/rainbow/user_portal/grid_courses_without_category.tpl

@@ -3,7 +3,7 @@
         <div class="row">
             {% for item in courses %}
                 <div class="col-xs-12 col-sm-6 col-md-4">
-                    <div class="items">
+                    <div class="items {{ item.is_special_course ? 'session' : '' }}  ">
                         <div class="image">
                             {% if item.is_special_course %}
                                 <div class="pin">{{ item.icon }}</div>