Skip to content
Snippets Groups Projects
Commit 0184e773 authored by Rasmus Fuhse's avatar Rasmus Fuhse
Browse files

Resolve "Werkzeuge: Info-Dialoge für Plugins zeigen keine Bilder an"

Closes #2847

Merge request studip/studip!1930
parent 6f785daf
No related branches found
No related tags found
No related merge requests found
...@@ -6,15 +6,20 @@ ...@@ -6,15 +6,20 @@
<div class="header"> <div class="header">
<div class="image"> <div class="image">
<? <?
$icon = $metadata['icon']; if ($metadata['icon']) {
if (!$icon) { $icon = $metadata['icon'] instanceof Icon
$icon = Icon::create('plugin', Icon::ROLE_INFO); ? $metadata['icon']->asImagePath()
: Icon::create($plugin->getPluginURL().'/'.$metadata['icon'])->asImagePath();
} else {
$icon = null;
} }
if (!is_a($icon, 'Icon')) { if ($icon && !is_a($icon, 'Icon')) {
$icon = Icon::create($icon); $icon = Icon::create($icon);
} }
?> ?>
<?= $icon->asImg(100) ?> <? if ($icon) : ?>
<?= $icon->asImg(100) ?>
<? endif ?>
</div> </div>
<div class="text"> <div class="text">
<h1><?= htmlReady($metadata['displayname'] ?? $plugin->getPluginName()) ?></h1> <h1><?= htmlReady($metadata['displayname'] ?? $plugin->getPluginName()) ?></h1>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment