Display: Update icons in members tool

pull/5028/head
Yannick Warnier 11 months ago
parent 5eb233a0e9
commit 5ac4803b41
  1. 10
      public/main/user/add_users_to_session.php
  2. 6
      public/main/user/class.php
  3. 15
      public/main/user/resume_session.php
  4. 11
      public/main/user/session_list.php
  5. 3
      public/main/user/subscribe_user.php
  6. 19
      public/main/user/user.php

@ -469,15 +469,15 @@ if ('true' === $allowTutors) {
if ('multiple' === $add_type) {
$link_add_type_unique = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.Security::remove_XSS($_GET['add']).'&add_type=unique">'.
Display::return_icon('single.gif').get_lang('Single registration').'</a>';
$link_add_type_multiple = Display::return_icon('multiple.gif').get_lang('Multiple registration');
Display::getMdiIcon('note-outline', 'ch-tool-icon', null, ICON_SIZE_SMALL).get_lang('Single registration').'</a>';
$link_add_type_multiple = Display::getMdiIcon('note-multiple-outline', 'ch-tool-icon', null, ICON_SIZE_SMALL).get_lang('Multiple registration');
} else {
$link_add_type_unique = Display::return_icon('single.gif').get_lang('Single registration');
$link_add_type_unique = Display::getMdiIcon('note-outline', 'ch-tool-icon', null, ICON_SIZE_SMALL).get_lang('Single registration');
$link_add_type_multiple = '<a href="'.api_get_self().'?id_session='.$id_session.'&add='.Security::remove_XSS($_GET['add']).'&add_type=multiple">'.
Display::return_icon('multiple.gif').get_lang('Multiple registration').'</a>';
Display::getMdiIcon('note-multiple-outline', 'ch-tool-icon', null, ICON_SIZE_SMALL).get_lang('Multiple registration').'</a>';
}
$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('note-multiple-outline', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Enrolment by classes')).get_lang('Enrolment by classes').'</a>'; ?>
<div class="actions">
<?php echo $link_add_type_unique; ?>&nbsp;|&nbsp;<?php echo $link_add_type_multiple; ?>&nbsp;|&nbsp;<?php echo $link_add_group; ?>
</div>

@ -2,6 +2,8 @@
/* For licensing terms, see /license.txt */
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
$this_section = SECTION_COURSES;
@ -44,10 +46,10 @@ $sessionId = api_get_session_id();
if (api_is_allowed_to_edit()) {
if ('registered' === $type) {
$actionsLeft .= '<a href="class.php?'.api_get_cidreq().'&type=not_registered">'.
Display::return_icon('add-class.png', get_lang('Add classes to a course'), [], ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add classes to a course')).'</a>';
} else {
$actionsLeft .= '<a href="class.php?'.api_get_cidreq().'&type=registered">'.
Display::return_icon('back.png', get_lang('Classes'), [], ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::BACK, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Classes')).'</a>';
$form = new FormValidator(
'groups',

@ -10,6 +10,7 @@ use Chamilo\CoreBundle\Component\Utils\NameConvention;
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Entity\SessionRelCourseRelUser;
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -98,9 +99,7 @@ if ('true' === $allowTutors) {
Display::display_header($tool_name);
echo Display::page_header(
Display::return_icon(
'session.png',
get_lang('Session')
Display::getMdiIcon('google-classroom', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Session')
).' '.$session->getName()
);
echo Display::page_subheader(get_lang('General properties').$url); ?>
@ -257,8 +256,8 @@ if ('true' === $allowTutors) {
if ($multiple_url_is_on) {
if ($user['access_url_id'] != $url_id) {
$user_link .= ' '.Display::return_icon('warning.png', get_lang('Users not added to the URL'), [], ICON_SIZE_SMALL);
$add = Display::return_icon('add.png', get_lang('Add users to an URL'), [], ICON_SIZE_SMALL);
$user_link .= ' '.Display::getMdiIcon('alert', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Users not added to the URL'));
$add = Display::getMdiIcon(ActionIcon::ADD, get_lang('Add users to an URL'));
$link_to_add_user_in_url = '<a href="resume_session.php?action=add_user_to_url&id_session='.$id_session.'&user_id='.$user['user_id'].'">'.$add.'</a>';
}
}
@ -269,11 +268,11 @@ if ('true' === $allowTutors) {
</td>
<td>
<a href="../my_space/myStudents.php?student='.$user['user_id'].''.$orig_param.'">'.
Display::return_icon('statistics.gif', get_lang('Reporting')).'</a>&nbsp;
Display::getMdiIcon('chart-box', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Reporting')).'</a>&nbsp;
<a href="session_course_user.php?id_user='.$user['user_id'].'&id_session='.$id_session.'">'.
Display::return_icon('course.png', get_lang('Block user from courses in this session')).'</a>&nbsp;
Display::getMdiIcon('book-open-page-variant', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Block user from courses in this session')).'</a>&nbsp;
<a href="'.api_get_self().'?id_session='.$id_session.'&action=delete&user='.$user['user_id'].'" onclick="javascript:if(!confirm(\''.get_lang('Please confirm your choice').'\')) return false;">'.
Display::return_icon('delete.png', get_lang('Delete')).'</a>
Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Delete')).'</a>
'.$link_to_add_user_in_url.'
</td>
</tr>';

@ -5,6 +5,9 @@
/**
* List sessions in an efficient and usable way.
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
$cidReset = true;
require_once __DIR__.'/../inc/global.inc.php';
@ -74,7 +77,7 @@ $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 \'&nbsp;<a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::return_icon('user_subscribe_session.png', get_lang('Subscribe users to this session'), '', ICON_SIZE_SMALL).'</a>'.
return \'&nbsp;<a href="add_users_to_session.php?page=session_list.php&id_session=\'+options.rowId+\'">'.Display::getMdiIcon('account-plus-outline', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Subscribe users to this session')).'</a>'.
'\';
}';
?>
@ -139,11 +142,11 @@ $(function() {
if (api_is_platform_admin()) {
echo '<div class="actions">';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_add.php">'.
Display::return_icon('new_session.png', get_lang('Add a training session'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::ADD, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add a training session')).'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/add_many_session_to_category.php">'.
Display::return_icon('session_to_category.png', get_lang('Add a training sessionsInCategories'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon(ActionIcon::CREATE_CATEGORY, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add a training sessionsInCategories')).'</a>';
echo '<a href="'.api_get_path(WEB_CODE_PATH).'session/session_category_list.php">'.
Display::return_icon('folder.png', get_lang('Sessions categories list'), '', ICON_SIZE_MEDIUM).'</a>';
Display::getMdiIcon('file-tree-outline', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Sessions categories list')).'</a>';
echo '</div>';
}
echo Display::grid_html('sessions');

@ -4,6 +4,7 @@
use Chamilo\CoreBundle\Entity\ExtraField;
use ExtraField as ExtraFieldModel;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* This script allows teachers to subscribe existing users
@ -185,7 +186,7 @@ $actionsLeft = Display::url(
if (isset($_GET['subscribe_user_filter_value']) && !empty($_GET['subscribe_user_filter_value'])) {
$actionsLeft .= '<a href="subscribe_user.php?type='.$type.'">'.
Display::return_icon('clean_group.gif').' '.get_lang('Clear filter results').'</a>';
Display::getMdiIcon(ActionIcon::RESET, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Clear filter results')).' '.get_lang('Clear filter results').'</a>';
}
$extraForm = '';
if ('true' === api_get_setting('ProfilingFilterAddingUsers')) {

@ -4,6 +4,7 @@
use Chamilo\CoreBundle\Entity\Session;
use Chamilo\CoreBundle\Framework\Container;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
/**
* This script displays a list of the users of the current course.
@ -591,7 +592,7 @@ if ($canRead) {
$selectedTab = 1;
$url = api_get_path(WEB_CODE_PATH).'user/subscribe_user.php?'.api_get_cidreq().'&type='.STUDENT;
$icon = Display::url(
Display::return_icon('add-user.png', get_lang('Add'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::ADD_USER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add')),
$url
);
break;
@ -599,7 +600,7 @@ if ($canRead) {
$selectedTab = 2;
$url = api_get_path(WEB_CODE_PATH).'user/subscribe_user.php?'.api_get_cidreq().'&type='.COURSEMANAGER;
$icon = Display::url(
Display::return_icon('add-teacher.png', get_lang('Add'), [], ICON_SIZE_MEDIUM),
Display::getMdiIcon(ActionIcon::ADD_USER, 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Add')),
$url
);
break;
@ -612,19 +613,19 @@ if ($canRead) {
if ($canRead) {
$actionsLeft .= '<a href="user.php?'.api_get_cidreq().'&action=export&format=csv&type='.$type.'">'.
Display::return_icon('export_csv.png', get_lang('CSV export'), [], ICON_SIZE_MEDIUM).'</a> ';
Display::getMdiIcon('export_csv', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('CSV export')).'</a> ';
$actionsLeft .= '<a href="user.php?'.api_get_cidreq().'&action=export&format=xls&type='.$type.'">'.
Display::return_icon('export_excel.png', get_lang('Excel export'), [], ICON_SIZE_MEDIUM).'</a> ';
Display::getMdiIcon('export_excel', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Excel export')).'</a> ';
}
if ($canEditUsers && $canEdit) {
$actionsLeft .= '<a href="user_import.php?'.api_get_cidreq().'&action=import&type='.$type.'">'.
Display::return_icon('import_csv.png', get_lang('Import users list'), [], ICON_SIZE_MEDIUM).'</a> ';
Display::getMdiIcon('import_csv', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Import users list')).'</a> ';
}
if ($canRead) {
$actionsLeft .= '<a href="user.php?'.api_get_cidreq().'&action=export&format=pdf&type='.$type.'">'.
Display::return_icon('pdf.png', get_lang('Export to PDF'), [], ICON_SIZE_MEDIUM).'</a> ';
Display::getMdiIcon('pdf', 'ch-tool-icon', null, ICON_SIZE_MEDIUM, get_lang('Export to PDF')).'</a> ';
}
// Build search-form
@ -1021,7 +1022,7 @@ function modify_filter($user_id, $row, $data)
if ($is_allowed_to_track) {
$result .= '<a href="../my_space/myStudents.php?'.api_get_cidreq().'&student='.$user_id.'&details=true&course='.$courseId.'&origin=user_course&id_session='.api_get_session_id().'"
title="'.get_lang('Reporting').'">
'.Display::return_icon('statistics.png', get_lang('Reporting')).'
'.Display::getMdiIcon('statistics', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Reporting')).'
</a>';
}
@ -1030,7 +1031,7 @@ function modify_filter($user_id, $row, $data)
if (api_is_platform_admin()) {
$result .= ' <a
href="'.api_get_path(WEB_CODE_PATH).'admin/user_list.php?action=login_as&user_id='.$user_id.'&sec_token='.Security::getTokenFromSession().'">'.
Display::return_icon('login_as.png', get_lang('Login as')).'</a>&nbsp;&nbsp;';
Display::getMdiIcon('login_as', 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Login as')).'</a>&nbsp;&nbsp;';
}
if (api_is_allowed_to_edit(null, true)) {
@ -1054,7 +1055,7 @@ function modify_filter($user_id, $row, $data)
$result .= '<a href="'.
api_get_path(WEB_CODE_PATH).'extra/userInfo.php?'.api_get_cidreq().'&editMainUserInfo='.$user_id.'"
title="'.get_lang('Edit').'" >'.
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;';
}

Loading…
Cancel
Save