aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/lti/index.php
blob: ad4ac50bf44e98eb98947166ca002ec92b1bc415 (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
60
61
62
63
64
65
66
67
<?php
/**
 * @var Admin_LtiController $controller
 * @var LtiTool[] $tools
 */
?>
<form action="" method="post">
    <?= CSRFProtection::tokenTag() ?>
    <table class="default">
        <caption>
            <?= _('Aktuell konfigurierte LTI-Tools') ?>
        </caption>

        <colgroup>
            <col style="width: 30%;">
            <col style="width: 40%;">
            <col style="width: 20%;">
            <col style="width: 5%;">
            <col style="width: 5%;">
        </colgroup>

        <thead>
            <tr>
                <th><?= _('Name der Anwendung') ?></th>
                <th><?= _('URL der Anwendung') ?></th>
                <th><?= _('Consumer-Key') ?></th>
                <th><?= _('Links') ?></th>
                <th class="actions">
                    <?= _('Aktionen') ?>
                </th>
            </tr>
        </thead>

        <tbody>
            <? foreach ($tools as $tool): ?>
                <tr>
                    <td>
                        <a href="<?= $controller->link_for('admin/lti/edit/' . $tool->id) ?>" title="<?= _('LTI-Tool konfigurieren') ?>" data-dialog>
                            <?= htmlReady($tool->name) ?>
                        </a>
                    </td>
                    <td>
                        <a href="<?= htmlReady($tool->launch_url) ?>" target="_blank" class="link-extern">
                            <?= htmlReady($tool->launch_url) ?>
                        </a>
                    </td>
                    <td>
                        <?= htmlReady($tool->consumer_key) ?>
                    </td>
                    <td>
                        <?= count($tool->links) ?>
                    </td>
                    <td class="actions">
                        <a href="<?= $controller->link_for('admin/lti/edit/' . $tool->id) ?>" title="<?= _('LTI-Tool konfigurieren') ?>" data-dialog>
                            <?= Icon::create('edit') ?>
                        </a>
                        <?= Icon::create('trash')->asInput([
                            'formaction' => $controller->url_for('admin/lti/delete/' . $tool->id),
                            'title' => _('LTI-Tool löschen'),
                            'data-confirm' => sprintf(_('Wollen Sie wirklich das LTI-Tool "%s" löschen?'), $tool->name)
                        ]) ?>
                    </td>
                </tr>
            <? endforeach ?>
        </tbody>
    </table>
</form>