aboutsummaryrefslogtreecommitdiff
path: root/app/views/admission/courseset/instcourses.php
blob: 5d1901ec90b83e7881b93ee7450756bcd83f4ef7 (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
<?php
/**
 * @var array $selectedCourses
 */
?>
<table id="courselist" class="default">
    <thead>
        <colgroup>
            <col width="15">
            <col width="75">
            <col>
        </colgroup>
        <tr>
            <th>
                <input type="checkbox" data-proxyfor="[name^=courses]">
            </th>
            <th colspan="2">
                <?= _('Veranstaltungszuordnung') ?>
            </th>
        </tr>
    </thead>
    <tbody>
        <? if(!empty($allCourses)) : ?>
            <?foreach ($allCourses as $course) {
                $title = $course['Name'];
                $title .= (!$course['visible'] ? ' (' . _("versteckt") . ')' : '');
                $title .= " (" . (int)$course['admission_turnout'] . ")";
                if (in_array($course['seminar_id'], $selectedCourses)) {
                    $selected = ' checked="checked"';
                } else {
                    $selected = '';
                }
                ?>
                <tr class="course">
                    <td>
                        <input type="checkbox" name="courses[]" id="<?= $course['seminar_id'] ?>" value="<?= $course['seminar_id'] ?>"<?= $selected ?>>
                    </td>
                    <td>
                        <label for="<?= $course['seminar_id'] ?>">
                            <?= htmlReady($course['VeranstaltungsNummer']) ?>
                        </label>
                    </td>
                    <td>
                        <label for="<?= $course['seminar_id'] ?>">
                            <a href="<?=URLHelper::getScriptLink('dispatch.php/course/details/index/' . $course['seminar_id']) ?>"  data-dialog>
                                <?= Icon::create(
                                    'info-circle',
                                    Icon::ROLE_INACTIVE,
                                    ['title' =>_('Veranstaltungsdetails anzeigen')]
                                )?>
                            </a>
                            <?= htmlReady($title) ?>
                            <? if ($course['admission_type']) : ?>
                                <? $typename = call_user_func($course['admission_type'] . '::getName') ?>
                                <?= Icon::create(
                                    'exclaim-circle',
                                    Icon::ROLE_ATTENTION,
                                    ['title' => sprintf(_("vorhandene Anmelderegel: %s"), $typename)])
                                ?>
                            <? endif ?>
                        </label>
                    </td>
                </tr>
            <?php } ?>
        <? endif?>
    </tbody>
</table>