Display: Use new icons in administration section

pull/5034/head
Yannick Warnier 2 years ago
parent 74deabe212
commit 515bf0870e
  1. 45
      public/main/admin/course_list_admin.php
  2. 21
      public/main/admin/course_request_accepted.php
  3. 34
      public/main/admin/course_request_edit.php
  4. 64
      public/main/admin/course_request_rejected.php
  5. 70
      public/main/admin/course_request_review.php
  6. 5
      public/main/admin/dashboard_add_courses_to_user.php
  7. 6
      public/main/admin/dashboard_add_sessions_to_user.php
  8. 6
      public/main/admin/dashboard_add_users_to_user.php
  9. 4
      public/main/admin/extra_field_options.php
  10. 4
      public/main/admin/extra_fields.php
  11. 7
      public/main/admin/filler.php
  12. 8
      public/main/admin/grade_models.php
  13. 2
      public/main/admin/gradebook_dependency.php
  14. 6
      public/main/admin/gradebook_list.php
  15. 83
      public/main/admin/index.php
  16. 25
      public/main/admin/languages.php
  17. 8
      public/main/admin/ldap_import_students.php
  18. 17
      public/main/admin/ldap_import_students_to_session.php
  19. 2
      public/main/admin/legal_add.php
  20. 5
      public/main/admin/legal_list.php
  21. 18
      public/main/admin/promotions.php
  22. 4
      public/main/admin/questions.php
  23. 42
      public/main/admin/settings.lib.php
  24. 5
      public/main/admin/settings.php
  25. 6
      public/main/admin/specific_fields.php
  26. 4
      public/main/admin/statistics/index.php
  27. 4
      public/main/admin/subscribe_user2course.php
  28. 22
      public/main/admin/system_announcements.php
  29. 22
      public/main/admin/teacher_time_report.php
  30. 4
      public/main/admin/teachers_time_by_session_report.php
  31. 14
      public/main/admin/user_edit.php
  32. 100
      public/main/admin/user_information.php
  33. 6
      public/main/admin/user_linking_requests.php
  34. 32
      public/main/admin/user_list.php
  35. 77
      public/main/admin/user_list_consent.php
  36. 2
      public/main/admin/user_move_stats.php
  37. 11
      public/main/admin/usergroup_users.php
  38. 24
      public/main/admin/usergroups.php

@ -8,6 +8,7 @@
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -246,39 +247,19 @@ function get_course_visibility_icon($visibility)
$style = 'margin-bottom:0;margin-right:5px;';
switch ($visibility) {
case 0:
return Display::return_icon(
'bullet_red.png',
get_lang('Closed - the course is only accessible to the teachers'),
['style' => $style]
);
return Display::getMdiIcon(StateIcon::CLOSED_VISIBILITY, 'ch-tool-icon', $style, ICON_SIZE_SMALL, get_lang('Closed - the course is only accessible to the teachers'));
break;
case 1:
return Display::return_icon(
'bullet_orange.png',
get_lang('Private access (access authorized to group members only)'),
['style' => $style]
);
return Display::getMdiIcon(StateIcon::PRIVATE_VISIBILITY, 'ch-tool-icon', $style, ICON_SIZE_SMALL, get_lang('Private access (access authorized to group members only)'));
break;
case 2:
return Display::return_icon(
'bullet_green.png',
get_lang('Open - access allowed for users registered on the platform'),
['style' => $style]
);
return Display::getMdiIcon(StateIcon::OPEN_VISIBILITY, 'ch-tool-icon', $style, ICON_SIZE_SMALL, get_lang('Open - access allowed for users registered on the platform'));
break;
case 3:
return Display::return_icon(
'bullet_blue.png',
get_lang('Public - access allowed for the whole world'),
['style' => $style]
);
return Display::getMdiIcon(StateIcon::PUBLIC_VISIBILITY, 'ch-tool-icon', $style, ICON_SIZE_SMALL, get_lang('Public - access allowed for the whole world'));
break;
case 4:
return Display::return_icon(
'bullet_grey.png',
get_lang('Hidden - Completely hidden to all users except the administrators'),
['style' => $style]
);
return Display::getMdiIcon(StateIcon::HIDDEN_VISIBILITY, 'ch-tool-icon', $style, ICON_SIZE_SMALL, get_lang('Hidden - Completely hidden to all users except the administrators'));
break;
default:
return '';
@ -415,23 +396,13 @@ if (isset($_GET['search']) && 'advanced' === $_GET['search']) {
$courseListUrl = api_get_self();
$actions1 = Display::url(
Display::return_icon(
'new_course.png',
get_lang('AddCourse'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('AddCourse')),
api_get_path(WEB_CODE_PATH).'admin/course_add.php'
);
if ('true' === api_get_setting('course_validation')) {
$actions1 .= Display::url(
Display::return_icon(
'course_request_pending.png',
get_lang('ReviewCourseRequests'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon('notebook-heart-outline', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('ReviewCourseRequests')),
api_get_path(WEB_CODE_PATH).'admin/course_request_review.php'
);
}

@ -132,15 +132,14 @@ function modify_filter($id)
$code = CourseRequestManager::get_course_request_code($id);
return '<a href="course_request_edit.php?id='.$id.'&caller=1">'.
Display::return_icon('edit.png', get_lang('Edit'), ['style' => 'vertical-align: middle;']).'</a>'.
'&nbsp;<a href="?delete_course_request='.$id.'">'.
Display::return_icon(
'delete.png',
get_lang('Delete this course request'),
[
'style' => 'vertical-align: middle;',
'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be deleted. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;',
]
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', 'vertical-align: middle;', ICON_SIZE_SMALL, get_lang('Edit')).'</a>'.
'&nbsp;<a href="?delete_course_request='.$id.'" script="onclick:if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be deleted. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::getMdiIcon(
ActionIcon::DELETE,
'ch-tool-icon',
'vertical-align: middle;',
ICON_SIZE_SMALL,
get_lang('Delete this course request')
).
'</a>';
}
@ -175,9 +174,9 @@ $form->addButtonSearch(get_lang('Search'));
// The action bar.
echo '<div style="float: right; margin-top: 5px; margin-right: 5px;">';
echo ' <a href="course_request_review.php">'.
Display::return_icon('course_request_pending.png', get_lang('Review incoming course requests')).get_lang('Review incoming course requests').'</a>';
Display::getMdiIcon('notebook-heart-outline', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Review incoming course requests')).get_lang('Review incoming course requests').'</a>';
echo ' <a href="course_request_rejected.php">'.
Display::return_icon('course_request_rejected.gif', get_lang('Rejected course requests')).get_lang('Rejected course requests').'</a>';
Display::getMdiIcon('notebook-remove-outline', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Rejected course requests')).get_lang('Rejected course requests').'</a>';
echo '</div>';
echo '<div class="actions">';
$form->display();

@ -8,7 +8,7 @@
* @author Ivan Tcholakov <ivantcholakov@gmail.com>, 2010
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -349,15 +349,39 @@ if (!$course_validation_feature) {
// The action bar.
echo '<div class="actions">';
echo '<a href="course_list.php">'.
Display::return_icon('courses.gif', get_lang('Course list')).get_lang('Course list').'</a>';
Display::getMdiIcon(
ToolIcon::COURSE,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Course list')
).get_lang('Course list').'</a>';
echo '<a href="course_request_review.php">'.
Display::return_icon('course_request_pending.png', get_lang('Review incoming course requests')).get_lang('Review incoming course requests').
Display::getMdiIcon(
'notebook-heart-outline',
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Review incoming course requests')
).get_lang('Review incoming course requests').
'</a>';
echo '<a href="course_request_accepted.php">'.
Display::return_icon('course_request_accepted.gif', get_lang('Accepted course requests')).get_lang('Accepted course requests').
Display::getMdiIcon(
'notebook-check-outline',
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Accepted course requests')
).get_lang('Accepted course requests').
'</a>';
echo '<a href="course_request_rejected.php">'.
Display::return_icon('course_request_rejected.gif', get_lang('Rejected course requests')).get_lang('Rejected course requests').
Display::getMdiIcon(
'notebook-remove-outline',
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Rejected course requests')
).get_lang('Rejected course requests').
'</a>';
echo '</div>';

@ -12,6 +12,7 @@
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
$cidReset = true;
@ -160,37 +161,34 @@ function modify_filter($id)
{
$code = CourseRequestManager::get_course_request_code($id);
$result = '<a href="course_request_edit.php?id='.$id.'&caller=2">'.
Display::return_icon('edit.png', get_lang('Edit'), ['style' => 'vertical-align: middle;']).'</a>'.
'&nbsp;<a href="?accept_course_request='.$id.'">'.
Display::return_icon(
'accept.png',
get_lang('Accept this course'),
[
'style' => 'vertical-align: middle;',
'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('A new course %s is going to be created. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;',
]
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', 'vertical-align: middle;', ICON_SIZE_SMALL, get_lang('Edit')).'</a>'.
'&nbsp;<a href="?accept_course_request='.$id.'" script="onclick:if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('A new course %s is going to be created. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::getMdiIcon(
ActionIcon::ACCEPT,
'ch-tool-icon',
'vertical-align: middle;',
ICON_SIZE_SMALL,
get_lang('Accept this course')
).
'</a>';
if (!CourseRequestManager::additional_info_asked($id)) {
$result .= '&nbsp;<a href="?request_info='.$id.'">'.
Display::return_icon(
'request_info.gif',
get_lang('Ask for additional information'),
[
'style' => 'vertical-align: middle;',
'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('Additional information about %s course request is going to be asked through an e-mail message. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;',
]
$result .= '&nbsp;<a href="?request_info='.$id.'" script="onclick:if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('Additional information about %s course request is going to be asked through an e-mail message. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::getMdiIcon(
ActionIcon::INFORMATION,
'ch-tool-icon',
'vertical-align: middle;',
ICON_SIZE_SMALL,
get_lang('Ask for additional information')
).
'</a>';
}
$result .= '&nbsp;<a href="?delete_course_request='.$id.'">'.
Display::return_icon(
'delete.png',
get_lang('Delete this course request'),
[
'style' => 'vertical-align: middle;',
'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be deleted. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;',
]
$result .= '&nbsp;<a href="?delete_course_request='.$id.'" script="onclick:if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be deleted. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::getMdiIcon(
ActionIcon::DELETE,
'ch-tool-icon',
'vertical-align: middle;',
ICON_SIZE_SMALL,
get_lang('Delete this course request')
).
'</a>';
@ -228,10 +226,22 @@ $form->addButtonSearch(get_lang('Search'));
// The action bar.
echo '<div style="float: right; margin-top: 5px; margin-right: 5px;">';
echo ' <a href="course_request_review.php">'.
Display::return_icon('course_request_pending.png', get_lang('Review incoming course requests')).get_lang('Review incoming course requests').
Display::getMdiIcon(
'notebook-heart-outline',
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Review incoming course requests')
).get_lang('Review incoming course requests').
'</a>';
echo ' <a href="course_request_accepted.php">'.
Display::return_icon('course_request_accepted.gif', get_lang('Accepted course requests')).get_lang('Accepted course requests').
Display::getMdiIcon(
StateIcon::COMPLETE,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Accepted course requests')
).get_lang('Accepted course requests').
'</a>';
echo '</div>';
echo '<div class="actions">';

@ -11,6 +11,7 @@
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -200,25 +201,48 @@ function modify_filter($id)
{
$code = CourseRequestManager::get_course_request_code($id);
$result = '<a href="course_request_edit.php?id='.$id.'&caller=0">'.
Display::return_icon('edit.png', get_lang('Edit'), ['style' => 'vertical-align: middle;']).'</a>'.
'&nbsp;<a href="?accept_course_request='.$id.'">'.
Display::return_icon('accept.png', get_lang('Accept this course'), ['style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('A new course %s is going to be created. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;'], 16).'</a>'.
'&nbsp;<a href="?reject_course_request='.$id.'">'.
Display::return_icon('error.png', get_lang('Reject this course request'), ['style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be rejected. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;'], 16).'</a>';
Display::getMdiIcon(
ActionIcon::EDIT,
'ch-tool-icon',
'vertical-align: middle;',
ICON_SIZE_SMALL,
get_lang('Edit')
).'</a>'.
'&nbsp;<a href="?accept_course_request='.$id.'" script="onclick: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('A new course %s is going to be created. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::getMdiIcon(
StateIcon::COMPLETE,
'ch-tool-icon',
'vertical-align: middle;',
ICON_SIZE_TINY,
get_lang('Accept this course')
).'</a>'.
'&nbsp;<a href="?reject_course_request='.$id.'" script="onclick:if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be rejected. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::getMdiIcon(
'trash-can-outline',
'ch-tool-icon',
'vertical-align: middle;',
ICON_SIZE_TINY,
get_lang('Reject this course request')
).'</a>';
if (!CourseRequestManager::additional_info_asked($id)) {
$result .= '&nbsp;<a href="?request_info='.$id.'">'.
Display::return_icon('request_info.gif', get_lang('Ask for additional information'), ['style' => 'vertical-align: middle;', 'onclick' => 'javascript: if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('Additional information about %s course request is going to be asked through an e-mail message. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;']).'</a>';
$result .= '&nbsp;<a href="?request_info='.$id.'" script="onclick:if (!confirm(\''.addslashes(api_htmlentities(sprintf(get_lang('Additional information about %s course request is going to be asked through an e-mail message. Is it OK to proceed?'), $code), ENT_QUOTES)).'\')) return false;">'.
Display::getMdiIcon(
ActionIcon::INFORMATION,
'ch-tool-icon',
'vertical-align: middle;',
ICON_SIZE_SMALL,
get_lang('Ask for additional information'),
).'</a>';
}
if (DELETE_ACTION_ENABLED) {
$message = addslashes(api_htmlentities(sprintf(get_lang('The course request %s is going to be deleted. Is it OK to proceed?'), $code), ENT_QUOTES));
$result .= '&nbsp;<a href="?delete_course_request='.$id.'">';
$result .= Display::return_icon(
'delete.png',
get_lang('Delete this course request'),
[
'style' => 'vertical-align: middle;',
'onclick' => 'javascript: if (!confirm(\''.$message.'\')) return false;',
]
$result .= '&nbsp;<a href="?delete_course_request='.$id.'" script="onclick:if (!confirm(\''.$message.'\')) return false;">';
$result .= Display::getMdiIcon(
ActionIcon::DELETE,
'ch-tool-icon',
'vertical-align: middle;',
ICON_SIZE_SMALL,
get_lang('Delete this course request')
);
$result .= '</a>';
}
@ -257,11 +281,23 @@ $form->addButtonSearch(get_lang('Search'));
// The action bar.
echo '<div style="float: right; margin-top: 5px; margin-right: 5px;">';
echo ' <a href="course_request_accepted.php">';
echo Display::return_icon('course_request_accepted.gif', get_lang('Accepted course requests')).
echo Display::getMdiIcon(
StateIcon::COMPLETE,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Accepted course requests')
).
get_lang('Accepted course requests');
echo '</a>';
echo ' <a href="course_request_rejected.php">';
echo Display::return_icon('course_request_rejected.gif', get_lang('Rejected course requests')).
echo Display::getMdiIcon(
StateIcon::INCOMPLETE,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Rejected course requests')
).
get_lang('Rejected course requests');
echo '</a>';
echo '</div>';

@ -6,6 +6,7 @@
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
// resetting the course id
$cidReset = true;
@ -174,9 +175,9 @@ Display::display_header($tool_name);
// actions
$actionsLeft = '<a href="dashboard_add_users_to_user.php?user='.$user_id.'">'.
Display::return_icon('add-user.png', get_lang('Assign users'), null, ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ObjectIcon::USER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Assign users')).'</a>';
$actionsLeft .= '<a href="dashboard_add_sessions_to_user.php?user='.$user_id.'">'.
Display::return_icon('session-add.png', get_lang('Assign sessions'), null, ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ObjectIcon::SESSION, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Assign sessions')).'</a>';
echo $html = Display::toolbarAction('toolbar-dashboard', [$actionsLeft]);

@ -5,7 +5,7 @@
* Interface for assigning sessions to Human Resources Manager.
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
// resetting the course id
$cidReset = true;
@ -178,9 +178,9 @@ Display::display_header($tool_name);
// Actions
if (!$isSessionAdmin) {
$actionsLeft = '<a href="dashboard_add_users_to_user.php?user='.$user_id.'">'.
Display::return_icon('add-user.png', get_lang('Assign users'), null, ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ObjectIcon::USER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Assign users')).'</a>';
$actionsLeft .= '<a href="dashboard_add_courses_to_user.php?user='.$user_id.'">'.
Display::return_icon('course-add.png', get_lang('Assign courses'), null, ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ObjectIcon::COURSE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Assign courses')).'</a>';
echo Display::toolbarAction('toolbar-dashboard', [$actionsLeft]);
}

@ -5,7 +5,7 @@
* Interface for assigning users to Human Resources Manager.
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
// resetting the course id
$cidReset = true;
@ -320,12 +320,12 @@ Display::display_header($tool_name);
$actionsLeft = '';
if (STUDENT_BOSS != $userStatus) {
$actionsLeft = Display::url(
Display::return_icon('course-add.png', get_lang('Assign courses'), null, ICON_SIZE_MEDIUM),
Display::getMdiIcon(ObjectIcon::COURSE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Assign courses')),
"dashboard_add_courses_to_user.php?user=$user_id"
);
$actionsLeft .= Display::url(
Display::return_icon('session-add.png', get_lang('Assign sessions'), null, ICON_SIZE_MEDIUM),
Display::getMdiIcon(ObjectIcon::SESSION, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Assign sessions')),
"dashboard_add_sessions_to_user.php?user=$user_id"
);
}

@ -118,8 +118,8 @@ $extra_params['height'] = 'auto';
//With this function we can add actions to the jgrid (edit, delete, etc)
$action_links = 'function action_formatter(cellvalue, options, rowObject) {
return \'<a href="?action=edit&'.$params.'&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'.
'&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(get_lang("Please confirm your choice"))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&'.$params.'&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'.
return \'<a href="?action=edit&'.$params.'&id=\'+options.rowId+\'">'.Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>'.
'&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(get_lang("Please confirm your choice"))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&'.$params.'&id=\'+options.rowId+\'">'.Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>'.
'\';
}';

@ -126,7 +126,7 @@ switch ($action) {
$obj->display();
} else {
$actions = '<a href="'.api_get_self().'?type='.$obj->type.'">'.
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')).'</a>';
echo Display::toolbarAction('toolbar', [$actions]);
$form->addElement('hidden', 'sec_token');
$form->setConstants(['sec_token' => $token]);
@ -150,7 +150,7 @@ switch ($action) {
$obj->display();
} else {
$actions = '<a href="'.api_get_self().'?type='.$obj->type.'">'.
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')).'</a>';
echo Display::toolbarAction('toolbar', [$actions]);
$form->addElement('hidden', 'sec_token');
$form->setConstants(['sec_token' => $token]);

@ -6,6 +6,7 @@
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
// resetting the course id
$cidReset = true;
@ -65,7 +66,7 @@ if (count($output) > 0) {
<div id="datafiller" class="card">
<div class="card-body">
<h4><?php
echo Display::return_icon('bug.png', get_lang('Data filler'), null, ICON_SIZE_MEDIUM).' '.get_lang('Data filler');
echo Display::getMdiIcon(ActionIcon::FILL, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Data filler')).' '.get_lang('Data filler');
?>
</h4>
<div class="description"><?php echo get_lang('This section is only visible on installations from source code, not in packaged versions of the platform. It will allow you to quickly populate your platform with test data. Use with care (data is really inserted) and only on development or testing installations.'); ?></div>
@ -73,14 +74,14 @@ if (count($output) > 0) {
<li>
<a href="filler.php?fill=users">
<?php
echo Display::return_icon('user.png', get_lang('Fill users'), null, ICON_SIZE_SMALL).
echo Display::getMdiIcon(ObjectIcon::USER, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Fill users')).
' '.get_lang('Fill users');
?>
</a></li>
<li>
<a href="filler.php?fill=courses">
<?php
echo Display::return_icon('new-course.png', get_lang('Fill courses'), null, ICON_SIZE_SMALL).
echo Display::getMdiIcon(ObjectIcon::COURSE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Fill courses')).
' '.get_lang('Fill courses');
?>
</a>

@ -108,8 +108,8 @@ $extra_params['height'] = 'auto';
//With this function we can add actions to the jgrid (edit, delete, etc)
$action_links = 'function action_formatter(cellvalue, options, rowObject) {
return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'.
'&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("Please confirm your choice"), ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>'.
return \'<a href="?action=edit&id=\'+options.rowId+\'">'.Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>'.
'&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("Please confirm your choice"), ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>'.
'\';
}';
?>
@ -155,7 +155,7 @@ switch ($action) {
} else {
echo '<div class="actions">';
echo '<a href="'.api_get_self().'">'.
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')).
'</a>';
echo '</div>';
$form->addElement('hidden', 'sec_token');
@ -179,7 +179,7 @@ switch ($action) {
} else {
echo '<div class="actions">';
echo '<a href="'.api_get_self().'">'.
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')).
'</a>';
echo '</div>';
$form->addElement('hidden', 'sec_token');

@ -41,7 +41,7 @@ $interbreadcrumb[] = [
$tpl = new Template(get_lang('Course list'));
$toolbar = Display::url(
Display::return_icon('back.png', get_lang('Add'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add')),
api_get_path(WEB_CODE_PATH).'admin/gradebook_list.php'
);

@ -45,7 +45,7 @@ $table = Database::get_main_table(TABLE_MAIN_GRADEBOOK_CATEGORY);
$contentForm = '';
$toolbar = Display::url(
Display::return_icon('add.png', get_lang('Add'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add')),
$currentUrl.'&action=add'
);
@ -66,7 +66,7 @@ $tpl = new Template($toolName);
switch ($action) {
case 'add':
$toolbar = Display::url(
Display::return_icon('back.png', get_lang('Back'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')),
$currentUrl
);
$form = new FormValidator(
@ -167,7 +167,7 @@ switch ($action) {
break;
case 'edit':
$toolbar = Display::url(
Display::return_icon('back.png', get_lang('Back'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')),
$currentUrl
);
/** @var GradebookCategory $category */

@ -7,6 +7,9 @@
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
// Resetting the course id.
$cidReset = true;
@ -50,12 +53,12 @@ $blocks = [];
/* Users */
$blocks['users']['mdi_icon'] = 'account';
$blocks['users']['icon'] = Display::return_icon(
'members.png',
get_lang('User management'),
[],
$blocks['users']['icon'] = Display::getMdiIcon(
ObjectIcon::USER,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
false
get_lang('User management')
);
$blocks['users']['description'] = get_lang('Here you can manage registered users within your platform');
$blocks['users']['label'] = get_lang('User management');
@ -127,12 +130,12 @@ $blocks['users']['extra'] = null;
if (api_is_platform_admin()) {
/* Courses */
$blocks['courses']['mdi_icon'] = 'book-open-page-variant';
$blocks['courses']['icon'] = Display::return_icon(
'course.png',
get_lang('Course management'),
[],
$blocks['courses']['icon'] = Display::getMdiIcon(
ObjectIcon::COURSE,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
false
get_lang('Course management')
);
$blocks['courses']['label'] = get_lang('Course management');
$blocks['courses']['description'] = get_lang('Create and manage your courses in a simple way');
@ -187,12 +190,12 @@ if (api_is_platform_admin()) {
/* Sessions */
$blocks['sessions']['mdi_icon'] = 'google-classroom';
$blocks['sessions']['icon'] = Display::return_icon(
'session.png',
get_lang('Sessions management'),
[],
$blocks['sessions']['icon'] = Display::getMdiIcon(
ObjectIcon::SESSION,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
false
get_lang('Sessions management')
);
$blocks['sessions']['label'] = get_lang('Sessions management');
$blocks['sessions']['description'] = get_lang('Create course packages for a certain time with training sessions.');
@ -261,12 +264,12 @@ if (api_is_platform_admin()) {
// Skills
if (SkillModel::isToolAvailable()) {
$blocks['skills']['mdi_icon'] = 'certificate';
$blocks['skills']['icon'] = Display::return_icon(
'skill-badges.png',
get_lang('Skills'),
[],
$blocks['skills']['icon'] = Display::getMdiIcon(
ObjectIcon::BADGE,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
false
get_lang('Skills')
);
$blocks['skills']['label'] = get_lang('Skills and gradebook');
$blocks['skills']['description'] = get_lang('Manage the skills of your users, through courses and badges');
@ -400,12 +403,12 @@ if (api_is_platform_admin()) {
/* Settings */
if (api_is_platform_admin()) {
$blocks['settings']['mdi_icon'] = 'tools';
$blocks['settings']['icon'] = Display::return_icon(
'settings.png',
get_lang('System'),
[],
$blocks['settings']['icon'] = Display::getMdiIcon(
ToolIcon::SETTINGS,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
false
get_lang('System')
);
$blocks['settings']['label'] = get_lang('System');
$blocks['settings']['description'] = get_lang('View the status of your server, perform performance tests');
@ -480,12 +483,12 @@ if (api_is_platform_admin()) {
if ($menuAdministratorItems) {
$blocks['plugins']['mdi_icon'] = 'puzzle';
$blocks['plugins']['icon'] = Display::return_icon(
'plugins.png',
get_lang('Plugins'),
[],
$blocks['plugins']['icon'] = Display::getMdiIcon(
ToolIcon::PLUGIN,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
false
get_lang('Plugins')
);
$blocks['plugins']['label'] = get_lang('Plugins');
$blocks['plugins']['class'] = 'block-admin-platform';
@ -517,12 +520,12 @@ if (api_is_platform_admin()) {
/* Chamilo.org */
$blocks['chamilo']['mdi_icon'] = 'cogs';
$blocks['chamilo']['icon'] = Display::return_icon(
'platform.png',
'Chamilo.org',
[],
$blocks['chamilo']['icon'] = Display::getMdiIcon(
ActionIcon::INFORMATION,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
false
'Chamilo.org'
);
$blocks['chamilo']['label'] = 'Chamilo.org';
$blocks['chamilo']['description'] = get_lang('Learn more about Chamilo and its use, official references links');
@ -549,12 +552,12 @@ if (api_is_platform_admin()) {
// Version check
$blocks['version_check']['mdi_icon'] = '';
$blocks['version_check']['icon'] = Display::return_icon(
'platform.png',
'Chamilo.org',
[],
$blocks['version_check']['icon'] = Display::getMdiIcon(
StateIcon::COMPLETE,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
false
'Chamilo.org'
);
$blocks['version_check']['label'] = get_lang('Version Check');
$blocks['version_check']['extra'] = '<div class="admin-block-version"></div>';

@ -13,6 +13,8 @@
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
// we are in the admin area so we do not need a course id
$cidReset = true;
@ -305,16 +307,11 @@ while ($row = Database::fetch_array($result_select)) {
$row_td[] = $row['english_name'].' ('.$row['isocode'].')';
if ($row['isocode'] == $currentLanguage) {
$setplatformlanguage = Display::return_icon(
'languages.png',
get_lang('Current portal\'s language'),
'',
ICON_SIZE_SMALL
);
$setplatformlanguage = Display::getMdiIcon(ToolIcon::TRANSLATION, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Current portal\'s language'));
} else {
$setplatformlanguage =
"<a href=\"javascript:if (confirm('".addslashes(get_lang('Are you sure you want to set this language as the portal\'s default?'))."')) { location.href='".api_get_self()."?action=setplatformlanguage&id=".$row['id']."'; }\">".
Display::return_icon('languages_na.png', get_lang('Set language as default'), null, ICON_SIZE_SMALL)."</a>";
Display::getMdiIcon(ToolIcon::TRANSLATION, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL, get_lang('Set language as default'))."</a>";
}
$allow_delete_sub_language = null;
@ -326,7 +323,7 @@ while ($row = Database::fetch_array($result_select)) {
if (false === $verified_if_is_sub_language) {
$verified_if_is_father = SubLanguageManager::check_if_language_is_father($row['id']);
$allow_use_sub_language = "&nbsp;<a href='sub_language_add.php?action=definenewsublanguage&id=".$row['id']."'>".
Display::return_icon('new_language.png', get_lang('Create sub-language'), [], ICON_SIZE_SMALL)."</a>";
Display::getMdiIcon(ToolIcon::TRANSLATION, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Create sub-language'))."</a>";
if (true === $verified_if_is_father) {
$allow_add_term_sub_language = '';
} else {
@ -335,23 +332,23 @@ while ($row = Database::fetch_array($result_select)) {
} else {
$allow_use_sub_language = '';
$all_information_of_sub_language = SubLanguageManager::get_all_information_of_language($row['id']);
$allow_add_term_sub_language = "&nbsp;<a href='sub_language.php?action=registersublanguage&id=".Security::remove_XSS($all_information_of_sub_language['parent_id'])."&sub_language_id=".Security::remove_XSS($row['id'])."'>".Display::return_icon('2rightarrow.png', get_lang('Add terms to the sub-language'), ['width' => ICON_SIZE_SMALL, 'height' => ICON_SIZE_SMALL])."</a>";
$allow_delete_sub_language = "&nbsp;<a href='sub_language_add.php?action=deletesublanguage&id=".Security::remove_XSS($all_information_of_sub_language['parent_id'])."&sub_language_id=".Security::remove_XSS($row['id'])."'>".Display::return_icon('delete.png', get_lang('Delete sub-language'), ['width' => ICON_SIZE_SMALL, 'height' => ICON_SIZE_SMALL])."</a>";
$allow_add_term_sub_language = "&nbsp;<a href='sub_language.php?action=registersublanguage&id=".Security::remove_XSS($all_information_of_sub_language['parent_id'])."&sub_language_id=".Security::remove_XSS($row['id'])."'>".Display::getMdiIcon(ActionIcon::VIEW_DETAILS, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Add terms to the sub-language'))."</a>";
$allow_delete_sub_language = "&nbsp;<a href='sub_language_add.php?action=deletesublanguage&id=".Security::remove_XSS($all_information_of_sub_language['parent_id'])."&sub_language_id=".Security::remove_XSS($row['id'])."'>".Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete sub-language'))."</a>";
}
}
if ($row['isocode'] == $currentLanguage) {
$row_td[] = Display::return_icon('visible.png', get_lang('Visible')).
$row_td[] = Display::getMdiIcon(StateIcon::ACTIVE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Visible')).
"<a href='".api_get_self()."?action=edit&id=".$row['id']."#value'>".
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>
&nbsp;".$setplatformlanguage.$allow_use_sub_language.$allow_add_term_sub_language.$allow_delete_sub_language;
} else {
if (1 == $row['available']) {
$row_td[] = "<a class=\"make_visible_and_invisible\" id=\"linktool_".$row['id']."\" href='".api_get_self()."?action=makeunavailable&id=".$row['id']."'>".
Display::return_icon('visible.png', get_lang('Make unavailable'), ['id' => 'imglinktool_'.$row['id']], ICON_SIZE_SMALL)."</a> <a href='".api_get_self()."?action=edit&id=".$row['id']."#value'>".Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL)."</a>&nbsp;".$setplatformlanguage.$allow_use_sub_language.$allow_add_term_sub_language.$allow_delete_sub_language;
Display::getMdiIcon(StateIcon::ACTIVE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Make unavailable'), ['id' => 'imglinktool_'.$row['id']])."</a> <a href='".api_get_self()."?action=edit&id=".$row['id']."#value'>".Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit'))."</a>&nbsp;".$setplatformlanguage.$allow_use_sub_language.$allow_add_term_sub_language.$allow_delete_sub_language;
} else {
$row_td[] = "<a class=\"make_visible_and_invisible\" id=\"linktool_".$row['id']."\" href='".api_get_self()."?action=makeavailable&id=".$row['id']."'>".
Display::return_icon('invisible.png', get_lang('Make available'), ['id' => 'imglinktool_'.$row['id']], ICON_SIZE_SMALL)."</a> <a href='".api_get_self()."?action=edit&id=".$row['id']."#value'>".Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL)."</a>&nbsp;".$setplatformlanguage.$allow_use_sub_language.$allow_add_term_sub_language.$allow_delete_sub_language;
Display::getMdiIcon(StateIcon::INACTIVE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Make available'), ['id' => 'imglinktool_'.$row['id']])."</a> <a href='".api_get_self()."?action=edit&id=".$row['id']."#value'>".Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit'))."</a>&nbsp;".$setplatformlanguage.$allow_use_sub_language.$allow_add_term_sub_language.$allow_delete_sub_language;
}
}
$language_data[] = $row_td;

@ -5,7 +5,7 @@
* Script to import students from LDAP.
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
// resetting the course id
$cidReset = true;
@ -54,7 +54,7 @@ $course = $_POST['course'];
if (empty($annee) && empty($course)) {
Display::display_header($tool_name);
echo '<div style="align:center">';
echo Display::return_icon('group.gif', get_lang('Select a filter to find a matching string at the end of the OU attribute'));
echo Display::getMdiIcon(ObjectIcon::GROUP, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Select a filter to find a matching string at the end of the OU attribute'));
echo get_lang('Select a filter to find a matching string at the end of the OU attribute');
//echo '<em>'.get_lang('In order to do this, you must enter the year, the component and the component's step').'</em><br />';
///echo get_lang('Follow each of these steps, step by step').'<br />';
@ -68,7 +68,7 @@ if (empty($annee) && empty($course)) {
} elseif (!empty($annee) && empty($course)) {
Display::display_header($tool_name);
echo '<div style="align:center">';
echo Display::return_icon('course.png', get_lang('Select a course in which you would like to register the users you are going to select next')).' '.get_lang('Select a course in which you would like to register the users you are going to select next').'<br />';
echo Display::getMdiIcon(ObjectIcon::COURSE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Select a course in which you would like to register the users you are going to select next')).' '.get_lang('Select a course in which you would like to register the users you are going to select next').'<br />';
echo '<form method="post" action="'.api_get_self().'?annee='.Security::remove_XSS($annee).'"><br />';
echo '<select name="course">';
$courses = CourseManager::get_courses_list();
@ -86,7 +86,7 @@ if (empty($annee) && empty($course)) {
echo '<div style="align: center;">';
echo '<br />';
echo '<br />';
echo '<h3>'.Display::return_icon('group.gif', get_lang('Select learners')).' '.get_lang('Select learners').'</h3>';
echo '<h3>'.Display::getMdiIcon(ObjectIcon::GROUP, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Select learners')).' '.get_lang('Select learners').'</h3>';
//echo "Connection ...";
$ds = ldap_connect($ldap_host, $ldap_port) or exit(get_lang('LDAP Connection Error'));
ldap_set_version($ds);

@ -4,7 +4,7 @@
* Edition script for sessions categories.
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
// resetting the course id
$cidReset = true;
@ -51,7 +51,7 @@ $id_session = $_POST['id_session'];
if (empty($annee) && empty($id_session)) {
Display::display_header($tool_name);
echo '<div style="align:center">';
echo Display::return_icon('group.gif', get_lang('Select a filter to find a matching string at the end of the OU attribute')).' '.get_lang('Select a filter to find a matching string at the end of the OU attribute');
echo Display::getMdiIcon(ObjectIcon::GROUP, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Select a filter to find a matching string at the end of the OU attribute')).' '.get_lang('Select a filter to find a matching string at the end of the OU attribute');
echo '<form method="get" action="'.api_get_self().'"><br />';
echo '<em>'.get_lang('The OU attribute filter').' :</em> ';
echo '<input type="text" name="annee" size="4" maxlength="30" value="'.$annee_base.'"> ';
@ -61,10 +61,13 @@ if (empty($annee) && empty($id_session)) {
} elseif (!empty($annee) && empty($id_session)) {
Display::display_header($tool_name);
echo '<div style="align:center">';
echo Display::return_icon(
'course.png',
get_lang('Select the session in which you want to import these users')
).' '.get_lang('Select the session in which you want to import these users').'<br />';
echo Display::getMdiIcon(
ObjectIcon::COURSE,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Select the session in which you want to import these users')
).' '.get_lang('Select the session in which you want to import these users').'<br />';
echo '<form method="post" action="'.api_get_self().'?annee='.Security::remove_XSS($annee).'"><br />';
echo '<select name="id_session">';
@ -91,7 +94,7 @@ elseif (!empty($annee) && !empty($id_session) && empty($_POST['confirmed'])) {
echo '<div style="align: center;">';
echo '<br />';
echo '<br />';
echo '<h3>'.Display::return_icon('group.gif', get_lang('Select learners')).' '.get_lang('Select learners').'</h3>';
echo '<h3>'.Display::getMdiIcon(ObjectIcon::GROUP, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Select learners')).' '.get_lang('Select learners').'</h3>';
//echo "Connection ...";
$ds = ldap_connect($ldap_host, $ldap_port) or exit(get_lang('LDAP Connection Error'));
ldap_set_version($ds);

@ -205,7 +205,7 @@ function sendlang() {
// action menu
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/legal_list.php">'.
Display::return_icon('search.gif', get_lang('Edit terms and conditions'), '').
Display::getMdiIcon(ActionIcon::SEARCH, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit terms and conditions')).
get_lang('All versions').'</a>';
echo '</div>';

@ -22,10 +22,7 @@ $parameters['sec_token'] = Security::get_token();
// action menu
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'admin/legal_add.php">';
echo Display::return_icon(
'edit.png',
get_lang('EditTerms and Conditions')
);
echo Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('EditTerms and Conditions'));
echo get_lang('EditTerms and Conditions').'</a>&nbsp;&nbsp;';
echo '</div>';

@ -2,6 +2,7 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -100,10 +101,10 @@ $extra_params['autowidth'] = 'true'; //use the width of the parent
$extra_params['height'] = 'auto'; //use the width of the parent
//With this function we can add actions to the jgrid
$action_links = 'function action_formatter (cellvalue, options, rowObject) {
return \'<a href="add_sessions_to_promotion.php?id=\'+options.rowId+\'">'.Display::return_icon('session_to_promotion.png', get_lang('Subscribe sessions to promotions'), '', ICON_SIZE_SMALL).'</a>'.
'&nbsp;<a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'.
'&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("Please confirm your choice"), ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=copy&id=\'+options.rowId+\'">'.Display::return_icon('copy.png', get_lang('Copy'), '', ICON_SIZE_SMALL).'</a>'.
'&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("Please confirm your choice"), ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a> \';
return \'<a href="add_sessions_to_promotion.php?id=\'+options.rowId+\'">'.Display::getMdiIcon(ObjectIcon::SESSION, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Subscribe sessions to promotions')).'</a>'.
'&nbsp;<a href="?action=edit&id=\'+options.rowId+\'">'.Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>'.
'&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("Please confirm your choice"), ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=copy&id=\'+options.rowId+\'">'.Display::getMdiIcon(ActionIcon::COPY_CONTENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Copy')).'</a>'.
'&nbsp;<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("Please confirm your choice"), ENT_QUOTES))."\'".')) return false;" href="?sec_token='.$token.'&action=delete&id=\'+options.rowId+\'">'.Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a> \';
}';
?>
@ -153,7 +154,7 @@ switch ($action) {
$promotion->display();
} else {
$actions = Display::url(
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')),
api_get_self()
);
echo Display::toolbarAction('promotion_actions', [$actions]);
@ -180,12 +181,7 @@ switch ($action) {
$promotion->display();
} else {
$actions = Display::url(
Display::return_icon(
'back.png',
get_lang('Back'),
'',
ICON_SIZE_MEDIUM
),
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')),
api_get_self()
);
echo Display::toolbarAction('promotion_actions', [$actions]);

@ -158,7 +158,7 @@ if ($formSent) {
$exercise->read($exerciseId);
$exerciseData .= $exercise->title.'&nbsp;';
$exerciseData .= Display::url(
Display::return_icon('edit.png', get_lang('Edit')),
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')),
$urlExercise.http_build_query(
[
'cidReq' => $courseCode,
@ -194,7 +194,7 @@ if ($formSent) {
$question->questionData .= '&nbsp;'.get_lang('Orphan question');
}
$question->questionData .= Display::url(
Display::return_icon('edit.png', get_lang('Edit')),
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')),
$urlExercise.http_build_query(
[
'cidReq' => $courseCode,

@ -6,6 +6,8 @@ use Chamilo\CoreBundle\Entity\SystemTemplate;
use ChamiloSession as Session;
use Symfony\Component\Filesystem\Filesystem;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
/**
* Library of the settings.php file.
@ -861,29 +863,27 @@ function handleSearch()
}
*/
$xapianLoaded = Display::return_icon('bullet_green.png', get_lang('Validate'));
$dir_exists = Display::return_icon('bullet_green.png', get_lang('Validate'));
$dir_is_writable = Display::return_icon('bullet_green.png', get_lang('Validate'));
$specific_fields_exists = Display::return_icon('bullet_green.png', get_lang('Validate'));
$xapianLoaded = Display::getMdiIcon(StateIcon::OPEN_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Validate'));
$dir_exists = Display::getMdiIcon(StateIcon::OPEN_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Validate'));
$dir_is_writable = Display::getMdiIcon(StateIcon::OPEN_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Validate'));
$specific_fields_exists = Display::getMdiIcon(StateIcon::OPEN_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Validate'));
//Testing specific fields
if (empty($specific_fields)) {
$specific_fields_exists = Display::return_icon(
'bullet_red.png',
get_lang('Add a specific search field')
$specific_fields_exists = Display::getMdiIcon(StateIcon::CLOSED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Add a specific search field')
);
}
//Testing xapian extension
if (!extension_loaded('xapian')) {
$xapianLoaded = Display::return_icon('bullet_red.png', get_lang('Error'));
$xapianLoaded = Display::getMdiIcon(StateIcon::CLOSED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Error'));
}
//Testing xapian searchdb path
if (!is_dir($xapianPath)) {
$dir_exists = Display::return_icon('bullet_red.png', get_lang('Error'));
$dir_exists = Display::getMdiIcon(StateIcon::CLOSED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Error'));
}
//Testing xapian searchdb path is writable
if (!is_writable($xapianPath)) {
$dir_is_writable = Display::return_icon('bullet_red.png', get_lang('Error'));
$dir_is_writable = Display::getMdiIcon(StateIcon::CLOSED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Error'));
}
$data = [];
@ -916,7 +916,7 @@ function handleTemplates()
if ('add' != $action) {
echo '<div class="actions" style="margin-left: 1px;">';
echo '<a href="settings.php?category=Templates&action=add">'.
Display::return_icon('new_template.png', get_lang('Add a template'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ObjectIcon::TEMPLATE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add a template')).'</a>';
echo '</div>';
}
@ -1059,8 +1059,8 @@ function getTemplateData($from, $number_of_items, $column, $direction)
*/
function actionsFilter($id)
{
$return = '<a href="settings.php?category=Templates&action=edit&id='.Security::remove_XSS($id).'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>';
$return .= '<a href="settings.php?category=Templates&action=delete&id='.Security::remove_XSS($id).'" onClick="javascript:if(!confirm('."'".get_lang('Please confirm your choice')."'".')) return false;">'.Display::return_icon('delete.png', get_lang('Delete'), '', ICON_SIZE_SMALL).'</a>';
$return = '<a href="settings.php?category=Templates&action=edit&id='.Security::remove_XSS($id).'">'.Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
$return .= '<a href="settings.php?category=Templates&action=delete&id='.Security::remove_XSS($id).'" onClick="javascript:if(!confirm('."'".get_lang('Please confirm your choice')."'".')) return false;">'.Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>';
return $return;
}
@ -1252,7 +1252,7 @@ function addEditTemplate()
'confirm'
);
echo '<a href="settings.php?category=Templates&action=add">'.
Display::return_icon('new_template.png', get_lang('Add a template'), '', ICON_SIZE_MEDIUM).
Display::getMdiIcon(ObjectIcon::TEMPLATE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add a template')).
'</a>';
} else {
$templateContent = '<head>'.$viewport.'<title>'.$values['title'].'</title>'.$bootstrap.'</head>'
@ -1375,13 +1375,13 @@ function generateSettingsForm($settings, $settings_by_access_list)
$form->addElement(
'html',
'<div class="float-right"><a class="share_this_setting" data_status = "0" data_to_send = "'.$row['variable'].'" href="javascript:void(0);">'.
Display::return_icon('shared_setting.png', get_lang('Change setting visibility for the other portals'), null, ICON_SIZE_MEDIUM).'</a></div>'
Display::getMdiIcon(StateIcon::SHARED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Change setting visibility for the other portals')).'</a></div>'
);
} else {
$form->addElement(
'html',
'<div class="float-right"><a class="share_this_setting" data_status = "1" data_to_send = "'.$row['variable'].'" href="javascript:void(0);">'.
Display::return_icon('shared_setting_na.png', get_lang('Change setting visibility for the other portals'), null, ICON_SIZE_MEDIUM).'</a></div>'
Display::getMdiIcon(StateIcon::SHARED_VISIBILITY, 'ch-tool-icon-disabled', null, ICON_SIZE_MEDIUM, get_lang('Change setting visibility for the other portals')).'</a></div>'
);
}
} else {
@ -1389,13 +1389,13 @@ function generateSettingsForm($settings, $settings_by_access_list)
$form->addElement(
'html',
'<div class="float-right">'.
Display::return_icon('shared_setting.png', get_lang('Change setting visibility for the other portals'), null, ICON_SIZE_MEDIUM).'</div>'
Display::getMdiIcon(StateIcon::SHARED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Change setting visibility for the other portals')).'</div>'
);
} else {
$form->addElement(
'html',
'<div class="float-right">'.
Display::return_icon('shared_setting_na.png', get_lang('Change setting visibility for the other portals'), null, ICON_SIZE_MEDIUM).'</div>'
Display::getMdiIcon(StateIcon::SHARED_VISIBILITY, 'ch-tool-icon-disabled', null, ICON_SIZE_MEDIUM, get_lang('Change setting visibility for the other portals')).'</div>'
);
}
}
@ -1662,7 +1662,7 @@ function generateSettingsForm($settings, $settings_by_access_list)
$url = PDF::get_watermark(null);
if (false != $url) {
$delete_url = '<a href="?delete_watermark">'.get_lang('Remove picture').' '.Display::return_icon('delete.png', get_lang('Remove picture')).'</a>';
$delete_url = '<a href="?delete_watermark">'.get_lang('Remove picture').' '.Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Remove picture')).'</a>';
$form->addElement('html', '<div style="max-height:100px; max-width:100px; margin-left:162px; margin-bottom:10px; clear:both;"><img src="'.$url.'" style="margin-bottom:10px;" />'.$delete_url.'</div>');
}
@ -1836,9 +1836,9 @@ function showSearchToolsStatusTable()
$output[] = '';
}
$icon = Display::return_icon('bullet_red.png', get_lang('Not installed'));
$icon = Display::getMdiIcon(StateIcon::CLOSED_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Not installed'));
if (!empty($output[0])) {
$icon = Display::return_icon('bullet_green.png', get_lang('Installed'));
$icon = Display::getMdiIcon(StateIcon::OPEN_VISIBILITY, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Installed'));
}
$data2[] = [$program, $output[0], $icon];
}

@ -2,6 +2,11 @@
/* For licensing terms, see /license.txt */
/**
* @deprecated This file is very likely completely deprecated. Adding 'exit;' command before deletion once sure - 20231231
*/
exit;
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;

@ -29,7 +29,7 @@ $form->addElement(
'static',
'search_advanced_link',
null,
'<a href="specific_fields_add.php">'.Display::return_icon('fieldadd.gif').get_lang('Add a specific search field').'</a>'
'<a href="specific_fields_add.php">'.Display::getMdiIcon('form-textbox', 'ch-tool-icon').get_lang('Add a specific search field').'</a>'
);
// Create a sortable table with specific fields data
@ -56,9 +56,9 @@ function edit_filter($id, $url_params, $row)
{
global $charset;
$return = '<a href="specific_fields_add.php?action=edit&field_id='.$row[0].'">'.
Display::return_icon('edit.gif', get_lang('Edit')).'</a>';
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
$return .= ' <a href="'.api_get_self().'?action=delete&field_id='.$row[0].'" onclick="javascript:if(!confirm('."'".addslashes(api_htmlentities(get_lang("Please confirm your choice"), ENT_QUOTES))."'".')) return false;">'.
Display::return_icon('delete.gif', get_lang('Delete')).'</a>';
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>';
return $return;
}

@ -586,7 +586,7 @@ switch ($report) {
}
}
$link = Display::url(
Display::return_icon('excel.png').'&nbsp;'.get_lang('ExportAsXLS'),
Display::getMdiIcon(ActionIcon::EXPORT_SPREADSHEET, 'ch-tool-icon').'&nbsp;'.get_lang('ExportAsXLS'),
$url,
['class' => 'btn btn--plain']
);
@ -769,7 +769,7 @@ switch ($report) {
$table->actionButtons = [
'export' => [
'label' => get_lang('ExportAsXLS'),
'icon' => Display::return_icon('excel.png'),
'icon' => Display::getMdiIcon(ActionIcon::EXPORT_SPREADSHEET,'ch-tool-icon'),
],
];

@ -11,7 +11,7 @@
* @todo use formvalidator for the form
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -43,7 +43,7 @@ function validate_filter() {
Display :: display_header($tool_name);
$link_add_group = '<a href="usergroups.php">'.
Display::return_icon('multiple.gif', get_lang('Enrolment by classes')).get_lang('Enrolment by classes').'</a>';
Display::getMdiIcon(ObjectIcon::MULTI_ELEMENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Enrolment by classes')).get_lang('Enrolment by classes').'</a>';
echo Display::toolbarAction('subscribe', [$link_add_group]);
$form = new FormValidator('subscribe_user2course');

@ -5,6 +5,7 @@
use Chamilo\CoreBundle\Entity\SysAnnouncement;
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
/**
* This page allows the administrator to manage the system announcements.
@ -90,7 +91,7 @@ function showCareer() {
Display::display_header($tool_name);
if ('add' !== $action && 'edit' !== $action) {
$actions = '<a href="?action=add">'.
Display::return_icon('add.png', get_lang('Add an announcement'), [], 32).'</a>';
Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add an announcement')).'</a>';
echo Display::toolbarAction('toolbar', [$actions]);
}
@ -428,28 +429,23 @@ if ($show_announcement_list) {
foreach ($announcements as $announcement) {
$row = [];
$row[] = $announcement->getId();
$row[] = Display::return_icon(
($announcement->isVisible() ? 'accept.png' : 'exclamation.png'),
($announcement->isVisible() ? get_lang('The announcement is available') : get_lang(
'The announcement is not available'
))
);
if ($announcement->isVisible()) {
$row[] =Display::getMdiIcon(StateIcon::COMPLETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('The announcement is available'));
} else {
$row[] =Display::getMdiIcon(StateIcon::WARNING, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('The announcement is not available'));
}
$row[] = $announcement->getTitle();
$row[] = api_convert_and_format_date($announcement->getDateStart());
$row[] = api_convert_and_format_date($announcement->getDateEnd());
$row[] = implode(', ', $announcement->getRoles());
/*$row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_TEACHER."&action=".($announcement->visible_teacher ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_teacher ? 'eyes.png' : 'eyes-close.png'), get_lang('Show/Hide'))."</a>";
$row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_STUDENT."&action=".($announcement->visible_student ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_student ? 'eyes.png' : 'eyes-close.png'), get_lang('Show/Hide'))."</a>";
$row[] = "<a href=\"?id=".$announcement->id."&person=".SystemAnnouncementManager::VISIBLE_GUEST."&action=".($announcement->visible_guest ? 'make_invisible' : 'make_visible')."\">".Display::return_icon(($announcement->visible_guest ? 'eyes.png' : 'eyes-close.png'), get_lang('Show/Hide'))."</a>";*/
$row[] = $announcement->getLang();
$row[] = "<a href=\"?action=edit&id=".$announcement->getId()."\">".
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>
<a
href=\"?action=delete&id=".$announcement->getId()."\"
title=".addslashes(api_htmlentities(get_lang('Please confirm your choice')))." class='delete-swal' >".
Display::return_icon('delete.png', get_lang('Delete'), [], ICON_SIZE_SMALL).
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).
"</a>";
$announcement_data[] = $row;
}

@ -9,6 +9,7 @@
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
// Resetting the course id.
$cidReset = true;
@ -401,12 +402,7 @@ $form->setDefaults([
]);
$leftActions = Display::url(
Display::return_icon(
'session.png',
get_lang('Course sessions'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon(ObjectIcon::SESSION, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Course sessions')),
api_get_path(WEB_CODE_PATH).'admin/teachers_time_by_session_report.php'
);
$exportUrlParams = [
@ -418,21 +414,11 @@ $exportUrlParams = [
'_qf__teacher_time_report' => '',
];
$rightActions = Display::url(
Display::return_icon(
'pdf.png',
get_lang('Export to PDF'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon(ActionIcon::EXPORT_PDF, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Export to PDF')),
api_get_self().'?export=pdf&'.http_build_query($exportUrlParams)
);
$rightActions .= Display::url(
Display::return_icon(
'export_excel.png',
get_lang('Excel export'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon(ActionIcon::EXPORT_SPREADSHEET, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Excel export')),
api_get_self().'?export=xls&'.http_build_query($exportUrlParams)
);

@ -179,11 +179,11 @@ if ($session) {
$view->assign('users', $usersInfo);
$actions = Display::url(
Display::return_icon('export_csv.png', get_lang('CSV export'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::EXPORT_CSV, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('CSV export')),
api_get_self().'?'.http_build_query(['export' => 'csv', 'session' => $session->getId()])
);
$actions .= Display::url(
Display::return_icon('export_excel.png', get_lang('Excel export'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::EXPORT_SPREADSHEET, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Excel export')),
api_get_self().'?'.http_build_query(['export' => 'xls', 'session' => $session->getId()])
);

@ -517,21 +517,11 @@ if ($error_drh) {
$actions = [
Display::url(
Display::return_icon(
'info.png',
get_lang('Information'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon(ActionIcon::INFORMATION, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Information')),
api_get_path(WEB_CODE_PATH).'admin/user_information.php?user_id='.$user_id
),
Display::url(
Display::return_icon(
'login_as.png',
get_lang('Login as'),
[],
ICON_SIZE_MEDIUM
),
Display::getMdiIcon(ActionIcon::LOGIN_AS, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Login as')),
api_get_path(WEB_CODE_PATH).
'admin/user_list.php?action=login_as&user_id='.$user_id.'&sec_token='.Security::getTokenFromSession()
),

@ -4,6 +4,9 @@
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
/**
* Script showing information about a user (name, e-mail, courses and sessions).
@ -43,11 +46,12 @@ $csvContent = [];
// only allow platform admins to login_as, or session admins only for students (not teachers nor other admins)
$actions = [
Display::url(
Display::return_icon(
'statistics.png',
get_lang('Reporting'),
[],
ICON_SIZE_MEDIUM
Display::getMdiIcon(
ToolIcon::TRACKING,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
get_lang('Reporting')
),
api_get_path(WEB_CODE_PATH).'my_space/myStudents.php?'.http_build_query([
'student' => $userId,
@ -58,11 +62,12 @@ $actions = [
if (api_can_login_as($userId)) {
$actions[] = Display::url(
Display::return_icon(
'login_as.png',
get_lang('Login as'),
[],
ICON_SIZE_MEDIUM
Display::getMdiIcon(
ActionIcon::LOGIN_AS,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
get_lang('Login as')
),
api_get_path(WEB_CODE_PATH).
'admin/user_list.php?action=login_as&user_id='.$userId.'&sec_token='.Security::getTokenFromSession()
@ -71,46 +76,55 @@ if (api_can_login_as($userId)) {
if (api_is_platform_admin()) {
$actions[] = Display::url(
Display::return_icon(
'edit.png',
get_lang('Edit'),
[],
ICON_SIZE_MEDIUM
Display::getMdiIcon(
ActionIcon::EDIT,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
get_lang('Edit')
),
api_get_path(WEB_CODE_PATH).'admin/user_edit.php?user_id='.$userId
);
$actions[] = Display::url(
Display::return_icon(
'export_csv.png',
get_lang('CSV export'),
[],
ICON_SIZE_MEDIUM
Display::getMdiIcon(
ActionIcon::EXPORT_CSV,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
get_lang('CSV export')
),
api_get_self().'?user_id='.$userId.'&action=export'
);
$actions[] = Display::url(
Display::return_icon(
'vcard.png',
get_lang('user information'),
[],
ICON_SIZE_MEDIUM
Display::getMdiIcon(
ObjectIcon::VCARD,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
get_lang('user information')
),
api_get_path(WEB_PATH).'main/social/vcard_export.php?userId='.$userId
);
$actions[] = Display::url(
Display::return_icon('new_group.png', get_lang('Add Human Resources Manager to user'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(
ObjectIcon::GROUP,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
get_lang('Add Human Resources Manager to user')
),
api_get_path(WEB_CODE_PATH).'admin/add_drh_to_user.php?u='.$userId
);
if (SkillModel::isAllowed($userId, false)) {
$actions[] = Display::url(
Display::return_icon(
'skill-badges.png',
get_lang('Add skill'),
[],
Display::getMdiIcon(
ObjectIcon::BADGE,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
false
get_lang('Add skill')
),
api_get_path(WEB_CODE_PATH).'skills/assign.php?user='.$userId
);
@ -187,10 +201,10 @@ if ('true' === api_get_setting('allow_terms_conditions')) {
$userId,
'legal_accept'
);
$icon = Display::return_icon('accept_na.png');
$icon = Display::getMdiIcon(StateIcon::COMPLETE, 'ch-tool-icon-disabled');
if (!empty($value['value'])) {
[$legalId, $legalLanguageId, $legalTime] = explode(':', $value['value']);
$icon = Display::return_icon('accept.png');
$icon = Display::getMdiIcon(StateIcon::COMPLETE, 'ch-tool-icon');
$timeLegalAccept = api_get_local_time($legalTime);
$btn = Display::url(
get_lang('Delete legal agreement'),
@ -316,18 +330,18 @@ if (count($sessions) > 0) {
}
$tools = Display::url(
Display::return_icon('statistics.png', get_lang('Statistics')),
Display::getMdiIcon(ToolIcon::TRACKING, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Statistics')),
api_get_path(WEB_CODE_PATH).'my_space/myStudents.php?details=true&student='.$userId.'&sid='.$sessionId.'&course='.$courseCode
);
$tools .= '&nbsp;<a href="course_information.php?id='.$courseId.'&id_session='.$sessionId.'">'.
Display::return_icon('info2.png', get_lang('Overview')).'</a>'.
Display::getMdiIcon(ActionIcon::INFORMATION, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Overview')).'</a>'.
'<a href="'.$courseUrl.'">'.
Display::return_icon('course_home.png', get_lang('Course home')).'</a>';
Display::getMdiIcon(ToolIcon::COURSE_HOME, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Course home')).'</a>';
/*if (!empty($my_course['status']) && STUDENT == $my_course['status']) {
$tools .= '<a
href="user_information.php?action=unsubscribe_session_course&course_id='.$courseId.'&user_id='.$userId.'&id_session='.$sessionId.'">'.
Display::return_icon('delete.png', get_lang('Delete')).'</a>';
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>';
}*/
$timeSpent = api_time_to_hms(
@ -363,7 +377,7 @@ if (count($sessions) > 0) {
$dates = SessionManager::parseSessionDates($session);
$certificateLink = Display::url(
Display::return_icon('pdf.png', get_lang('CertificateOfAchievement'), [], ICON_SIZE_SMALL),
Display::getMdiIcon(ActionIcon::EXPORT_PDF, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('CertificateOfAchievement')),
api_get_path(WEB_CODE_PATH).'my_space/session.php?'
.http_build_query(
[
@ -425,18 +439,18 @@ if (count($courseRelUserList) > 0) {
$courseUrl = api_get_course_url($courseId);
$tools = Display::url(
Display::return_icon('statistics.png', get_lang('Statistics')),
Display::getMdiIcon(ToolIcon::TRACKING, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Statistics')),
api_get_path(WEB_CODE_PATH).'my_space/myStudents.php?details=true&student='.$userId.'&sid=0&course='.$courseCode
);
$tools .= '&nbsp;<a href="course_information.php?id='.$courseId.'">'.
Display::return_icon('info2.png', get_lang('Overview')).'</a>'.
Display::getMdiIcon(ActionIcon::INFORMATION, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Overview')).'</a>'.
'<a href="'.$courseUrl.'">'.
Display::return_icon('course_home.png', get_lang('Course home')).'</a>'.
Display::getMdiIcon(ToolIcon::COURSE_HOME, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Course home')).'</a>'.
'<a href="course_edit.php?id='.$courseId.'">'.
Display::return_icon('edit.png', get_lang('Edit')).'</a>';
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>';
if (STUDENT == $courseRelUser->getStatus()) {
$tools .= '<a href="user_information.php?action=unsubscribe&course_id='.$courseId.'&user_id='.$userId.'">'.
Display::return_icon('delete.png', get_lang('Delete')).'</a>';
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>';
}
$timeSpent = api_time_to_hms(

@ -110,11 +110,11 @@ function getData(User $hrm, $status = HRM_REQUEST)
$result = [];
$iconAccept = Display::return_icon('accept.png', get_lang('Accept'));
$iconAccept = Display::getMdiIcon(ActionIcon::ACCEPT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Accept'));
$urlAccept = api_get_self().'?action=accept&hrm='.$hrm->getId().'&u=';
$iconReject = Display::return_icon('delete.png', get_lang('Reject'));
$iconReject = Display::getMdiIcon(ActionIcon::REJECT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Reject'));
$urlReject = api_get_self().'?action=reject&hrm='.$hrm->getId().'&u=';
$iconRemove = Display::return_icon('delete.png', get_lang('Remove'));
$iconRemove = Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Remove'));
$urlRemove = api_get_self().'?action=remove&hrm='.$hrm->getId().'&u=';
foreach ($requests as $request) {

@ -3,7 +3,7 @@
/* For licensing terms, see /license.txt */
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
/**
* @author Bart Mollet
@ -843,35 +843,37 @@ function active_filter($active, $params, $row)
{
$_user = api_get_user_info();
$action = 'Unlock';
$image = StateIcon::WARNING;
if ('1' == $active) {
$action = 'Lock';
$image = 'accept'; //mdi-check-circle
$image = StateIcon::COMPLETE;
} elseif ('-1' == $active) {
$action = 'edit';
$image = 'warning'; //mdi-alert-circle
} elseif ('0' == $active) {
$action = 'Unlock';
$image = 'error'; //mdi-minus-circle
$image = StateIcon::EXPIRED;
}
$result = '';
if ('edit' === $action) {
$result = Display::return_icon(
$image.'.png',
get_lang('Account expired'),
[],
16
$result = Display::getMdiIcon(
$image,
'ch-tool-icon',
null,
ICON_SIZE_TINY,
get_lang('Account expired')
);
} elseif ($row['0'] != $_user['user_id']) {
// you cannot lock yourself out otherwise you could disable all the
// accounts including your own => everybody is locked out and nobody
// can change it anymore.
$result = Display::return_icon(
$image.'.png',
$result = Display::getMdiIcon(
$image,
'ch-tool-icon',
null,
ICON_SIZE_TINY,
get_lang(ucfirst($action)),
['onclick' => 'active_user(this);', 'id' => 'img_'.$row['0']],
16
['onclick' => 'active_user(this);', 'id' => 'img_'.$row['0']]
);
}

@ -4,6 +4,8 @@
use ChamiloSession as Session;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\StateIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
/**
* @author Bart Mollet
@ -263,7 +265,7 @@ function get_user_data($from, $number_of_items, $column, $direction)
*
* @return string HTML-code with a mailto-link
*/
function email_filter($email)
function email_filter($email): string
{
return Display::encrypted_mailto_link($email, $email);
}
@ -276,12 +278,12 @@ function email_filter($email)
*
* @return string HTML-code with a mailto-link
*/
function user_filter($name, $params, $row)
function user_filter($name, $params, $row): string
{
return '<a href="'.api_get_path(WEB_PATH).'whoisonline.php?origin=user_list&id='.$row[0].'">'.$name.'</a>';
}
function requestTypeFilter($fieldId, $url_params, $row)
function requestTypeFilter($fieldId, $url_params, $row): string
{
$extraFields = Session::read('data_privacy_extra_fields');
$extraFieldId = $extraFields['delete_legal'];
@ -304,17 +306,17 @@ function requestTypeFilter($fieldId, $url_params, $row)
*
* @return string Some HTML-code with modify-buttons
*/
function modify_filter($user_id, $url_params, $row)
function modify_filter($user_id, $url_params, $row): string
{
$_admins_list = Session::read('admin_list', []);
$is_admin = in_array($user_id, $_admins_list);
$token = Security::getTokenFromSession();
$result = '';
$result .= '<a href="user_information.php?user_id='.$user_id.'">'.
Display::return_icon('info2.png', get_lang('Information')).'</a>&nbsp;&nbsp;';
Display::getMdiIcon(ActionIcon::INFORMATION, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Information')).'</a>&nbsp;&nbsp;';
$result .= Display::url(
Display::return_icon('message_new.png', get_lang('Send message')),
Display::getMdiIcon(ActionIcon::SEND_MESSAGE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Send message')),
api_get_path(WEB_CODE_PATH).'messages/new_message.php?send_to_user='.$user_id
);
$result .= '&nbsp;&nbsp;';
@ -323,7 +325,7 @@ function modify_filter($user_id, $url_params, $row)
if ($row[10] == $extraFieldId) {
$result .= Display::url(
Display::return_icon('delete_terms.png', get_lang('Remove legal agreement')),
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Remove legal agreement')),
api_get_self().'?user_id='.$user_id.'&action=delete_terms&sec_token='.$token
);
$result .= '&nbsp;&nbsp;';
@ -333,47 +335,26 @@ function modify_filter($user_id, $url_params, $row)
$result .= ' <a href="'.api_get_self().'?action=anonymize&user_id='.$user_id.'&'.$url_params.'&sec_token='.$token.'" onclick="javascript:if(!confirm('."'".addslashes(
api_htmlentities(get_lang('Please confirm your choice'))
)."'".')) return false;">'.
Display::return_icon(
'anonymous.png',
get_lang('Anonymize'),
[],
ICON_SIZE_SMALL
).
Display::getMdiIcon(ObjectIcon::ANONYMOUS, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Anonymize')).
'</a>';
$result .= ' <a href="'.api_get_self().'?action=delete_user&user_id='.$user_id.'&'.$url_params.'&sec_token='.$token.'" onclick="javascript:if(!confirm('."'".addslashes(
api_htmlentities(get_lang('Please confirm your choice'))
)."'".')) return false;">'.
Display::return_icon(
'delete.png',
get_lang('Delete'),
[],
ICON_SIZE_SMALL
).
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).
'</a>';
}
$editProfileUrl = Display::getProfileEditionLink($user_id, true);
$result .= '<a href="'.$editProfileUrl.'">'.
Display::return_icon(
'edit.png',
get_lang('Edit'),
[],
ICON_SIZE_SMALL
).
Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).
'</a>&nbsp;';
if ($is_admin) {
$result .= Display::return_icon(
'admin_star.png',
get_lang('Is administrator'),
['width' => ICON_SIZE_SMALL, 'heigth' => ICON_SIZE_SMALL]
);
$result .= Display::getMdiIcon(ObjectIcon::STAR, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Is administrator'));
} else {
$result .= Display::return_icon(
'admin_star_na.png',
get_lang('Is not administrator')
$result .= Display::getMdiIcon(ObjectIcon::STAR, 'ch-tool-icon-disabled', null, ICON_SIZE_SMALL, get_lang('Is not administrator')
);
}
@ -392,39 +373,41 @@ function modify_filter($user_id, $url_params, $row)
*
* @return string Some HTML-code with the lock/unlock button
*/
function active_filter($active, $params, $row)
function active_filter($active, $params, $row): string
{
$_user = api_get_user_info();
$action = 'Unlock';
$image = StateIcon::WARNING;
if ('1' == $active) {
$action = 'Lock';
$image = 'accept';
$image = StateIcon::COMPLETE;
} elseif ('-1' == $active) {
$action = 'edit';
$image = 'warning';
} elseif ('0' == $active) {
$action = 'Unlock';
$image = 'error';
$image = StateIcon::EXPIRED;
}
$result = '';
if ('edit' === $action) {
$result = Display::return_icon(
$image.'.png',
$result = Display::getMdiIcon(
$image,
'ch-tool-icon',
null,
ICON_SIZE_TINY,
get_lang('Account expired'),
[],
16
);
} elseif ($row['0'] != $_user['user_id']) {
// you cannot lock yourself out otherwise you could disable all the
// accounts including your own => everybody is locked out and nobody
// can change it anymore.
$result = Display::return_icon(
$image.'.png',
$result = Display::getMdiIcon(
$image,
'ch-tool-icon',
null,
ICON_SIZE_TINY,
get_lang(ucfirst($action)),
['onclick' => 'active_user(this);', 'id' => 'img_'.$row['0']],
16
['onclick' => 'active_user(this);', 'id' => 'img_'.$row['0']]
);
}

@ -701,7 +701,7 @@ Display::addFlash(
);
Display::display_header(get_lang('Move users results from/to a session'));
echo '<div class="actions">';
echo '<a href="../admin/index.php">'.Display::return_icon('back.png', get_lang('Back to').' '.get_lang('Administration'), '', ICON_SIZE_MEDIUM).'</a>';
echo '<a href="../admin/index.php">'.Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back to').' '.get_lang('Administration')).'</a>';
echo '</div>';
// Some pagination

@ -3,6 +3,7 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
require_once __DIR__.'/../inc/global.inc.php';
@ -204,11 +205,11 @@ $extraParams['sortname'] = 'name';
$extraParams['sortorder'] = 'desc';
$extraParams['multiselect'] = $allowEdit;
$deleteIcon = Display::return_icon('delete.png', get_lang('Delete'), null, ICON_SIZE_SMALL);
$deleteIcon = Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete'));
$urlStats = api_get_path(WEB_CODE_PATH);
$reportingIcon = Display::return_icon('statistics.png', get_lang('Reporting'), '', ICON_SIZE_SMALL);
$controlPoint = Display::return_icon('add.png', get_lang('Control point'), '', ICON_SIZE_SMALL);
$reportingIcon = Display::getMdiIcon(ToolIcon::TRACKING, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Reporting'));
$controlPoint = Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Control point'));
$link = '';
@ -220,7 +221,7 @@ $deleteButton = '';
if ($allowEdit) {
$deleteButton = '<a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang('Please confirm your choice'), ENT_QUOTES))."\'".')) return false;" href="?id='.$id.'&action=delete&user_id=\'+options.rowId+\'">'.$deleteIcon.'</a>';
}
//return \'<a href="session_edit.php?page=resume_session.php&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), '', ICON_SIZE_SMALL).'</a>'.
//return \'<a href="session_edit.php?page=resume_session.php&id=\'+options.rowId+\'">'.Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>'.
// With this function we can add actions to the jgrid
$action_links = '
function action_formatter(cellvalue, options, rowObject) {
@ -246,7 +247,7 @@ function extra_formatter(cellvalue, options, rowObject) {
return calendarName;
return \''.
'&nbsp;<a href="'.$urlStats.'my_space/myStudents.php?student=\'+options.rowId+\'">'.Display::return_icon('statistics.png', get_lang('Reporting'), '', ICON_SIZE_SMALL).'</a>'.
'&nbsp;<a href="'.$urlStats.'my_space/myStudents.php?student=\'+options.rowId+\'">'.Display::getMdiIcon(ToolIcon::TRACKING, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Reporting')).'</a>'.
' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("Please confirm your choice"), ENT_QUOTES))."\'".')) return false;" href="?id='.$id.'&action=delete&user_id=\'+options.rowId+\'">'.$deleteIcon.'</a>\';
}';

@ -4,6 +4,7 @@
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
$cidReset = true;
@ -61,11 +62,11 @@ $extra_params['sortorder'] = 'desc';
// With this function we can add actions to the jgrid
$action_links = 'function action_formatter (cellvalue, options, rowObject) {
return \''
.' <a href="add_users_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('user_to_class.png', get_lang('Subscribe users to class'), null, ICON_SIZE_MEDIUM).'</a>'
.' <a href="add_courses_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('course_to_class.png', get_lang('Subscribe class to courses'), null, ICON_SIZE_MEDIUM).'</a>'
.' <a href="add_sessions_to_usergroup.php?id=\'+options.rowId+\'">'.Display::return_icon('sessions_to_class.png', get_lang('SubscribeClassToCourse sessions'), null, ICON_SIZE_MEDIUM).'</a>'
.' <a href="?action=edit&id=\'+options.rowId+\'">'.Display::return_icon('edit.png', get_lang('Edit'), null, ICON_SIZE_SMALL).'</a>'
.' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("Please confirm your choice"), ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'">'.Display::return_icon('delete.png', get_lang('Delete'), null, ICON_SIZE_SMALL).'</a>\';
.' <a href="add_users_to_usergroup.php?id=\'+options.rowId+\'">'.Display::getMdiIcon(ObjectIcon::USER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Subscribe users to class')).'</a>'
.' <a href="add_courses_to_usergroup.php?id=\'+options.rowId+\'">'.Display::getMdiIcon(ObjectIcon::COURSE, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Subscribe class to courses')).'</a>'
.' <a href="add_sessions_to_usergroup.php?id=\'+options.rowId+\'">'.Display::getMdiIcon(ObjectIcon::SESSION, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('SubscribeClassToCourse sessions')).'</a>'
.' <a href="?action=edit&id=\'+options.rowId+\'">'.Display::getMdiIcon(ActionIcon::EDIT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Edit')).'</a>'
.' <a onclick="javascript:if(!confirm('."\'".addslashes(api_htmlentities(get_lang("Please confirm your choice"), ENT_QUOTES))."\'".')) return false;" href="?action=delete&id=\'+options.rowId+\'">'.Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>\';
}';
$usergroup->showGroupTypeSetting = true;
@ -107,7 +108,7 @@ switch ($action) {
exit;
} else {
$actions = '<a href="'.api_get_self().'">'.
Display::return_icon('back.png', get_lang('Back'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Back')).'</a>';
$content .= Display::toolbarAction('toolbar', [$actions]);
$token = Security::get_token();
$form->addElement('hidden', 'sec_token');
@ -157,11 +158,12 @@ switch ($action) {
header('Location: '.api_get_self());
exit;
} else {
$actions = '<a href="'.api_get_self().'">'.Display::return_icon(
'back.png',
get_lang('Back'),
'',
ICON_SIZE_MEDIUM
$actions = '<a href="'.api_get_self().'">'.Display::getMdiIcon(
ActionIcon::BACK,
'ch-tool-icon',
null,
ICON_SIZE_MEDIUM,
get_lang('Back')
).'</a>';
$content .= Display::toolbarAction('toolbar', [$actions]);
$content .= $form->returnForm();

Loading…
Cancel
Save