aboutsummaryrefslogtreecommitdiff
path: root/app/views/studiengaenge/informationen/index.php
blob: fcdbc3b25e0e60d25e35ce096ad3d35ceb200932 (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
<?php
/**
 * @var Studiengaenge_InformationenController $controller
 * @var Fach[] $studycourses
 */
?>
<table class="default collapsable">
    <colgroup>
        <col style="width: 70%">
        <col style="width: 29%">
        <col style="width: 1%">
    </colgroup>
    <thead>
        <tr>
            <th><?= _('Fach') ?></th>
            <th><?= _('Studierende') ?></th>
            <th class="actions"><?= _('Aktionen') ?></th>
        </tr>
    </thead>
    <? foreach ($studycourses as $key => $studycourse) : ?>
        <? $count = UserStudyCourse::countBySql('fach_id = ?', [$studycourse->fach_id]); ?>
        <? if ($count > 0) : ?>
            <tbody class="collapsed">
                <tr class="table-header header-row">
                    <td class="toggle-indicator">
                        <a id="<?= $studycourse->fach_id ?>" class="mvv-load-in-new-row"
                           href="<?= $controller->showdegree($studycourse->fach_id, $key + 1) ?>">
                            <?= htmlReady($studycourse->name) ?>
                        </a>
                    </td>
                    <td>
                        <?= $count ?>
                    </td>
                    <td class="dont-hide actions">
                        <a href="<?= $controller->messagehelper(['fach_id' => $studycourse->fach_id]) ?>" data-dialog>
                            <?= Icon::create('mail')->asImg(
                                ['title' => sprintf(
                                    _('Alle Studierenden des Faches %s benachrichtigen.'),
                                    $studycourse->name)
                                ]) ?>
                        </a>
                    </td>
                </tr>
            </tbody>
        <? endif ?>
    <? endforeach ?>
</table>