Display: Update more icons

pull/5056/head
Yannick Warnier 11 months ago
parent e0ae7edcb4
commit e0d9bcc553
  1. 27
      public/main/lp/learnpath.class.php
  2. 7
      public/main/lp/lp_list_search.php
  3. 2
      public/plugin/positioning/start.php

@ -4675,18 +4675,14 @@ class learnpath
$iconName = str_replace(' ', '', $type);
$icon = '';
switch ($iconName) {
case 'category':
case 'chapter':
case 'folder':
case 'dir':
$icon = Display::getMdiIcon('bookmark-multiple', 'ch-tool-icon', '', 16);
$icon = Display::getMdiIcon(ObjectIcon::CHAPTER, 'ch-tool-icon', '', ICON_SIZE_TINY);
break;
default:
$icon = Display::return_icon(
'lp_'.$iconName.'.png',
'',
[],
ICON_SIZE_TINY
);
$icon = Display::getMdiIcon(ObjectIcon::SINGLE_ELEMENT, 'ch-tool-icon', '', ICON_SIZE_TINY);
break;
}
@ -6130,12 +6126,17 @@ class learnpath
$itemId = $item['iid'];
$type = $item['itemType'];
$iconName = str_replace(' ', '', $type);
$icon = Display::return_icon(
'lp_'.$iconName.'.png',
'',
[],
ICON_SIZE_TINY
);
switch ($iconName) {
case 'category':
case 'chapter':
case 'folder':
case 'dir':
$icon = Display::getMdiIcon(ObjectIcon::CHAPTER, 'ch-tool-icon', '', ICON_SIZE_TINY);
break;
default:
$icon = Display::getMdiIcon(ObjectIcon::SINGLE_ELEMENT, 'ch-tool-icon', '', ICON_SIZE_TINY);
break;
}
if ($itemId == $currentItemId) {
return '';

@ -183,14 +183,11 @@ if (count($blocks) > 0) {
$search_link = '<a href="%ssearch/index.php?mode=%s&action=search&query=%s%s">';
$iconGallery = (('gallery' == $mode) ? 'ButtonGallOn' : 'ButtonGallOff').'.png';
$iconDefault = (('default' == $mode) ? 'ButtonListOn' : 'ButtonListOff').'.png';
$mode_selector = '<div id="mode-selector">';
$mode_selector .= sprintf($search_link, api_get_path(WEB_CODE_PATH), 'gallery', $_REQUEST['query'], $get_params);
$mode_selector .= Display::return_icon($iconGallery).'</a>';
$mode_selector .= ('gallery' == $mode) ? getMdiIcon(ObjectIcon::GALLERY, 'ch-tool-icon') : getMdiIcon(ObjectIcon::GALLERY, 'ch-tool-icon-disabled');
$mode_selector .= sprintf($search_link, api_get_path(WEB_CODE_PATH), 'default', $_REQUEST['query'], $get_params);
$mode_selector .= Display::return_icon($iconDefault).'</a>';
$mode_selector .= ('default' == $mode) ? getMdiIcon(ObjectIcon::LIST, 'ch-tool-icon') : getMdiIcon(ObjectIcon::LIST, 'ch-tool-icon-disabled');
$mode_selector .= '</div>';
echo '<div id="search-results-container">';

@ -65,7 +65,7 @@ $actions = function ($row) use ($plugin, $url, $courseId, $sessionId) {
);
$actions .= '&nbsp;'.Display::url(
Display::return_icon('test_results.png', get_lang('Results'), '', ICON_SIZE_MEDIUM),
Display::getMdiIcon(ObjectIcon::RESULTS, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Results')),
api_get_path(WEB_CODE_PATH).'exercise/exercise_report.php?'.api_get_cidreq().'&exerciseId='.$row['iid']
);

Loading…
Cancel
Save