Display: Use new icons in various tools

pull/5037/head
Yannick Warnier 2 years ago
parent ee0a214a4c
commit 49801c6200
  1. 5
      public/main/auth/profile.php
  2. 40
      public/main/calendar/agenda_js.php
  3. 4
      public/main/exercise/exercise.class.php
  4. 12
      public/main/exercise/exercise_submit.php
  5. 6
      public/main/exercise/fill_blanks.class.php
  6. 3
      public/main/exercise/hotspot_admin.inc.php
  7. 81
      public/main/gradebook/lib/GradebookUtils.php
  8. 2
      public/main/inc/ajax/sequence.ajax.php
  9. 10
      public/main/inc/lib/CoursesAndSessionsCatalog.class.php
  10. 3
      public/main/inc/lib/document.lib.php
  11. 4
      public/main/inc/lib/formvalidator/Element/DatePicker.php
  12. 2
      public/main/inc/lib/formvalidator/FormValidator.class.php
  13. 12
      public/main/inc/lib/skill.visualizer.lib.php
  14. 50
      public/main/inc/lib/thematic.lib.php

@ -4,6 +4,7 @@
use Chamilo\CoreBundle\Entity\User;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
/**
* This file displays the user's profile,
@ -661,9 +662,9 @@ if ($allowSocialTool) {
if ('true' === api_get_setting('extended_profile')) {
if ('true' === api_get_setting('allow_message_tool')) {
$actions .= '<a href="'.api_get_path(WEB_PATH).'main/social/profile.php">'.
Display::return_icon('shared_profile.png', get_lang('View shared profile')).'</a>';
Display::getMdiIcon(ToolIcon::SHARED_PROFILE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('View shared profile')).'</a>';
$actions .= '<a href="'.api_get_path(WEB_PATH).'main/messages/inbox.php">'.
Display::return_icon('inbox.png', get_lang('Messages')).'</a>';
Display::getMdiIcon(ToolIcon::MESSAGE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Messages')).'</a>';
}
$show = isset($_GET['show']) ? '&amp;show='.Security::remove_XSS($_GET['show']) : '';

@ -2,6 +2,8 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
// use anonymous mode when accessing this course tool
$use_anonymous = true;
$typeList = ['personal', 'course', 'admin', 'platform'];
@ -107,37 +109,19 @@ if ('en' === $region_value) {
}
$tpl->assign('region_value', $region_value);
$export_icon = Display::return_icon(
'export.png',
null,
null,
null,
null,
true,
false
);
$export_icon_low = Display::return_icon(
'export_low_fade.png',
null,
null,
null,
null,
true,
false
);
$export_icon_high = Display::return_icon(
'export_high_fade.png',
null,
null,
null,
null,
true,
false
);
$export_icon = ActionIcon::EXPORT_ARCHIVE;
$export_icon_low = ActionIcon::EXPORT_ARCHIVE;
$export_icon_high = ActionIcon::EXPORT_ARCHIVE;
$tpl->assign(
'export_ical_confidential_icon',
Display::return_icon($export_icon_high, get_lang('Export in iCal format as confidential event'))
Display::getMdiIcon(
$export_icon_high,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Export in iCal format as confidential event')
)
);
$actions = $agenda->displayActions('calendar', $userId);

@ -8445,10 +8445,10 @@ class Exercise
$answerUsed = (int) $array['used'];
$answerMissing = (int) $array['missing'] - $answerUsed;
for ($i = 1; $i <= $answerUsed; $i++) {
$html .= Display::return_icon('attempt-check.png');
$html .= Display::getMdiIcon(StateIcon::COMPLETE, 'ch-tool-icon', null, ICON_SIZE_SMALL);
}
for ($i = 1; $i <= $answerMissing; $i++) {
$html .= Display::return_icon('attempt-nocheck.png');
$html .= Display::getMdiIcon(StateIcon::INCOMPLETE, 'ch-tool-icon', null, ICON_SIZE_SMALL);
}
$ribbon = '<div class="question-answer-result__header-ribbon-title hide-label-title">'
.get_lang('Correct answers').': '.$result.'</div>'

@ -1299,13 +1299,11 @@ if ($allowBlockCategory &&
}
}
}
$saveIcon = Display::return_icon(
'save.png',
'',
[],
ICON_SIZE_SMALL,
false,
true
$saveIcon = Display::getMdiIcon(
ActionIcon::SAVE_FORM,
'ch-tool-icon',
null,
ICON_SIZE_SMALL
);
$loading = Display::getMdiIcon('loading', 'animate-spin');

@ -2,6 +2,8 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\StateIcon;
/**
* Class FillBlanks.
*
@ -1221,10 +1223,10 @@ class FillBlanks extends Question
}
$style = 'feedback-green';
$iconAnswer = Display::return_icon('attempt-check.png', get_lang('Correct'), null, ICON_SIZE_SMALL);
$iconAnswer = Display::getMdiIcon(StateIcon::COMPLETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Correct'));
if (!$right) {
$style = 'feedback-red';
$iconAnswer = Display::return_icon('attempt-nocheck.png', get_lang('Incorrect'), null, ICON_SIZE_SMALL);
$iconAnswer = Display::getMdiIcon(StateIcon::INCOMPLETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Incorrect'));
}
$correctAnswerHtml = '';

@ -3,6 +3,7 @@
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* This script allows to manage answers. It is included from the
@ -563,7 +564,7 @@ if (isset($modifyAnswers)) {
Display::tag(
'h3',
get_lang('Question').': '.$questionName.Display::return_icon('info3.gif', strip_tags(get_lang('To create a hotspot: select a shape next to the colour, and draw the hotspot. To move a hotspot, select the colour, click another spot in the image, and draw the hotspot. To add a hotspot: click the Add hotspot button. To close a polygon shape: right click and select Close polygon.')))
get_lang('Question').': '.$questionName.Display::getMdiIcon(ActionIcon::INFORMATION, 'ch-tool-icon', null, ICON_SIZE_SMALL, strip_tags(get_lang('To create a hotspot: select a shape next to the colour, and draw the hotspot. To move a hotspot, select the colour, click another spot in the image, and draw the hotspot. To add a hotspot: click the Add hotspot button. To close a polygon shape: right click and select Close polygon.')))
);
if (!empty($msgErr)) {

@ -2,8 +2,9 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
/**
* Class GradebookUtils.
@ -229,21 +230,28 @@ class GradebookUtils
$modify_icons = null;
if (false === $show_message) {
$visibility_icon = (0 == $cat->is_visible()) ? 'invisible' : 'visible';
$visibility_icon = (0 == $cat->is_visible()) ? ActionIcon::INVISIBLE : ActionIcon::VISIBLE;
$visibility_command = (0 == $cat->is_visible()) ? 'set_visible' : 'set_invisible';
$modify_icons .= '<a class="view_children" data-cat-id="'.$cat->get_id().'" href="javascript:void(0);">'.
Display::return_icon(
'view_more_stats.gif',
get_lang('Show'),
Display::getMdiIcon(
ActionIcon::VIEW_MORE,
'ch-tool-icon',
'',
ICON_SIZE_SMALL
ICON_SIZE_SMALL,
get_lang('Show')
).
'</a>';
if (!api_is_allowed_to_edit(null, true)) {
$modify_icons .= Display::url(
Display::getMdiIcon('chart-box', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('List View')),
Display::getMdiIcon(
StateIcon::LIST_VIEW,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('List View')
),
'personal_stats.php?'.http_build_query([
'selectcat' => $cat->get_id(),
]).'&'.api_get_cidreq(),
@ -294,11 +302,12 @@ class GradebookUtils
$modify_icons .= '<a href="gradebook_flatview.php?selectcat='.$cat->get_id().'&'.$courseParams.'">'.
Display::getMdiIcon('format-list-text', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('List View')).'</a>';
$modify_icons .= '&nbsp;<a href="'.api_get_self().'?visiblecat='.$cat->get_id().'&'.$visibility_command.'=&selectcat='.$selectcat.'&'.$courseParams.'">'.
Display::return_icon(
$visibility_icon.'.png',
get_lang('Visible'),
'',
ICON_SIZE_SMALL
Display::getMdiIcon(
$visibility_icon,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Visible')
).'</a>';
if ($cat->is_locked() && !api_is_platform_admin()) {
@ -329,7 +338,7 @@ class GradebookUtils
$courseParams = api_get_cidreq_params($eval->getCourseId(), $eval->getSessionId());
if (false === $message_eval && api_is_allowed_to_edit(null, true)) {
$visibility_icon = 0 == $eval->is_visible() ? 'invisible' : 'visible';
$visibility_icon = 0 == $eval->is_visible() ? ActionIcon::INVISIBLE : ActionIcon::VISIBLE;
$visibility_command = 0 == $eval->is_visible() ? 'set_visible' : 'set_invisible';
if ($is_locked && !api_is_platform_admin()) {
$modify_icons = Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL, get_lang('Edit'));
@ -340,28 +349,24 @@ class GradebookUtils
}
$modify_icons .= '&nbsp;<a href="'.api_get_self().'?visibleeval='.$eval->get_id().'&'.$visibility_command.'=&selectcat='.$selectcat.'&'.$courseParams.' ">'.
Display::return_icon(
$visibility_icon.'.png',
get_lang('Visible'),
'',
ICON_SIZE_SMALL
Display::getMdiIcon(
$visibility_icon,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Visible')
).
'</a>';
if (api_is_allowed_to_edit(null, true)) {
$modify_icons .= '&nbsp;<a href="gradebook_showlog_eval.php?visiblelog='.$eval->get_id().'&selectcat='.$selectcat.' &'.$courseParams.'">'.
Display::return_icon(
'history.png',
get_lang('Assessment history'),
'',
ICON_SIZE_SMALL
).
Display::getMdiIcon(ActionIcon::VIEW_DETAILS, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Assessment history')).
'</a>';
$allowStats = ('true' === api_get_setting('gradebook.allow_gradebook_stats'));
if ($allowStats) {
$modify_icons .= Display::url(
Display::return_icon('reload.png', get_lang('Generate statistics')),
Display::getMdiIcon(ActionIcon::REFRESH, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Generate statistics')),
api_get_self().'?itemId='.$eval->get_id().'&action=generate_eval_stats&selectcat='.$selectcat.'&'.$courseParams
);
}
@ -401,7 +406,7 @@ class GradebookUtils
$courseParams = api_get_cidreq_params($link->getCourseId(), $link->get_session_id());
if (false === $message_link) {
$visibility_icon = 0 == $link->is_visible() ? 'invisible' : 'visible';
$visibility_icon = 0 == $link->is_visible() ? ActionIcon::INVISIBLE : ActionIcon::VISIBLE;
$visibility_command = 0 == $link->is_visible() ? 'set_visible' : 'set_invisible';
if ($is_locked && !api_is_platform_admin()) {
@ -412,27 +417,29 @@ class GradebookUtils
'</a>';
}
$modify_icons .= '&nbsp;<a href="'.api_get_self().'?visiblelink='.$link->get_id().'&'.$visibility_command.'=&selectcat='.$selectcat.'&'.$courseParams.' ">'.
Display::return_icon(
$visibility_icon.'.png',
Display::getMdiIcon(
$visibility_icon,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Visible'),
'',
ICON_SIZE_SMALL
).
'</a>';
$modify_icons .= '&nbsp;<a href="gradebook_showlog_link.php?visiblelink='.$link->get_id().'&selectcat='.$selectcat.'&'.$courseParams.'">'.
Display::return_icon(
'history.png',
get_lang('Assessment history'),
'',
ICON_SIZE_SMALL
Display::getMdiIcon(
ActionIcon::VIEW_DETAILS,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Assessment history')
).
'</a>';
$allowStats = ('true' === api_get_setting('gradebook.allow_gradebook_stats'));
if ($allowStats && LINK_EXERCISE == $link->get_type()) {
$modify_icons .= Display::url(
Display::return_icon('reload.png', get_lang('Generate statistics')),
Display::getMdiIcon(ActionIcon::REFRESH, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Generate statistics')),
api_get_self().'?itemId='.$link->get_id().'&action=generate_link_stats&selectcat='.$selectcat.'&'.$courseParams
);
}
@ -772,7 +779,7 @@ class GradebookUtils
$print .= Display::div(
Display::url(
Display::return_icon('printmgr.gif', get_lang('Print')),
Display::getMdiIcon(ActionIcon::PRINT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Print')),
'javascript:void()',
['onclick' => 'window.print();']
),

@ -69,7 +69,7 @@ switch ($action) {
api_protect_admin_script();
$showDelete = isset($_REQUEST['show_delete']) ? $_REQUEST['show_delete'] : false;
$image = Display::return_icon('item-sequence.png', null, null, ICON_SIZE_LARGE);
$image = Display::getMdiIcon('notebook', 'ch-tool-icon', null, ICON_SIZE_LARGE);
if (empty($id)) {
exit;

@ -4,6 +4,7 @@
use Chamilo\CoreBundle\Entity\ExtraField;
use Chamilo\CoreBundle\Entity\User;
use Doctrine\ORM\Query\Expr\Join;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
/**
* @todo change class name
@ -1335,11 +1336,12 @@ class CoursesAndSessionsCatalog
*/
public static function getSessionIcon($sessionName)
{
return Display::return_icon(
'window_list.png',
$sessionName,
return Display::getMdiIcon(
ObjectIcon::SESSION,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM
ICON_SIZE_MEDIUM,
$sessionName
);
}

@ -9,6 +9,7 @@ use Chamilo\CoreBundle\Entity\User;
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CourseBundle\Entity\CDocument;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
/**
* Class DocumentManager
@ -2335,7 +2336,7 @@ class DocumentManager
$nodeRepository = $repo->getResourceNodeRepository();
$move = get_lang('Move');
$icon = '<i class="mdi-cursor-move mdi ch-tool-icon" style="font-size: 16px; width: 16px; height: 16px;" aria-hidden="true" title="'.htmlentities(get_lang('Move')).'"></i>';
$folderIcon = Display::return_icon('lp_folder.png');
$folderIcon = Display::getMdiIcon(ObjectIcon::CHAPTER, 'ch-tool-icon', null, ICON_SIZE_SMALL);
$options = [
'decorate' => true,

@ -2,6 +2,8 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
/**
* Form element to select a date.
*/
@ -131,7 +133,7 @@ class DatePicker extends HTML_QuickForm_text
altField: '#{$id}_alt',
altFormat: \"".get_lang('MM dd, yy')."\",
showOn: 'both',
buttonImage: '".Display::return_icon('attendance.png', null, [], ICON_SIZE_TINY, true, true)."',
buttonImage: '".Display::getMdiIcon(ToolIcon::ATTENDANCE, 'ch-tool-icon', null, ICON_SIZE_TINY)."',
buttonImageOnly: true,
buttonText: '".get_lang('Select date')."',
changeMonth: true,

@ -1800,7 +1800,7 @@ EOT;
if (!empty($urlToRedirect)) {
$redirectCondition = "window.location.replace('$urlToRedirect'); ";
}
$icon = Display::return_icon('file_txt.gif');
$icon = Display::getMdiIcon('text-box-outline', 'ch-tool-icon', null, ICON_SIZE_SMALL);
$this->addHtml("
<script>
$(function () {

@ -1,6 +1,8 @@
<?php
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* @todo lib not use. Only the class variables not the functions
*/
@ -60,11 +62,11 @@ class SkillVisualizer
$this->html .= $content;
if ('edit' == $this->type && 0 != $skill['parent_id']) {
//$this->html .= Display::url(Display::return_icon('edit.png', get_lang('Edit'), array(), ICON_SIZE_SMALL), '#', array('id'=>'edit_block_'.$block_id,'class'=>'edit_block'));
//$this->html .= Display::url(Display::return_icon('add.png', get_lang('Add'), array(), ICON_SIZE_SMALL), '#', array('id'=>'edit_block_'.$block_id,'class'=>'edit_block'));
//$this->html .= Display::url(Display::return_icon('delete.png', get_lang('Delete'), array(), ICON_SIZE_SMALL), '#', array('id=>"edit_block_'.$block_id,'class'=>'edit_block'));
//$this->html .= Display::url(Display::return_icon('up.png', get_lang('Close'), array(), ICON_SIZE_SMALL), '#', array('id'=>'close_block_'.$block_id,'class'=>'close_block'));
//$this->html .= Display::url(Display::return_icon('down.png', get_lang('Open'), array(), ICON_SIZE_SMALL), '#', array('id'=>'open_block_'.$block_id,'class'=>'open_block'));
//$this->html .= Display::url(Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')), '#', array('id'=>'edit_block_'.$block_id,'class'=>'edit_block'));
//$this->html .= Display::url(Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Add')), '#', array('id'=>'edit_block_'.$block_id,'class'=>'edit_block'));
//$this->html .= Display::url(Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')), '#', array('id=>"edit_block_'.$block_id,'class'=>'edit_block'));
//$this->html .= Display::url(Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Close')), '#', array('id'=>'close_block_'.$block_id,'class'=>'close_block'));
//$this->html .= Display::url(Display::getMdiIcon(ActionIcon::DOWN, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Open')), '#', array('id'=>'open_block_'.$block_id,'class'=>'open_block'));
}
$this->html .= '</div>';
}

@ -10,6 +10,7 @@ use Chamilo\CourseBundle\Entity\CThematic;
use Chamilo\CourseBundle\Entity\CThematicAdvance;
use Chamilo\CourseBundle\Entity\CThematicPlan;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
/**
* Provides functions for thematic option inside attendance tool.
@ -110,61 +111,46 @@ class Thematic
if (api_get_session_id()) {
if (api_get_session_id() == $thematic[3]) {
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic[0].'">'.
Display::return_icon('lesson_plan.png', get_lang('Thematic plan'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::getMdiIcon(ToolIcon::COURSE_PROGRESS_PLAN, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Thematic plan')).'</a>&nbsp;';
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic[0].'">'.
Display::return_icon('lesson_plan_calendar.png', get_lang('Thematic advance'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::getMdiIcon(ToolIcon::COURSE_PROGRESS_SCHEDULE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Thematic advance')).'</a>&nbsp;';
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$thematic[0].'">'.
Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>';
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to delete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$thematic[0].'">'.
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>';
} else {
$actions .= Display::return_icon(
'lesson_plan_na.png',
get_lang('Thematic plan'),
'',
ICON_SIZE_SMALL
).'&nbsp;';
$actions .= Display::return_icon(
'lesson_plan_calendar_na.png',
get_lang('Thematic advance'),
'',
ICON_SIZE_SMALL
).'&nbsp;';
$actions .= Display::return_icon('edit_na.png', get_lang('Edit'), '', ICON_SIZE_SMALL);
$actions .= Display::return_icon(
'delete_na.png',
get_lang('Delete'),
'',
ICON_SIZE_SMALL
).'&nbsp;';
$actions .= Display::getMdiIcon(ToolIcon::COURSE_PROGRESS_PLAN, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL, get_lang('Thematic plan')).'&nbsp;';
$actions .= Display::getMdiIcon(ToolIcon::COURSE_PROGRESS_SCHEDULE, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL, get_lang('Thematic advance')).'&nbsp;';
$actions .= Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL, get_lang('Edit'));
$actions .= Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL, get_lang('Delete')).'&nbsp;';
$actions .= Display::url(
Display::return_icon('cd.gif', get_lang('Copy')),
Display::getMdiIcon(ActionIcon::COPY_CONTENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Copy')),
'index.php?'.api_get_cidreq().'&action=thematic_copy&thematic_id='.$thematic[0]
);
}
} else {
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_plan_list&thematic_id='.$thematic[0].'">'.
Display::return_icon('lesson_plan.png', get_lang('Thematic plan'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::getMdiIcon(ToolIcon::COURSE_PROGRESS_PLAN, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Thematic plan')).'</a>&nbsp;';
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_advance_list&thematic_id='.$thematic[0].'">'.
Display::return_icon('lesson_plan_calendar.png', get_lang('Thematic advance'), '', ICON_SIZE_SMALL).'</a>&nbsp;';
Display::getMdiIcon(ToolIcon::COURSE_PROGRESS_SCHEDULE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Thematic advance')).'</a>&nbsp;';
if ($thematic[2] > 1) {
$actions .= '<a href="'.api_get_self().'?action=moveup&'.api_get_cidreq().'&thematic_id='.$thematic[0].'">'.
Display::return_icon('up.png', get_lang('Up'), '', ICON_SIZE_SMALL).'</a>';
Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Up')).'</a>';
} else {
$actions .= Display::return_icon('up_na.png', '&nbsp;', '', ICON_SIZE_SMALL);
$actions .= Display::getMdiIcon(ActionIcon::UP, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL);
}
/*if ($thematic[2] < self::get_max_thematic_item()) {
$actions .= '<a href="'.api_get_self().'?action=movedown&a'.api_get_cidreq().'&thematic_id='.$thematic[0].'">'.
Display::return_icon('down.png', get_lang('down'), '', ICON_SIZE_SMALL).'</a>';
Display::getMdiIcon(ActionIcon::DOWN, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('down')).'</a>';
} else {
$actions .= Display::return_icon('down_na.png', '&nbsp;', '', ICON_SIZE_SMALL);
$actions .= Display::getMdiIcon(ActionIcon::DOWN, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL);
}
$actions .= '<a href="index.php?'.api_get_cidreq().'&action=thematic_edit&thematic_id='.$thematic[0].'">'.
Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>';
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
$actions .= '<a onclick="javascript:if(!confirm(\''.get_lang('Are you sure you want to delete').'\')) return false;" href="index.php?'.api_get_cidreq().'&action=thematic_delete&thematic_id='.$thematic[0].'">'.
Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>';
}
$thematics[] = [$thematic[0], $thematic[1], $actions];
}

Loading…
Cancel
Save