fix red social block course items BT#7683

1.10.x
aragonc 9 years ago
parent 0452fad1f3
commit 01082d5dd5
  1. 22
      app/Resources/public/css/base.css
  2. 32
      main/inc/lib/social.lib.php
  3. 4
      main/social/profile.php
  4. 18
      main/template/default/social/profile.tpl

@ -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) {

@ -457,6 +457,7 @@ 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);
@ -464,23 +465,40 @@ class SocialManager extends UserManager
$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 .= '<div id="div_'.$count.'">';
$result .= $s_htlm_status_icon;
if (api_get_setting('course_images_in_courses_list') === 'true') {
$result .= '<li id="course_'.$count.'" class="list-group-item" style="min-height:65px;">';
}else{
$result .= '<li id="course_'.$count.'" class="list-group-item" style="min-height:44px;">';
}
$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 .= '<span class="title">' . $course_title . '<span>';
} else {
$result .= $course_title." "." ".get_lang('CourseClosed')."";
}
$result .= '</h3>';
$result .= '</li>';
$result .= '</div>';
$session = '';
$active = false;
@ -591,7 +609,7 @@ class SocialManager extends UserManager
),
'normal' => UserManager::getUserPicture(
$user_id,
USER_IMAGE_SIZE_ORIGINAL
USER_IMAGE_SIZE_MEDIUM
)
]
);

@ -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 .= '<div id="social_content'.$i.'" class="course_social_content" style="display:none" >s</div>';
$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

@ -35,7 +35,25 @@
</div>
{{ social_skill_block }}
{{ social_group_info_block }}
<div class="panel-group" id="course-block" role="tablist" aria-multiselectable="true">
<div class="panel panel-default">
<div class="panel-heading" role="tab" id="headingOne">
<h4 class="panel-title">
<a role="button" data-toggle="collapse" data-parent="#course-block" href="#courseList" aria-expanded="true" aria-controls="courseList">
{{ "MyCourses" | get_lang }}
</a>
</h4>
</div>
<div id="courseList" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingOne">
<div class="panel-body">
<ul class="list-group">
{{ social_course_block }}
</ul>
</div>
</div>
</div>
</div>
{{ social_session_block }}
{{ social_rss_block }}
{{ social_right_information }}

Loading…
Cancel
Save