From fa417350e79e5d73a22815be6f58083faa222fa2 Mon Sep 17 00:00:00 2001 From: aragonc Date: Fri, 14 Aug 2015 15:58:28 -0500 Subject: [PATCH] fix bootstrap red social CT#7539 --- app/Resources/public/css/base.css | 100 ++++------------------- main/admin/course_list.php | 6 +- main/inc/lib/sessionmanager.lib.php | 14 ++++ main/session/resume_session.php | 2 +- main/social/profile.php | 15 ++-- main/template/default/social/profile.tpl | 33 +++++++- 6 files changed, 70 insertions(+), 100 deletions(-) diff --git a/app/Resources/public/css/base.css b/app/Resources/public/css/base.css index 145663af0b..7c3eb0e33a 100644 --- a/app/Resources/public/css/base.css +++ b/app/Resources/public/css/base.css @@ -4063,7 +4063,6 @@ a.forum_group_link { } .announcement { - /* background: none repeat scroll 0 0 #F2F2F2;*/ border: 1px solid #D3D3D3; color: #555555; font-weight: normal; @@ -4239,67 +4238,9 @@ i.size-32.icon-new-glossary-term{ background-image: url('../../main/img/icons/32/new_glossary_term.png'); } -/* - * Notebook -*/ - i.size-32.icon-new-note{ background-image: url('../../main/img/icons/32/new_note.png'); } - -.notebook.entries li{ - vertical-align: text-top; -} - -.notebook.note{ - display:inline-block; - width:49%; - margin-left:0px; - margin-right:1px; - padding:0; -} - -.notebook.note{ - background-color: #D2ECF5; -} - -.notebook.note .title{ - padding:1; - display:block; - margin-top:0; - margin-right:0; - margin-left:0; - padding-top:5px; - padding-bottom:12px; - vertical-align: baseline; - background-color: #028DC2 ; - color:#ffffff; -} - -.notebook.note .footer{ - text-align: right; - font-style:italic -} - -#learning_path_main #control { - text-align: center; - background-image:-webkit-gradient(linear,left top,left bottom,from(#ececec),to(#fff)); - background-image:-webkit-linear-gradient(top,#ececec,#fff); - background-image:-moz-linear-gradient(top,#ececec,#fff); - background-image:-ms-linear-gradient(top,#ececec,#fff); - background-image:-o-linear-gradient(top,#ececec,#fff); - background-image:linear-gradient(top,#ececec,#fff); - - height:32px; - padding:8px 0px 8px 0px; - opacity:0.9; - bottom: 0px; - margin: auto; - width: 100%; - height: 34px; - position: absolute -} - /* Data table */ .dataTables_wrapper{ @@ -4478,28 +4419,6 @@ i.size-32.icon-new-work{ .jqgrid_whitespace { white-space: normal !important; } - -.text-h1 { - font-size: 24px; -} - -.text-h2 { - font-size: 21px; -} - -.text-h3 { - font-size: 16px; -} - -.text-h4 { - font-size: 15px; -} - -.text-h5 { - font-size: 12px; - font-weight: normal; -} - .chosen-container { min-width: 100%; } @@ -6352,7 +6271,9 @@ a.sessionView { height: 32px; margin-right: 5px; } -#course-block .list-group .list-group-item{ +#course-block .list-group .list-group-item, +#session-block .list-group .list-group-item +{ padding: 5px; border:none; font-size: 12px; @@ -6363,14 +6284,25 @@ a.sessionView { float: left; margin-right: 5px; } -#course-block .list-group .list-group-item .img-course{ +#course-block .list-group .list-group-item .img-course, +#session-block .list-group .list-group-item .img-session +{ width: 70px; float: left; margin-right: 5px; } -#course-block .list-group .list-group-item .title{ +#course-block .list-group .list-group-item .title, +#session-block .list-group .list-group-item .title{ display: block; } +.data_table .title{ + text-align: left; + padding-left: 10px; +} +#course-list.data_table .title{ + width: 360px; + padding-left: 0; +} /* CSS NEW TOP ******************************************************************************/ /* CSS Responsive */ @media (min-width: 1025px) and (max-width: 1200px) { diff --git a/main/admin/course_list.php b/main/admin/course_list.php index db732e864d..8ae3d1f9ae 100755 --- a/main/admin/course_list.php +++ b/main/admin/course_list.php @@ -408,7 +408,7 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') { $table = new SortableTable('courses', 'get_number_of_courses', 'get_course_data_by_session', 2); } else { // Create a sortable table with the course data - $table = new SortableTable('courses', 'get_number_of_courses', 'get_course_data', 2); + $table = new SortableTable('courses', 'get_number_of_courses', 'get_course_data', 2, 20, 'ASC', 'course-list'); } $parameters=array(); @@ -428,7 +428,7 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') { $table->set_additional_parameters($parameters); $table->set_header(0, '', false, 'width="8px"'); - $table->set_header(1, get_lang('Title'), true, 'width="360px"'); + $table->set_header(1, get_lang('Title'), true, null, array('class' => 'title')); $table->set_header(2, get_lang('Code')); $table->set_header(3, get_lang('Language'), false, 'width="70px"'); $table->set_header(4, get_lang('Category')); @@ -436,7 +436,7 @@ if (isset ($_GET['search']) && $_GET['search'] == 'advanced') { $table->set_header(6, get_lang('UnsubscriptionAllowed'), false, 'width="50px"'); //$table->set_header(7, get_lang('Teacher')); - $table->set_header(7, get_lang('Action'), false, 'width="160px"', array('class'=>'td_actions')); + $table->set_header(7, get_lang('Action'), false, null, array('class'=>'td_actions')); $table->set_column_filter(7, 'modify_filter'); $table->set_form_actions(array('delete_courses' => get_lang('DeleteCourse')), 'course'); $content .= $table->return_table(); diff --git a/main/inc/lib/sessionmanager.lib.php b/main/inc/lib/sessionmanager.lib.php index 119ec228fb..9f8aa4be3b 100755 --- a/main/inc/lib/sessionmanager.lib.php +++ b/main/inc/lib/sessionmanager.lib.php @@ -3083,9 +3083,23 @@ class SessionManager } $sessions = array(); + $imagenSession = ''; if (Database::num_rows($result) > 0) { while ($row = Database::fetch_array($result)) { + + array_push ($row['image']); + $row['image'] = null; + $imagenSession = api_get_path(SYS_UPLOAD_PATH). 'sessions/'.'16_' .$row['id']. '.png'; + + if (is_file($imagenSession)) { + $imagenSession = api_get_path(WEB_UPLOAD_PATH). 'sessions/'.'16_' .$row['id']. '.png'; + $row['image'] = $imagenSession; + } else { + $row['image'] = api_get_path(WEB_IMG_PATH). 'session_default_small.png'; + } + $sessions[$row['id']] = $row; + } } diff --git a/main/session/resume_session.php b/main/session/resume_session.php index e6b40ed455..8ccc80f01b 100644 --- a/main/session/resume_session.php +++ b/main/session/resume_session.php @@ -237,7 +237,7 @@ if ($sessionInfo['nbr_courses'] == 0) { // of the course, that appeared in the default $interbreadcrumb $courseItem .= ' - '.Display::url( + '.Display::url( $course->getTitle().' ('.$course->getVisualCode().')', $courseUrl ).' diff --git a/main/social/profile.php b/main/social/profile.php index 00624b4f32..36969fa5e6 100755 --- a/main/social/profile.php +++ b/main/social/profile.php @@ -246,13 +246,7 @@ $social_menu_block = SocialManager::show_social_menu('shared_profile', null, $us //Setting some session info $user_info = api_get_user_info($my_user_id); $sessionList = SessionManager::getSessionsFollowedByUser($my_user_id, $user_info['status']); -$htmlSessionList = null; -foreach ($sessionList as $session) { - $htmlSessionList .= '
'; - $htmlSessionList .= Display::return_icon('session.png', get_lang('Session')); - $htmlSessionList .= $session['name']; - $htmlSessionList .= '
'; -} + // My friends $friend_html = SocialManager::listMyFriendsBlock( @@ -492,9 +486,10 @@ if ($show_full_profile) { //Block Social Sessions if (count($sessionList) > 0) { - $social_session_block = Display::panel($htmlSessionList, get_lang('MySessions')); + //$social_session_block = $htmlSessionList; + $social_session_block = $sessionList; } - + // Block Social User Feeds $user_feeds = SocialManager::get_user_feeds($user_id); @@ -627,7 +622,7 @@ $tpl->assign('social_course_block', $social_course_block); $tpl->assign('social_group_info_block', $social_group_info_block); $tpl->assign('social_rss_block', $social_rss_block); $tpl->assign('social_skill_block', SocialManager::getSkillBlock($my_user_id)); -$tpl->assign('social_session_block', $social_session_block); +$tpl->assign('sessionList', $social_session_block); $tpl->assign('social_right_information', $socialRightInformation); $tpl->assign('social_auto_extend_link', $socialAutoExtendLink); diff --git a/main/template/default/social/profile.tpl b/main/template/default/social/profile.tpl index 39170d6dc7..6931deded7 100644 --- a/main/template/default/social/profile.tpl +++ b/main/template/default/social/profile.tpl @@ -35,6 +35,8 @@ {{ social_skill_block }} {{ social_group_info_block }} + + {% if social_course_block != null %}
- + + {% endif %} + + {% if sessionList != null %} +
+
+ +
+
+
    + {% for session in sessionList %} +
  • + + {{ session.name }} +
  • + {% endfor %} +
+
+
+
+
+ {% endif %} + - {{ social_session_block }} {{ social_rss_block }} {{ social_right_information }}