aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/user/_priority_list.php
blob: acb2ca09b649e75c169bde3d40897d9fbc76a3ef (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
<?php
/**
 * @var array $priorities
 */
?>
<section class="contentbox">
    <header>
        <h1>
            <a href="<?= ContentBoxHelper::href('priorities') ?>">
                <?= _('Übersicht Anmeldelisten von Veranstaltungen mit automatischer Platzvergabe') ?>
            </a>
        </h1>
    </header>
    <? if (!empty($priorities)) : ?>
        <section>
            <table class="default">
                <colgroup>
                    <col style="width: 200px">
                    <col>
                    <col style="width: 15%">
                </colgroup>
                <thead>
                    <tr>
                        <th><?= _('Veranstaltungsnummer') ?></th>
                        <th><?= _('Veranstaltung') ?></th>
                        <th style="text-align: center"><?= _('Priorität') ?></th>
                    </tr>
                </thead>
                <tbody>
                    <? foreach ($priorities as $priority): ?>
                        <? $course = Course::find($priority['seminar_id']) ?>
                        <tr>
                            <td>
                                <a href="<?= URLHelper::getLink('dispatch.php/course/go', ['to' => $course->id]) ?>">
                                    <?= htmlReady($course->veranstaltungsnummer) ?>
                                </a>
                            </td>
                            <td>
                                <a href="<?= URLHelper::getLink('dispatch.php/course/go', ['to' => $course->id]) ?>">
                                    <?= sprintf('%s (%s)', htmlReady($course->getFullName('type-name')), htmlReady($course->getFullName('sem-duration-name'))) ?>
                                </a>
                            </td>
                            <td style="text-align: center"><?= htmlReady($priority['priority']) ?></td>
                        </tr>
                    <? endforeach; ?>
                </tbody>
            </table>
        </section>
    <? else : ?>
        <?= $this->render_partial('admin/user/_activities_no_courses.php') ?>
    <? endif ?>
</section>