Skip to content

Commit

Permalink
navigation/dashboard.phtml: Use ipl-web's Icon for fa- icons
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Nov 4, 2024
1 parent 41a2aed commit 526de93
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion application/views/scripts/navigation/dashboard.phtml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
<?php

use ipl\Stdlib\Str;
use ipl\Web\Widget\Icon;

?>
Expand All @@ -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));
Expand Down

0 comments on commit 526de93

Please sign in to comment.