aboutsummaryrefslogtreecommitdiff
path: root/app/views/course/grouping/parent.php
blob: 0e4783d22052a42639e1f110eff4376f14c452fb (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
<? if ($parent) : ?>
<form class="default" method="post" action="<?= $controller->url_for('course/grouping/unassign_parent') ?>">
    <?= CSRFProtection::tokenTag() ?>
    <fieldset>
        <legend><?= _('Veranstaltung zuordnen') ?></legend>
        <section>
            <p>
                <?= sprintf(
                    _('Diese Veranstaltung gehört zur Hauptveranstaltung %s%s%s.'),
                    sprintf(
                        '<a href="%s" title="%s">',
                        $controller->link_for('course/grouping/children', ['cid' => $parent->id]),
                        htmlReady($parent->getFullName())
                    ),
                    htmlReady($parent->getFullName()),
                    '</a>'
                ) ?>
            </p>
        </section>
    </fieldset>

    <footer>
        <?= Studip\Button::createCancel(_('Zuordnung aufheben'), 'unassign') ?>
    </footer>
</form>
<? else : ?>
<form class="default" method="post" action="<?= $controller->url_for('course/grouping/assign_parent') ?>">
    <fieldset>
        <legend><?= _('Veranstaltung zuordnen') ?></legend>

        <p>
            <?= _('Diese Veranstaltung ist noch keiner Hauptveranstaltung zugeordnet.') ?>
        </p>

        <label>
            <?= _('Veranstaltung') ?>
            <?= $search->render() ?>
        </label>
    </fieldset>

    <footer>
        <?= Studip\Button::createAccept(_('Zuordnen'), 'assign') ?>
    </footer>
</form>
<? endif ?>