aboutsummaryrefslogtreecommitdiff
path: root/app/views/studiengaenge/informationen/showstudycourse.php
blob: 7cd7ceda46c196d5b56e09035c38594948d5b222 (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
<?php
/**
 * @var Studiengaenge_InformationenController $controller
 * @var Fach $studycourses
 * @var Degree $degree
 */
?>
<td colspan="3">
    <table class="default">
        <colgroup>
            <col style="width: 70%">
            <col style="width: 29%">
            <col style="width: 1%">
        </colgroup>
        <? foreach ($studycourses as $key => $course) : ?>
            <? if (($count = UserStudyCourse::countBySql('fach_id = :fach_id AND abschluss_id = :abschluss_id',
                    [':fach_id' => $course->fach_id, ':abschluss_id' => $degree->abschluss_id])) > 0) : ?>
                <tr>
                    <td><?= htmlReady($course->name) ?></td>
                    <td>
                        <?= $count ?>
                    </td>
                    <td class="actions">
                        <?= $action = ActionMenu::get()->setContext($course->name)
                            ->addLink($controller->messagehelperURL(
                                ['fach_id' => $course->fach_id, 'abschluss_id' => $degree->abschluss_id]),
                                _('Nachricht an Studierende schreiben'),
                                Icon::create(
                                    'mail',
                                    Icon::ROLE_CLICKABLE,
                                    ['title' => sprintf(
                                        _('Nachricht an alle Studierende mit dem Studiengang %s mit dem Abschluss %s'),
                                        $course->name, $degree->name)
                                    ]),
                                ['data-dialog' => ''])->render()
                        ?>
                    </td>
                </tr>
            <? endif ?>
        <? endforeach ?>
    </table>
</td>