aboutsummaryrefslogtreecommitdiff
path: root/app/views/study_area/tree.php
blob: e1f2557194e14b094971409041110706df69ecb0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<li>
<? if ($node->id !== 'root' && $node->required_children): ?>
    <input id='<?= htmlReady($node->id) ?>' type='checkbox' <?= $open && !in_array($layer, $dont_open) ? 'checked' : ''?>>
<? endif; ?>
    <label for='<?= htmlReady($node->id) ?>'></label>

<? if ($node->id !== 'root'): ?>
    <a href="<?= URLHelper::getLink('show_bereich.php?level=sbb&id=' . $node->id) ?>">
        <?= htmlReady($node->name) ?>
    </a>
<? else: ?>
    <?= htmlReady($node->name) ?>
<? endif; ?>

<? if ($node->required_children): ?>
    <ul>
    <? foreach ($node->required_children as $child): ?>
        <?= $this->render_partial('study_area/tree.php', ['node' => $child, 'open' => $open, 'layer' => $layer + 1]) ?>
    <? endforeach; ?>
    </ul>
<? endif; ?>
</li>