Skip to content

Commit

Permalink
Display: Use new icons in course maintenance and settings tools
Browse files Browse the repository at this point in the history
  • Loading branch information
ywarnier committed Dec 27, 2023
1 parent 197e6b8 commit af4a90d
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 21 deletions.
29 changes: 16 additions & 13 deletions public/main/course_info/infocours.php
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -149,7 +152,7 @@
$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>'
Expand Down Expand Up @@ -262,7 +265,7 @@
'course_access',
get_lang('Course access'),
$elements,
'course.png',
ToolIcon::COURSE,
false
);

Expand Down Expand Up @@ -304,7 +307,7 @@
'documents',
get_lang('Documents'),
$globalGroup,
'folder.png',
ToolIcon::DOCUMENT,
false
);

Expand Down Expand Up @@ -447,7 +450,7 @@
'email-notifications',
get_lang('E-mail notifications'),
$globalGroup,
'mail.png',
ActionIcon::SEND_MESSAGE,
false
);

Expand Down Expand Up @@ -528,7 +531,7 @@
'users',
get_lang('User rights'),
$globalGroup,
'user.png',
ToolIcon::MEMBER,
false
);

Expand Down Expand Up @@ -559,7 +562,7 @@
'chat',
get_lang('Chat settings'),
$globalGroup,
'chat.png',
ToolIcon::CHAT,
false
);

Expand Down Expand Up @@ -680,7 +683,7 @@
'config_lp',
get_lang('Learning path settings'),
$globalGroup,
'scorms.png',
ToolIcon::LP,
false
);

Expand Down Expand Up @@ -722,7 +725,7 @@
'config_exercise',
get_lang('Test'),
$globalGroup,
'quiz.png',
ToolIcon::QUIZ,
false
);
}
Expand Down Expand Up @@ -768,7 +771,7 @@
'thematic',
get_lang('Thematic advance configuration'),
$globalGroup,
'course_progress.png',
ToolIcon::COURSE_PROGRESS,
false
);

Expand All @@ -793,7 +796,7 @@
'certificate',
get_lang('Certificates'),
$globalGroup,
null,
ObjectIcon::CERTIFICATE,
false
);
}
Expand Down Expand Up @@ -827,7 +830,7 @@
'forum',
get_lang('Forum'),
$globalGroup,
'forum.png',
ToolIcon::FORUM,
false
);

Expand All @@ -852,7 +855,7 @@
'student-publication',
get_lang('Assignments'),
$globalGroup,
'work.png',
ToolIcon::ASSIGNMENT,
false
);

Expand All @@ -870,7 +873,7 @@
'lti_tool',
$translator->trans('External tools'),
$html,
'plugin.png',
ToolIcon::PLUGIN,
false
);*/

Expand Down
11 changes: 7 additions & 4 deletions public/main/course_info/maintenance.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -23,7 +26,7 @@
?>

<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">
Expand All @@ -50,23 +53,23 @@
</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>
<div class="sectioncomment"><?php echo get_lang('DescriptionCopy course'); ?>
</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>
</div>
<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>
Expand Down
10 changes: 8 additions & 2 deletions public/main/course_info/maintenance_coach.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -24,8 +27,11 @@
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')
);
Expand Down
4 changes: 2 additions & 2 deletions public/main/inc/lib/formvalidator/FormValidator.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1036,7 +1036,7 @@ public function addStartPanel(string $id, string $title, bool $open = false, $ic

$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">
Expand All @@ -1049,7 +1049,7 @@ class="block cursor-pointer"
aria-expanded="'.(($open) ? 'true' : 'false').'"
aria-controls="collapse_'.$id.'"
>
'.$htmlIcon.' '.$title.'
'.$htmlIcon.'&nbsp;'.$title.'
</a>
</h5>
</div>
Expand Down

0 comments on commit af4a90d

Please # to comment.