aboutsummaryrefslogtreecommitdiff
path: root/templates/sidebar
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+studip@gmail.com>2023-10-10 07:50:41 +0000
committerJan-Hendrik Willms <tleilax+studip@gmail.com>2023-10-10 07:50:41 +0000
commit1460ee5307ad6b1dc4cd2d09a82e8bdc542f2515 (patch)
treebbce034bfa0d15efdd987061a20d59981ba5d563 /templates/sidebar
parente2f7a32f7cf720b92563deb26bbd9d05bae7bbcf (diff)
introduce interface AdminCourseWidgetPlugin and adjust core admin courses to it, fixes #3084
Closes #3084 Merge request studip/studip!2071
Diffstat (limited to 'templates/sidebar')
-rw-r--r--templates/sidebar/list-widget.php9
1 files changed, 3 insertions, 6 deletions
diff --git a/templates/sidebar/list-widget.php b/templates/sidebar/list-widget.php
index 5c94a0e..4085cf6 100644
--- a/templates/sidebar/list-widget.php
+++ b/templates/sidebar/list-widget.php
@@ -2,12 +2,9 @@
<?= CSRFProtection::tokenTag() ?>
<ul class="<?= implode(' ', $css_classes) ?>" aria-label="<?= htmlReady($title) ?>">
<? foreach ($elements as $index => $element): ?>
- <? $icon = null ?>
- <? if ($element instanceof LinkElement): ?>
- <? $icon = $element->icon ?? null ?>
- <? if ($icon && $element->isDisabled()): ?>
- <? $icon = $icon->copyWithRole('inactive') ?>
- <? endif ?>
+ <? $icon = $element->icon ?? null ?>
+ <? if ($icon && $element instanceof LinkElement && $element->isDisabled()): ?>
+ <? $icon = $icon->copyWithRole(Icon::ROLE_INACTIVE) ?>
<? endif ?>
<li id="<?= htmlReady($index) ?>"
<?= isset($icon) ? 'style="' . $icon->asCSS() .'"' : '' ?>