diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index 2738f4d6ec..062c6b9110 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -4778,7 +4778,7 @@ i.size-32.icon-new-work{ } .social-avatar .social-profile{ text-align: center; - padding-top: 10px; + padding-top: 20px; } .social-avatar .social-profile .img-responsive{ display: inline-block; @@ -4922,7 +4922,6 @@ i.size-32.icon-new-work{ } .top-mediapost .user-image .avatar-thumb, .sub-mediapost .user-image .avatar-thumb{ - padding: 2px; border: 1px solid #dddddd; margin-bottom: 5px; margin-right: 5px; @@ -6349,6 +6348,25 @@ a.sessionView { height: 32px; margin-right: 5px; } +#course-block .list-group .list-group-item{ + padding: 5px; + border:none; + font-size: 12px; + line-height: 17px; + color:#666666; +} +#course-block .list-group .img-default{ + float: left; + margin-right: 5px; +} +#course-block .list-group .list-group-item .img-course{ + width: 70px; + float: left; + margin-right: 5px; +} +#course-block .list-group .list-group-item .title{ + display: block; +} /* CSS NEW TOP ******************************************************************************/ /* CSS Responsive */ @media (min-width: 1025px) and (max-width: 1200px) { diff --git a/main/inc/lib/social.lib.php b/main/inc/lib/social.lib.php index 4dc980efc0..11d8c5bee8 100755 --- a/main/inc/lib/social.lib.php +++ b/main/inc/lib/social.lib.php @@ -457,30 +457,48 @@ class SocialManager extends UserManager $tbl_session = Database :: get_main_table(TABLE_MAIN_SESSION); $course_code = $my_course['code']; + $course_directory = $my_course['course_info']['directory']; $course_title = $my_course['course_info']['title']; $course_access_settings = CourseManager :: get_access_settings($course_code); $course_visibility = $course_access_settings['visibility']; $user_in_course_status = CourseManager :: get_user_in_course_status(api_get_user_id(), $course_code); - - $s_htlm_status_icon = Display::return_icon('course.gif', get_lang('Course')); + + //$valor = api_get_settings_params(); + $course_path = api_get_path(SYS_COURSE_PATH).$course_directory; // course path + if (api_get_setting('course_images_in_courses_list') === 'true') { + if (file_exists($course_path.'/course-pic85x85.png')) { + $image = $my_course['course_info']['course_image']; + $imageCourse = Display::img($image, $course_title, array('class'=>'img-course')); + }else{ + $imageCourse = Display::return_icon('session_default_small.png', $course_title, array('class' => 'img-course')); + + } + }else{ + $imageCourse = Display::return_icon('course.png', get_lang('Course'), array('class' => 'img-default')); + } + //$imageCourse = Display::return_icon('course.png', get_lang('Course')); //display course entry - $result .= '
'; - $result .= $s_htlm_status_icon; + if (api_get_setting('course_images_in_courses_list') === 'true') { + $result .= '
  • '; + }else{ + $result .= '
  • '; + } + $result .= $imageCourse; //show a hyperlink to the course, unless the course is closed and user is not course admin if ($course_visibility != COURSE_VISIBILITY_HIDDEN && ($course_visibility != COURSE_VISIBILITY_CLOSED || $user_in_course_status == COURSEMANAGER) ) { - $result .= $course_title; + $result .= '' . $course_title . ''; } else { $result .= $course_title." "." ".get_lang('CourseClosed').""; } - $result .= ''; + $result .= '
  • '; - $result .= '
    '; + $session = ''; $active = false; @@ -591,7 +609,7 @@ class SocialManager extends UserManager ), 'normal' => UserManager::getUserPicture( $user_id, - USER_IMAGE_SIZE_ORIGINAL + USER_IMAGE_SIZE_MEDIUM ) ] ); diff --git a/main/social/profile.php b/main/social/profile.php index 7f602262ce..00624b4f32 100755 --- a/main/social/profile.php +++ b/main/social/profile.php @@ -478,15 +478,15 @@ if ($show_full_profile) { // Courses without sessions $my_course = ''; $i = 1; + foreach ($list as $key => $value) { if ( empty($value[2]) ) { //if out of any session $my_courses .= $value[1]; - $my_courses .= ''; $i++; } } $social_course_block .= $my_courses; - $social_course_block = Display::panel($my_courses, get_lang('MyCourses')); + //$social_course_block = Display::panel($my_courses, get_lang('MyCourses')); } //Block Social Sessions diff --git a/main/template/default/social/profile.tpl b/main/template/default/social/profile.tpl index bb9bcf9281..39170d6dc7 100644 --- a/main/template/default/social/profile.tpl +++ b/main/template/default/social/profile.tpl @@ -35,7 +35,25 @@ {{ social_skill_block }} {{ social_group_info_block }} - {{ social_course_block }} +
    +
    + +
    +
    +
      + {{ social_course_block }} +
    +
    +
    +
    +
    + {{ social_session_block }} {{ social_rss_block }} {{ social_right_information }}