fix category course sessions

1.10.x
aragonc 10 years ago
parent 7f9a190638
commit 989a8def5d
  1. BIN
      main/img/icons/32/sessions_category.png
  2. BIN
      main/img/icons/48/sessions_category.png
  3. BIN
      main/img/icons/64/sessions_category.png
  4. 6
      main/inc/lib/course.lib.php
  5. 24
      main/inc/lib/userportal.lib.php

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

@ -3508,6 +3508,12 @@ class CourseManager
return '<div class="panel panel-default">' . $main_content . $sub_content . $sub_sub_content . '</div>';
}
public static function session_item_parent($main_content, $sub_content, $sub_sub_content = null)
{
return '<div class="panel panel-default"><div class="panel-body">' . $main_content . $sub_content . $sub_sub_content . '</div></div>';
}
/**
* Display special courses (and only these) as several HTML divs of class userportal-course-item
*

@ -1269,7 +1269,7 @@ class IndexManager
}
$params = array();
//Category
if ($count > 0) {
$session_box = Display:: get_session_title_box(
$session_id
@ -1278,7 +1278,7 @@ class IndexManager
'window_list.png',
$session_box['title'],
array('id' => 'session_img_' . $session_id),
ICON_SIZE_BIG
ICON_SIZE_MEDIUM
);
if (api_is_drh()) {
@ -1299,19 +1299,21 @@ class IndexManager
$params['subtitle'] = (!empty($session_box['coach']) ? $session_box['coach'] . ' | ' : '') . $session_box['dates'];
if (api_is_platform_admin()) {
$params['right_actions'] = '<a href="' . api_get_path(WEB_CODE_PATH) . 'admin/resume_session.php?id_session=' . $session_id . '">' .
$params['right_actions'] = '<div class="pull-right"><a href="' . api_get_path(WEB_CODE_PATH) . 'admin/resume_session.php?id_session=' . $session_id . '">' .
Display::return_icon(
'edit.png',
get_lang('Edit'),
array('align' => 'absmiddle'),
ICON_SIZE_SMALL
) . '</a>';
) . '</a></div>';
}
/* Icon Session in category */
$parentInfo = CourseManager::course_item_html(
$params,
true
);
$parentInfo = '<div class="panel panel-default">';
$parentInfo .= '<div class="panel-heading">'.$params['title'].$params['right_actions'].'</div>';
$parentInfo .= '<div class="panel-body">';
$parentInfo .= $html_courses_session;
$parentInfo .= '</div>';
$parentInfo .= '</div>';
if (isset($_configuration['show_simple_session_info']) && $_configuration['show_simple_session_info']) {
$params['title'] = $session_box['title'];
@ -1320,7 +1322,7 @@ class IndexManager
);
}
$html_sessions .= $parentInfo . $html_courses_session;
$html_sessions .= $parentInfo;
$sessionCount++;
}
@ -1329,7 +1331,7 @@ class IndexManager
if ($count_courses_session > 0) {
$params = array();
$params['icon'] = Display::return_icon('folder_blue.png', $session_category['session_category']['name'], array(), ICON_SIZE_LARGE);
$params['icon'] = Display::return_icon('sessions_category.png', $session_category['session_category']['name'], array(), ICON_SIZE_LARGE);
if (api_is_platform_admin()) {
$params['right_actions'] = '<a href="'.api_get_path(WEB_CODE_PATH).'admin/session_category_edit.php?&id='.$session_category['session_category']['id'].'">'.Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL).'</a>';
@ -1354,7 +1356,7 @@ class IndexManager
$params['subtitle'] = get_lang('Until').' '.$session_category_end_date;
}
}
$sessions_with_category .= CourseManager::course_item_parent(
$sessions_with_category .= CourseManager::session_item_parent(
CourseManager::course_item_html($params, true),
$html_sessions
);

Loading…
Cancel
Save