Display: Update icons in course description tool - refs BT#20895

pull/4988/head
Yannick Warnier 1 year ago
parent 7081da2a33
commit 698c66442a
  1. 14
      public/main/course_description/course_description_controller.php
  2. 16
      public/main/inc/lib/course_description.lib.php
  3. 8
      public/main/template/default/course_description/index.html.twig

@ -44,22 +44,12 @@ class CourseDescriptionController
foreach ($categories as $id => $title) {
if (ADD_BLOCK == $i) {
$actionLeft .= '<a href="index.php?'.api_get_cidreq().'&action=add">'.
Display::return_icon(
$iconList[$id],
$title,
'',
ICON_SIZE_MEDIUM
).
Display::getMdiIcon($iconList[$id], 'ch-tool-icon', null, 32, $title).
'</a>';
break;
} else {
$actionLeft .= '<a href="index.php?action=edit&'.api_get_cidreq().'&description_type='.$id.'">'.
Display::return_icon(
$iconList[$id],
$title,
'',
ICON_SIZE_MEDIUM
).
Display::getMdiIcon($iconList[$id], 'ch-tool-icon', null, 32, $title).
'</a>';
$i++;
}

@ -302,14 +302,14 @@ class CourseDescription
public function get_default_description_icon()
{
$default_description_icon = [];
$default_description_icon[1] = 'info.png';
$default_description_icon[2] = 'objective.png';
$default_description_icon[3] = 'topics.png';
$default_description_icon[4] = 'strategy.png';
$default_description_icon[5] = 'laptop.png';
$default_description_icon[6] = 'teacher.png';
$default_description_icon[7] = 'assessment.png';
$default_description_icon[8] = 'wizard.png';
$default_description_icon[1] = 'image-text';
$default_description_icon[2] = 'flag-checkered';
$default_description_icon[3] = 'table-of-contents';
$default_description_icon[4] = 'strategy';
$default_description_icon[5] = 'laptop';
$default_description_icon[6] = 'human-male-board';
$default_description_icon[7] = 'order-bool-ascending-variant';
$default_description_icon[8] = 'magic-staff';
return $default_description_icon;
}

@ -8,14 +8,14 @@
{# data-c_id="{{ description.c_id }}" #}
data-type="course_description"
>
<div class="panel-heading">
<div class="">
{% if is_allowed_to_edit %}
<div class="pull-right">
<div class="float-right">
{% if is_granted('EDIT', description.resourceNode) %}
<a
href="{{ url('legacy_main', {'name': 'course_description/index.php' }) }}?action=edit&id={{ description.iid }}&{{ course_url_params }}"
title="{{ 'Edit'|get_lang }}">
<img src="{{ 'edit.png'|icon(22) }}"/>
{{ 'pencil'|mdi_icon(22) }}
</a>
{% endif %}
@ -23,7 +23,7 @@
<a href="{{ url('legacy_main', {'name': 'course_description/index.php' }) }}?action=delete&id={{ description.iid }}&{{ course_url_params }}"
onclick="javascript:return confirmation('{{ description.title | e('js')}}');"
title="{{ 'Delete'|get_lang }}">
<img src="{{ 'delete.png'|icon(22) }}"/>
{{ 'delete'|mdi_icon(22) }}
</a>
{% endif %}

Loading…
Cancel
Save