aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/members/additional.php
blob: 0c794584d8a0ff83b8f9417bb2a5ac7aae3aa9ae (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
<?php
/**
 * @var array $aux
 * @var Course_MembersController $controller
 */
?>
<? if (count($aux['rows']) === 0) : ?>
    <?= MessageBox::info(_('Keine Zusatzangaben oder Teilnehmende vorhanden.')) ?>
<? else : ?>
    <form method="post" action="<?= $controller->store_additional() ?>">
        <?= CSRFProtection::tokenTag()?>
        <table class="default">
            <caption><?= _('Zusatzangaben bearbeiten') ?></caption>
            <thead>
                <tr>
                <? foreach ($aux['head'] as $head): ?>
                    <th><?= htmlReady($head) ?></th>
                <? endforeach; ?>
                </tr>
            </thead>
            <tbody>
            <? foreach ($aux['rows'] as $entry): ?>
                <tr>
                <? foreach ($aux['head'] as $key => $value): ?>
                    <td><?= $key === 'name' ? htmlReady($entry[$key]) : $entry[$key] ?></td>
                <? endforeach; ?>
                </tr>
            <? endforeach; ?>
            </tbody>
            <tfoot>
                <tr>
                    <td colspan="<?= count($aux['head']) ?>">
                        <?= Studip\Button::create(_('Speichern'), 'save') ?>
                    </td>
                </tr>
            </tfoot>

        </table>
    </form>
<? endif ?>