aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/login_style/index.php
blob: 195cc6a9fc7c398f54168a5e60a0359ec3a65b27 (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
<?php
/**
 * @var LoginBackground[] $pictures
 * @var Admin_LoginStyleController $controller
 */
?>
<? if (count($pictures) > 0) : ?>
    <table class="default">
        <caption>
            <?= _('Hintergrundbilder für den Startbildschirm') ?>
        </caption>
        <colgroup>
            <col>
            <col width="400">
            <col width="100">
            <col width="25">
        </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>
                    <a href="<?= $controller->link_for("admin/loginstyle/activation/{$pic->id}/desktop", (int) !$pic->desktop) ?>">
                        <?= Icon::create('computer', $pic->desktop ? Icon::ROLE_CLICKABLE : Icon::ROLE_INACTIVE)->asImg(32, [
                            'title' => $pic->desktop
                                     ? _('Bild nicht mehr für die Desktopansicht verwenden')
                                     : _('Bild für die Desktopansicht verwenden')
                        ]) ?>
                    </a>
                    <a href="<?= $controller->link_for("admin/loginstyle/activation/{$pic->id}/mobile", (int) !$pic->mobile) ?>">
                        <?= Icon::create('cellphone', $pic->mobile ? Icon::ROLE_CLICKABLE : Icon::ROLE_INACTIVE)->asImg(32, [
                            'title' => $pic->mobile
                                     ? _('Bild nicht mehr für die Mobilansicht verwenden')
                                     : _('Bild für die Mobilansicht verwenden')
                        ]) ?>
                    </a>
                </td>
                <td class="actions">
                <? if (!$pic->in_release): ?>
                    <a href="<?= $controller->link_for("admin/loginstyle/delete/{$pic->id}") ?>">
                        <?= Icon::create('trash')->asImg([
                            'title'        => _('Bild löschen'),
                            'data-confirm' => _('Soll das Bild wirklich gelöscht werden?'),
                        ]) ?>
                    </a>
                <? endif; ?>
                </td>
            </tr>
        <? endforeach ?>
    </table>
<? else : ?>
    <?= MessageBox::info(_('In Ihrem System sind leider keine Bilder für den Startbildschirm hinterlegt.')) ?>
<? endif ?>