aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/login_style/index.php
blob: e131784e084c266de92a406f26750f523039be2c (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
68
69
70
71
72
73
74
75
76
77
78
<?php
/**
 * @var LoginBackground[] $pictures
 * @var Admin_LoginStyleController $controller
 */
?>
<form method="post">
    <?= CSRFProtection::tokenTag(); ?>

    <? if (count($pictures) > 0) : ?>
    <table class="default">
        <caption>
            <?= _('Hintergrundbilder für den Startbildschirm') ?>
        </caption>
        <colgroup>
            <col>
            <col style="width: 400px">
            <col style="width: 100px">
            <col style="width: 25px">
        </colgroup>
        <thead>
        <tr>
            <th><?= _('Info') ?></th>
            <th><?= _('Vorschau') ?></th>
            <th><?= _('Aktiviert für') ?></th>
            <th><?= _('Aktionen') ?></th>
        </tr>
        </thead>
        <? foreach ($pictures as $pic) :
            $dim = $pic->getDimensions();
            ?>
            <tr>
                <td>
                    <?= htmlReady($pic->filename) ?>
                    <br>
                    (<?= $dim[0] ?> x <?= $dim[1] ?>,
                    <?= relsize($pic->getFilesize(), false) ?>)
                </td>
                <td>
                    <img src="<?= $pic->getURL() ?>" width="400">
                </td>
                <td>
                    <?= Icon::create('computer', $pic->desktop ? Icon::ROLE_CLICKABLE : Icon::ROLE_INACTIVE)->asInput(
                        Icon::SIZE_LARGE,
                        [
                            'title' => $pic->mobile
                                ? _('Bild nicht mehr für die Mobilansicht verwenden')
                                : _('Bild für die Mobilansicht verwenden'),
                            'formaction' => $controller->activationURL($pic->id, 'desktop', (int) !$pic->desktop)
                        ]
                    ) ?>

                    <?= Icon::create('cellphone', $pic->mobile ? Icon::ROLE_CLICKABLE : Icon::ROLE_INACTIVE)->asInput(
                        Icon::SIZE_LARGE,
                        [
                            'title' => $pic->mobile
                                ? _('Bild nicht mehr für die Mobilansicht verwenden')
                                : _('Bild für die Mobilansicht verwenden'),
                            'formaction' => $controller->activationURL($pic->id, 'mobile', (int) !$pic->mobile)
                        ]
                    ) ?>
                </td>
                <td class="actions">
                    <? if (!$pic->in_release): ?>
                        <?= Icon::create('trash')->asInput([
                            'title'        => _('Bild löschen'),
                            'data-confirm' => _('Soll das Bild wirklich gelöscht werden?'),
                            'formaction' => $controller->delete_picURL($pic->id),
                        ]) ?>
                    <? endif ?>
                </td>
            </tr>
        <? endforeach ?>
    </table>
    <? else : ?>
    <?= MessageBox::info(_('In Ihrem System sind leider keine Bilder für den Startbildschirm hinterlegt.')) ?>
    <? endif ?>
</form>