aboutsummaryrefslogtreecommitdiff
path: root/app/views/room_management/overview/rooms.php
blob: cdec83e3f2946963943daa444e644947b66f1742 (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
<? if ($rooms): ?>
    <table class="default sortable-table rooms-list">
        <colgroup>
            <col style="width: 70%">
            <col style="width: 10%">
            <col>
            <col style="width: 20px">
        </colgroup>
        <thead>
            <tr>
                <th data-sort="text"><?= _('Name') ?></th>
                <th data-sort="number"><?= _('Sitzplätze') ?></th>
                <th data-sort="text"><?= _('Raumkategorie') ?></th>
                <th class="actions"><?= _('Aktionen') ?></th>
            </tr>
        </thead>
        <tbody>
            <? foreach ($rooms as $room): ?>
                <?= $this->render_partial(
                    'resources/_common/_room_tr.php',
                    [
                        'room' => $room,
                        'show_global_admin_actions' => $show_global_admin_actions,
                        'show_admin_actions' => $room->userHasPermission(
                            $user,
                            'admin'
                        ),
                        'show_tutor_actions' => $room->userHasPermission(
                            $user,
                            'tutor'
                        ),
                        'show_autor_actions' => $room->userHasPermission(
                            $user,
                            'autor'
                        ),
                        'show_user_actions' => $room->userHasPermission(
                            $user,
                            'user'
                        ),
                        'user_has_booking_rights' => $room->userHasBookingRights(
                            $user
                        ),
                        'show_picture' => true,
                        'additional_columns' => [
                            $room->category->name,
                        ]
                    ]
                ) ?>
            <? endforeach ?>
        </tbody>
    </table>
<? endif ?>