aboutsummaryrefslogtreecommitdiff
path: root/app/views/institute/extern/_table-row.php
blob: 1568bf95fd21713694e524c4f2c4a5447b2be259 (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
<?php
/**
 * @var ExternController $controller
 * @var ExternPageConfig $config
 */
?>

<tr>
    <td>
        <strong><a href="<?= $controller->link_for('/edit', $config->type, $config->id) ?>">
            <?= htmlReady($config->name) ?>
            <?= isset($config->conf['not_fixed_after_migration']) ? '(!)' : '' ?>
            </a></strong>
    </td>
    <td>
        <small><?= htmlReady($config->description) ?></small>
    </td>
    <td data-sort-value="<?= (int) $config->chdate ?>">
        <?= date('d.m.Y G:H', $config->chdate) ?>
    </td>
    <td>
        <? if ($config->author) : ?>
            <a href="<?= URLHelper::getLink('dispatch.php/profile', ['username' => $config->author->username]) ?>">
                <?= htmlReady($config->author->getFullName()) ?>
            </a>
        <? else : ?>
            <?= _('unbekannt') ?>
        <? endif ?>
    </td>
    <td class="actions">
        <?= ActionMenu::get()->addLink(
                $controller->editURL($config->type, $config->id),
                _('Konfiguration bearbeiten'),
                Icon::create('edit')
            )->addLink(
                $controller->infoURL($config->id),
                _('Informationen anzeigen'),
                Icon::create('infopage'),
                ['data-dialog' => '']
           )->addLink(
               $controller->downloadURL($config->id),
               _('Konfiguration herunterladen'),
               Icon::create('download')
           )->addButton(
               'delete',
               _('Konfiguration löschen'),
               Icon::create('trash'),
               [
                   'formaction'   => $controller->deleteURL($config->id),
                   'title'        => _('Konfiguration löschen'),
                   'data-confirm' => sprintf(_('Soll die Konfiguration "%s" gelöscht werden?'), htmlReady($config->name)),
                   'form'         => 'extern-page-index'
               ]
           )->render() 
       ?>
    </td>
</tr>