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. 10
      public/main/template/default/course_description/index.html.twig

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

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

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

Loading…
Cancel
Save