blob: 2117877a738a3cfaec685a17e67dda1269c842ef (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
<?php
/**
* @var StartController $controller
* @var StudIPPlugin $widget
* @var string $admin_title
* @var string $content_for_layout
* @var Navigation[]|null $icons
* @var string|null $admin_url
*/
?>
<div class="ui-widget_head widget-header" id="widget-<?= $widget->getPluginId() ?>">
<span class="header-options">
<? if (isset($icons)): ?>
<? foreach ($icons as $nav): ?>
<? if ($nav->isVisible(true)): ?>
<? $attr = $nav->getLinkAttributes() ?>
<a href="<?= URLHelper::getLink($nav->getURL()) ?>"
<? foreach ($attr as $key => $value): ?>
<? if ($key !== 'src'): ?>
<?= $key ?>="<?= htmlReady($value) ?>"
<? endif ?>
<? endforeach ?>>
<?= $nav->getImage()->asSvg() ?>
</a>
<? endif ?>
<?endforeach ?>
<? endif ?>
<? if (isset($admin_url)): ?>
<a href="<?= URLHelper::getLink($admin_url) ?>">
<?= Icon::create('admin', Icon::ROLE_CLICKABLE, ['title' => $admin_title])->asSvg() ?>
</a>
<? endif ?>
<a href="<?= $controller->url_for('start/delete/' . $widget->getPluginId()) ?>">
<?= Icon::create('decline', Icon::ROLE_CLICKABLE, ['title' => _('Entfernen')])->asSvg() ?>
</a>
</span>
<span id="widgetName<?= $widget->getPluginId() ?>" class="widget-title">
<?= htmlReady($title ?? $widget->getPluginName()) ?>
</span>
</div>
<div id="wid<?=$widget->getPluginId()?>">
<?= $content_for_layout ?>
</div>
|