navigation/dashboard.phtml: Use ipl-web's Icon for fa- icons

This commit is contained in:
Johannes Meyer 2024-10-07 16:25:17 +02:00
parent 41a2aed0b5
commit 526de93c89
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
<?php
use ipl\Stdlib\Str;
use ipl\Web\Widget\Icon;
?>
@ -11,7 +12,7 @@ use ipl\Web\Widget\Icon;
<a class="dashboard-link" href="<?= $this->url($item->getUrl(), $item->getUrlParameters()) ?>"<?= $this->propertiesToString($item->getAttributes()) ?>>
<div class="link-icon">
<?php
if (substr($item->getUrl()->getPath(), 0, 9) === 'icingadb/') {
if (Str::startsWith($item->getIcon(), 'fa-') || substr($item->getUrl()->getPath(), 0, 9) === 'icingadb/') {
echo new Icon($item->getIcon() ?: 'share', [ 'aria-hidden' => 1]);
} else {
echo $this->icon($item->getIcon() ?: 'forward', null, array('aria-hidden' => true));