aboutsummaryrefslogtreecommitdiff
path: root/app/views/admin/user/_course_list.php
blob: 9250d7cb3c9ae295d85ccee963f1e2d9b681f760 (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
<?php
/**
 * @var string $headline
 * @var array $memberships
 */
?>
<section class="contentbox">
    <header>
        <h1><?= $headline ?></h1>
    </header>
    <? if (!empty($memberships)) : ?>
        <? foreach ($memberships as $semester_name => $_memberships) : ?>
            <article id="<?= $semester_name ?>" class="<?= ContentBoxHelper::classes($semester_name) ?>">
                <header>
                    <h1>
                        <a href="<?= ContentBoxHelper::href($semester_name) ?>">
                            <?= $semester_name ?>
                        </a>
                    </h1>
                </header>
                <section>
                    <table class="default">
                        <colgroup>
                            <col style="width: 200px">
                            <col>
                            <col style="width: 15%">
                            <col style="width: 15%">
                        </colgroup>
                        <thead>
                            <tr>
                                <th><?= _('Veranstaltungsnummer') ?></th>
                                <th><?= _('Veranstaltung') ?></th>
                                <th><?= _('Typ') ?></th>
                                <th><?= _('Status') ?></th>
                            </tr>
                        </thead>
                        <tbody>
                            <? foreach ($_memberships as $membership): ?>
                                <tr>
                                    <td>
                                        <a href="<?= URLHelper::getLink('dispatch.php/course/go', ['to' => $membership->course->id]) ?>">
                                            <?= htmlReady($membership->course->veranstaltungsnummer) ?>
                                        </a>
                                    </td>
                                    <td>
                                        <a href="<?= URLHelper::getLink('dispatch.php/course/go', ['to' => $membership->course->id]) ?>">
                                            <?= htmlReady($membership->course->name) ?>
                                        </a>
                                    </td>
                                    <td>
                                        <?= htmlReady($membership->course->getSemType()['name'])?>
                                    </td>
                                    <td>
                                        <?= htmlReady($membership->status) ?>
                                    </td>
                                </tr>
                            <? endforeach; ?>
                        </tbody>
                    </table>
                </section>
            </article>
        <? endforeach ?>
    <? else : ?>
        <?= $this->render_partial('admin/user/_activities_no_courses.php') ?>
    <? endif ?>
</section>