aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/lti/index.php
blob: 54ebd940cebbfaf5413eb4f394d00b47cc9b8cb5 (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
 */
?>
<? if ($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><?= _('LTI-Version') ?></th>
                    <th><?= _('Links') ?></th>
                    <th class="actions"><?= _('Aktionen') ?></th>
                </tr>
            </thead>

            <tbody>
                <? foreach ($tools as $tool): ?>
                    <tr>
                        <td>
                            <a href="<?= $controller->link_for('lti/tool/edit/global/' . $tool->id) ?>" 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><?= htmlReady($tool->getLtiVersionString()) ?></td>
                        <td><?= count($tool->links) ?></td>
                        <td class="actions">
                            <a href="<?= $controller->link_for('lti/tool/edit/global/' . $tool->id) ?>" title="<?= _('LTI-Tool konfigurieren') ?>"
                               aria-label="<?= _('LTI-Tool konfigurieren') ?>" data-dialog>
                                <?= Icon::create('edit') ?>
                            </a>
                            <?= Icon::create('trash')->asInput([
                                'formaction'   => $controller->url_for('lti/tool/delete/global/' . $tool->id),
                                'title'        => _('LTI-Tool löschen'),
                                'data-confirm' => sprintf(_('Wollen Sie das LTI-Tool „%s“ wirklich löschen?'), htmlReady($tool->name)),
                                'aria-label'   => _('LTI-Tool löschen'),
                            ]) ?>
                        </td>
                    </tr>
                <? endforeach ?>
            </tbody>
        </table>
    </form>
<? else : ?>
    <?= MessageBox::info(_('Es sind keine globalen LTI-Tools konfiguriert.')) ?>
<? endif ?>