aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/login_style/login_faq.php
blob: 4ed19e19adc5587f2f176a54492edf3bba885edf (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 Admin_LoginStyleController $controller
 * @var LoginFaq[] $faq_entries
 */
?>
<form method="post">
    <?= CSRFProtection::tokenTag() ?>
    <table class="default">
        <caption><?= _('Hinweise zum Login') ?></caption>
        <thead>
        <tr>
            <th><?= _('Titel') ?></th>
            <th class="actions"><?= _('Aktionen') ?></th>
        </tr>
        </thead>
        <tbody>
        <? if (count($faq_entries) > 0) : ?>
            <? foreach ($faq_entries as $entry) : ?>
                <tr>
                    <td><?= htmlReady($entry->title) ?></td>
                    <td class="actions">
                        <?= ActionMenu::get()
                            ->setContext($entry->title)
                            ->addLink(
                                $controller->edit_faqURL($entry),
                                _('Hinweistext bearbeiten'),
                                Icon::create('edit'),
                                ['data-dialog' => 'size=medium']
                            )->addButton(
                                'delete',
                                _('Hinweistext löschen'),
                                Icon::create('trash'),
                                [
                                    'formaction'   => $controller->delete_faqURL($entry),
                                    'data-confirm' => sprintf(
                                        _('Wollen Sie den Hinweistext "%s" wirklich löschen?'),
                                        $entry->title
                                    ),
                                    'data-dialog'  => 'size=auto',
                                ]
                            )
                        ?>
                    </td>
                </tr>
            <? endforeach ?>
        <? else : ?>
            <tr>
                <td colspan="3" style="text-align: center">
                    <?= _('Keine Hinweistexte vorhanden') ?>
                </td>
            </tr>
        <? endif ?>
        </tbody>

    </table>
</form>