Display: Use new icons in course maintenance and settings tools

pull/5031/head
Yannick Warnier 11 months ago
parent 197e6b8125
commit af4a90d3ea
  1. 29
      public/main/course_info/infocours.php
  2. 11
      public/main/course_info/maintenance.php
  3. 10
      public/main/course_info/maintenance_coach.php
  4. 4
      public/main/inc/lib/formvalidator/FormValidator.class.php

@ -4,6 +4,9 @@
use Chamilo\CoreBundle\Framework\Container;
use Symfony\Component\HttpFoundation\File\UploadedFile;
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
use Chamilo\CoreBundle\Component\Utils\ToolIcon;
use Chamilo\CoreBundle\Component\Utils\ObjectIcon;
/**
* Code to display the course settings form (for the course admin)
@ -149,7 +152,7 @@ if ('true' === api_get_setting('pdf_export_watermark_by_course')) {
$form->addText('pdf_export_watermark_text', get_lang('PDF watermark text'), false, ['size' => '60']);
$form->addElement('file', 'pdf_export_watermark_path', get_lang('Upload a watermark image'));
if (false != $url) {
$delete_url = '<a href="?delete_watermark">'.Display::return_icon('delete.png', get_lang('Remove picture')).'</a>';
$delete_url = '<a href="?delete_watermark">'.Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Remove picture')).'</a>';
$form->addElement(
'html',
'<div class="row"><div class="form"><a href="'.$url.'">'.$url.' '.$delete_url.'</a></div></div>'
@ -262,7 +265,7 @@ $form->addPanelOption(
'course_access',
get_lang('Course access'),
$elements,
'course.png',
ToolIcon::COURSE,
false
);
@ -304,7 +307,7 @@ $form->addPanelOption(
'documents',
get_lang('Documents'),
$globalGroup,
'folder.png',
ToolIcon::DOCUMENT,
false
);
@ -447,7 +450,7 @@ $form->addPanelOption(
'email-notifications',
get_lang('E-mail notifications'),
$globalGroup,
'mail.png',
ActionIcon::SEND_MESSAGE,
false
);
@ -528,7 +531,7 @@ $form->addPanelOption(
'users',
get_lang('User rights'),
$globalGroup,
'user.png',
ToolIcon::MEMBER,
false
);
@ -559,7 +562,7 @@ $form->addPanelOption(
'chat',
get_lang('Chat settings'),
$globalGroup,
'chat.png',
ToolIcon::CHAT,
false
);
@ -680,7 +683,7 @@ $form->addPanelOption(
'config_lp',
get_lang('Learning path settings'),
$globalGroup,
'scorms.png',
ToolIcon::LP,
false
);
@ -722,7 +725,7 @@ if ('true' === api_get_setting('exercise.allow_exercise_auto_launch')) {
'config_exercise',
get_lang('Test'),
$globalGroup,
'quiz.png',
ToolIcon::QUIZ,
false
);
}
@ -768,7 +771,7 @@ $form->addPanelOption(
'thematic',
get_lang('Thematic advance configuration'),
$globalGroup,
'course_progress.png',
ToolIcon::COURSE_PROGRESS,
false
);
@ -793,7 +796,7 @@ if ('true' === api_get_setting('allow_public_certificates')) {
'certificate',
get_lang('Certificates'),
$globalGroup,
null,
ObjectIcon::CERTIFICATE,
false
);
}
@ -827,7 +830,7 @@ $form->addPanelOption(
'forum',
get_lang('Forum'),
$globalGroup,
'forum.png',
ToolIcon::FORUM,
false
);
@ -852,7 +855,7 @@ $form->addPanelOption(
'student-publication',
get_lang('Assignments'),
$globalGroup,
'work.png',
ToolIcon::ASSIGNMENT,
false
);
@ -870,7 +873,7 @@ $html = [
'lti_tool',
$translator->trans('External tools'),
$html,
'plugin.png',
ToolIcon::PLUGIN,
false
);*/

@ -4,6 +4,9 @@
/**
* @author Created on 18 October 2006 by Elixir Interactive http://www.elixir-interactive.com
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_MAINTENANCE;
$this_section = SECTION_COURSES;
@ -23,7 +26,7 @@ echo Display::page_header($nameTools);
?>
<div class="sectiontitle">
<?php echo Display::return_icon('save_import.gif', get_lang('Backup and import and import')); ?>&nbsp;&nbsp;
<?php echo Display::getMdiIcon(ActionIcon::IMPORT_ARCHIVE, get_lang('Backup and import and import')); ?>&nbsp;&nbsp;
<?php echo get_lang('Backup and import and import'); ?>
</div>
<div class="sectioncomment">
@ -50,7 +53,7 @@ echo Display::page_header($nameTools);
</div>
<div class="sectiontitle">
<?php echo Display::return_icon('copy.gif', get_lang('Copy course')); ?>&nbsp;&nbsp;
<?php echo Display::getMdiIcon(ActionIcon::COPY_CONTENT, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Copy course')); ?>&nbsp;&nbsp;
<a href="../course_copy/copy_course.php?<?php echo api_get_cidreq(); ?>">
<?php echo get_lang('Copy course'); ?></a>
</div>
@ -58,7 +61,7 @@ echo Display::page_header($nameTools);
</div>
<div class="sectiontitle">
<?php echo Display::return_icon('delete.png', get_lang('Empty this course')); ?>&nbsp;&nbsp;
<?php echo Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Empty this course')); ?>&nbsp;&nbsp;
<a href="../course_copy/recycle_course.php?<?php echo api_get_cidreq(); ?>">
<?php echo get_lang('Empty this course'); ?>
</a>
@ -66,7 +69,7 @@ echo Display::page_header($nameTools);
<div class="sectioncomment"><?php echo get_lang('This tool empties the course. It removes documents, forums, links. And allows you to select what parts you want to remove or decide to remove the whole.'); ?></div>
<div class="sectiontitle">
<?php echo Display::return_icon('delete.png', get_lang('Completely delete this course')); ?>&nbsp;&nbsp;
<?php echo Display::getMdiIcon(ActionIcon::DELETE, 'ch-tool-icon', null, ICON_SIZE_SMALL, get_lang('Completely delete this course')); ?>&nbsp;&nbsp;
<a href="../course_info/delete_course.php?<?php echo api_get_cidreq(); ?>"><?php echo get_lang('Completely delete this course'); ?>
</a>
</div>

@ -6,6 +6,9 @@
* @author Julio Montoya <julio.montoya@beeznest.com>
* @author Angel Fernando Quiroz Campos <angel.quiroz@beeznest.com>
*/
use Chamilo\CoreBundle\Component\Utils\ActionIcon;
require_once __DIR__.'/../inc/global.inc.php';
$current_course_tool = TOOL_COURSE_MAINTENANCE;
@ -24,8 +27,11 @@ if ('true' !== $sessionsCopy) {
Display::display_header($nameTools);
echo Display::page_subheader(
Display::return_icon(
'save_import.gif',
Display::getMdiIcon(
ActionIcon::IMPORT_ARCHIVE,
'ch-tool-icon',
null,
ICON_SIZE_SMALL,
get_lang('Backup and import and import')
).'&nbsp;&nbsp;'.get_lang('Backup and import and import')
);

@ -1036,7 +1036,7 @@ EOT;
$htmlIcon = '';
if ($icon) {
$htmlIcon = Display::return_icon($icon, null, ['style' => 'float:left;'], ICON_SIZE_SMALL);
$htmlIcon = Display::getMdiIcon($icon, 'ch-tool-icon', 'float:left;', ICON_SIZE_SMALL);
}
$html = '
<div class="mt-4 rounded-lg">
@ -1049,7 +1049,7 @@ EOT;
aria-expanded="'.(($open) ? 'true' : 'false').'"
aria-controls="collapse_'.$id.'"
>
'.$htmlIcon.' '.$title.'
'.$htmlIcon.'&nbsp;'.$title.'
</a>
</h5>
</div>

Loading…
Cancel
Save