aboutsummaryrefslogtreecommitdiff
path: root/app/views/api/authorizations/index.php
blob: 95645f4622019cab582de9f234dec8e50c6d52b9 (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
<? use Studip\Button, Studip\LinkButton; ?>

<? if (empty($consumers)): ?>
<?= MessageBox::info(_('Sie haben noch keinen Apps Zugriff auf Ihren Account gewährt.')) ?>
<? else: ?>
<table class="oauth-apps default">
    <caption><?= _('Applikationen') ?></caption>
    <thead>
        <tr>
            <th><?= _('Name') ?></th>
            <th>&nbsp;</th>
    </thead>
    <tbody>
    <? foreach ($consumers as $consumer): ?>
        <tr>
            <td>
                <h3>
                <? if ($consumer->url): ?>
                    <a href="<?= htmlReady($consumer->url) ?>" target="_blank" rel="noopener noreferrer">
                        <?= htmlReady($consumer->title) ?>
                    </a>
                <? else: ?>
                    <?= htmlReady($consumer->title) ?>
                <? endif; ?>
                <? if (isset($types[$consumer->type])): ?>
                    <small>(<?= htmlReady($types[$consumer->type]) ?>)</small>
                <? endif; ?>
                </h3>
            <? if ($consumer->description): ?>
                <p><?= htmlReady($consumer->description) ?></p>
            <? endif; ?>
            </td>
            <td class="actions">
                <?= LinkButton::createCancel(
                    _('App entfernen'),
                    $controller->url_for('api/authorizations/revoke', $consumer->id),
                    ['data-confirm' => _('Wollen Sie der App wirklich den Zugriff auf Ihre Daten untersagen?')]
                ) ?>
            </td>
        </tr>
<? endforeach; ?>
    </tbody>
</table>
<? endif; ?>