aboutsummaryrefslogtreecommitdiff
path: root/app/views/room_management/overview/index.php
blob: 9fa41c053421eea69357623103b9f3e6702639e8 (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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
<section class="overview-action-tile-container studip-widget-wrapper">
    <? if ($show_resource_actions): ?>
        <article class="overview-action-tile studip">
            <header class="widget-header"><h1><?= _('Raumplanung') ?></h1></header>
            <ul>
                <? if ($room_requests_activated) : ?>
                    <li>
                        <a href="<?= URLHelper::getLink(
                                 'dispatch.php/resources/room_request/overview') ?>">
                            <?= _('Anfragenliste') ?>
                        </a>
                    </li>
                <? endif ?>
                <li>
                    <a href="<?= URLHelper::getLink(
                             'dispatch.php/resources/room_planning/booking_plan') ?>">
                        <?= _('Belegungsplan') ?>
                    </a>
                </li>
                <li>
                    <a href="<?= URLHelper::getLink(
                             'dispatch.php/resources/location/index') ?>">
                        <?= _('Struktur') ?>
                    </a>
                </li>
                <li>
                    <a href="<?= URLHelper::getLink(
                             'dispatch.php/room_management/planning/index') ?>">
                        <?= _('Gruppenbelegungspläne') ?>
                    </a>
                </li>
            </ul>
        </article>
    <? endif ?>

    <? if ($user_is_global_resource_admin): ?>
        <article class="overview-action-tile studip">
            <header class="widget-header"><h1><?= _('Export') ?></h1></header>
            <ul>
                <li>
                    <a href="<?= URLHelper::getLink(
                             'dispatch.php/resources/export/select_booking_sources') ?>">
                        <?= _('Raumgruppen auswählen') ?>
                    </a>
                </li>
                <li>
                    <a href="<?= URLHelper::getLink(
                             'dispatch.php/resources/export/select_booking_sources',
                             ['select_rooms' => '1']) ?>">
                        <?= _('Räume auswählen') ?>
                    </a>
                </li>
            </ul>
        </article>
        <article class="overview-action-tile studip">
            <header class="widget-header"><h1><?= _('Administration') ?></h1></header>
            <ul>
                <li>
                    <a href="<?= URLHelper::getLink(
                             'dispatch.php/resources/admin/permissions/global') ?>">
                        <?= _('Globale Berechtigungen verwalten') ?>
                    </a>
                </li>
                <li>
                    <a href="<?= URLHelper::getLink(
                             'dispatch.php/resources/admin/global_locks') ?>">
                        <?= _('Globale Sperren verwalten') ?>
                    </a>
                </li>
                <li>
                    <a href="<?= URLHelper::getLink(
                             'dispatch.php/resources/admin/user_permissions') ?>">
                        <?= _('Ressourcen-Berechtigungen verwalten') ?>
                    </a>
                </li>
                <? if ($user_is_root) : ?>
                    <li>
                        <a href="<?= URLHelper::getLink(
                                 'dispatch.php/resources/admin/configuration') ?>">
                            <?= _('Konfigurationsoptionen') ?>
                        </a>
                    </li>
                <? endif ?>
            </ul>
        </article>
    <? endif ?>
</section>
<? if ($room_requests && count($room_requests)) : ?>
<br>
    <table class="default request-list">
        <caption><?= _('Aktuelle Raumanfragen') ?></caption>
        <thead>
                <tr>
                    <th>
                        <?= Icon::create('radiobutton-checked')->asImg(
                            [
                                'class' => 'text-bottom',
                                'title' => _('Markierung')
                            ]
                        ) ?>
                    </th>
                    <th data-sort="text"><?= _('Nr.') ?></th>
                    <th data-sort="text"><?= _('Name') ?></th>
                    <th data-sort="text"><?= _('Lehrende Person(en)') ?></th>
                    <th data-sort="text"><?= _('Raum') ?></th>
                    <th data-sort="text"><?= _('Plätze') ?></th>
                    <th data-sort="text"><?= _('Anfragende Person') ?></th>
                    <th data-sort="htmldata"><?= _('Art') ?></th>
                    <th data-sort="htmldata"><?= _('Dringlichkeit') ?></th>
                    <th data-sort="num"><?= _('Letzte Änderung') ?></th>
                    <th><?= _('Aktionen') ?></th>
                </tr>
            </thead>
        <tbody>
            <? foreach ($room_requests as $room_request): ?>
                <?= $this->render_partial(
                    'resources/_common/_request_tr',
                    [
                        'request' => $room_request,
                        'current_user' => $user
                    ]
                )?>
            <? endforeach ?>
        </tbody>
    </table>
<? elseif ($display_current_requests) : ?>
    <?= MessageBox::info(
        _('Es liegen keine aktuellen Raumanfragen vor!')
    ) ?>
<? endif ?>