blob: e6d162de92b7b15a5bf60ac9a2ded27fd7e4da5c (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
<?php
/**
* @var Admin_LicensesController $controller
* @var License[] $licenses
*/
?>
<table class="default">
<caption>
<?= _("Lizenzen") ?>
</caption>
<thead>
<tr>
<th></th>
<th><?= _("SPDX-Lizenzkürzel") ?></th>
<th><?= _("Name") ?></th>
<th class="actions"><?= _("Aktion") ?></th>
</tr>
</thead>
<tbody>
<? foreach ($licenses as $license) : ?>
<tr>
<td>
<?= LicenseAvatar::getAvatar($license['identifier'])->getImageTag() ?>
</td>
<td><?= htmlReady($license['identifier']) ?></td>
<td>
<? if ($license['link']) : ?>
<a href="<?= htmlReady($license['link']) ?>">
<? endif ?>
<?= htmlReady($license['name']) ?>
<? if ($license['link']) : ?>
</a>
<? endif ?>
</td>
<td class="actions">
<a href="<?= $controller->link_for("admin/licenses/edit", ['identifier' => $license['identifier']]) ?>" data-dialog>
<?= Icon::create('edit')->asSvg(['class' => "text-bottom"]) ?>
</a>
<form action="<?= $controller->link_for('admin/licenses/delete', ['identifier' => $license->getId()]) ?>"
method="post"
data-confirm="<?= _("Wirklich löschen?") ?>"
class="inline">
<?= Icon::create('trash')->asInput() ?>
</form>
</td>
</tr>
<? endforeach ?>
</tbody>
</table>
<?
$actions = new ActionsWidget();
$actions->addLink(
_("Lizenz erzeugen"),
$controller->url_for("admin/licenses/edit"),
Icon::create('add')
)->asDialog();
Sidebar::Get()->addWidget($actions);
|