aboutsummaryrefslogtreecommitdiff
path: root/app/views/shared/mvv_tree.php
blob: 23480a4cd6e8e7d08986727f16ed975de28c619a (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
<? foreach ($tree[$node] as $current) : ?>
<li>
    <? if ($current['class'] != 'Modulteil' && $current['id'] != 'root') : ?>
        <input id="<?= htmlReady($current['tree_id'] . $id_sfx->c) ?>" type="checkbox"<?= $current['class'] != 'StgteilabschnittModul' ? 'checked' : ''?>>
    <? endif; ?>
        <label for="<?= htmlReady($current['tree_id'] . $id_sfx->c++) ?>"></label>
    <? if ($current['class'] == 'StgteilabschnittModul') : ?>
        <a
            data-dialog
            title="<?= htmlReady($current['name']) ?>"
            href="<?= URLHelper::getScriptLink(
                'dispatch.php/shared/modul/overview/'
                . $current['id'] . '/' . $course->start_semester->id,
                [
                    'abschnitt_id' => $current['abschnitt_id'],
                ]
            ) ?>">
            <?= htmlReady($current['name']) ?>
        </a>
        <a
            data-dialog="size=auto"
            title="<?= htmlReady($current['name']) ?>"
            href="<?= URLHelper::getScriptLink(
                'dispatch.php/shared/modul/description/'
                . $current['id'],
            [
                'abschnitt_id' => $current['abschnitt_id'],
            ]) ?>">
            <?= Icon::create('log', 'clickable', ['title' => _('Modulbeschreibung')]); ?>
        </a>
    <? else : ?>
        <?= htmlReady($current['name']) ?>
    <? endif; ?>
    <? if ($current['class'] != 'Modulteil') : ?>
        <ul>
            <?= $this->render_partial('shared/mvv_tree.php', ['tree' => $tree, 'node' => $current['tree_id']]) ?>
        </ul>
    <? endif; ?>
</li>
<? endforeach; ?>