From 97c837850a0caa2b22f0c4a5be51ec833f2bd365 Mon Sep 17 00:00:00 2001
From: David Siegfried <david.siegfried@uni-vechta.de>
Date: Fri, 5 Aug 2022 13:18:08 +0000
Subject: [PATCH] replace old icon, closes #1369

Closes #1369

Merge request studip/studip!863
---
 lib/classes/calendar/CalendarScheduleModel.php  |  10 +++++-----
 public/assets/images/virtual.png                | Bin 547 -> 0 bytes
 resources/assets/stylesheets/less/schedule.less |   4 ++++
 3 files changed, 9 insertions(+), 5 deletions(-)
 delete mode 100644 public/assets/images/virtual.png

diff --git a/lib/classes/calendar/CalendarScheduleModel.php b/lib/classes/calendar/CalendarScheduleModel.php
index 04c44b770db..47b65c418a7 100644
--- a/lib/classes/calendar/CalendarScheduleModel.php
+++ b/lib/classes/calendar/CalendarScheduleModel.php
@@ -220,10 +220,10 @@ class CalendarScheduleModel
                 $stmt->execute([$sem->getId(), $user_id, $cycle->getMetaDateId()]);
                 $details = $stmt->fetch();
 
-                if ($entry['type'] == 'virtual') {
-                    $entry['color'] = $details['color'] ? $details['color'] : DEFAULT_COLOR_VIRTUAL;
+                if ($entry['type'] === 'virtual') {
+                    $entry['color'] = $details['color'] ?: DEFAULT_COLOR_VIRTUAL;
                     $entry['icons'][] = [
-                        'image' => 'virtual.png',
+                        'image' => Icon::create('tag', Icon::ROLE_INFO_ALT)->asImagePath(),
                         'title' => _("Dies ist eine vorgemerkte Veranstaltung")
                     ];
                 } else {
@@ -240,7 +240,7 @@ class CalendarScheduleModel
 
                     $entry['icons'][] = [
                         'url'   => $bind_url,
-                        'image' => Icon::create('visibility-invisible', 'info_alt')->asImagePath(16),
+                        'image' => Icon::create('visibility-invisible', Icon::ROLE_INFO_ALT)->asImagePath(),
                         'onClick' => "function(id) { window.location = '". $bind_url ."'; }",
                         'title' => _("Diesen Eintrag wieder einblenden"),
                     ];
@@ -252,7 +252,7 @@ class CalendarScheduleModel
                                 . $seminar_id . '/' . $cycle->getMetaDateId());
                     $entry['icons'][] = [
                         'url'     => $unbind_url,
-                        'image'   => Icon::create('visibility-visible', 'info_alt')->asImagePath(16),
+                        'image'   => Icon::create('visibility-visible', Icon::ROLE_INFO_ALT)->asImagePath(),
                         'onClick' => "function(id) { window.location = '". $unbind_url ."'; }",
                         'title'   => _("Diesen Eintrag ausblenden"),
                     ];
diff --git a/public/assets/images/virtual.png b/public/assets/images/virtual.png
deleted file mode 100644
index d4cdbdbf8ce81ac7ea658e96805f39b8f5e196dc..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001

literal 547
zcmeAS@N?(olHy`uVBq!ia0y~yU=RRd4mJh`2Kmqb6B!s7UwOJXhFJI~SFBKw`{U*O
z_@Z}i^Zye+rcV3!G@DCG?EnA&=?B^+?@371{Ed|O@&Eq5P>mny`~JsIaBSg8WYGMz
z>TJ!Ei6-a&YdbmpcQl#s|NrdfGymtmT*tzjSg~&H|NlFeK6o0Ol=OeOYU_<=9!5!q
zV`h*3*Q;3kWnFnNmE&-*ukD6M%u+)CnU$FS+fRP(B*Abbe$A18|2fQleGa+Iv09Ob
z|7z*K`ip5l|L1(|`9JflYQleIX@+CV{`}uxz3M;XN>}rihtno~`=8$y^M8KU#((`M
zy^mbsIecu-|NXbU|L<Jh_DZ%b^_`#Za#hj)`%NDl%V*F?_-gsDezV9=?oA?T9L^<W
zvr;RQzSK`pTwuUZ$-Z83SI+<aGe7)gl=>i_<KPh_WAE`;EV(&H;P2g*@BiIHpZ%Y|
zb%XQ=znPqCo=uu#b%a6Sp|s>I?n`^_dD#D7v&HB{+yDH~0A9w8_fH!B{hxN`^Zz+L
zr~X%O5~?d;o?z&~^h9=o;`)@C|MoN9`oZS0UnKp{f7TU0RRZ{yNv>uzaPI3q-MpB8
ziC~L8b26h!+ZxHk3<?SCNpcF$<}2z<sB!Um_n)6z(ZEhe>v#RE4Gt;+e!?B94G|0-
zmK&GncPu%>lGwO~S;^?XW5vW30crt0tSWqyj=yFNGGO?-#W}s{qWF9U1_lOCS3j3^
HP6<r_x(fjR

diff --git a/resources/assets/stylesheets/less/schedule.less b/resources/assets/stylesheets/less/schedule.less
index 4364390b29d..9eb01e82f46 100644
--- a/resources/assets/stylesheets/less/schedule.less
+++ b/resources/assets/stylesheets/less/schedule.less
@@ -139,6 +139,10 @@ div.schedule_edit_entry > form {
     position: absolute;
     right: 0;
     top: 0;
+
+    img {
+        .square(16px);
+    }
 }
 
 div.invisible_entry {
-- 
GitLab