aboutsummaryrefslogtreecommitdiff
path: root/app/views/siteinfo/edit.php
blob: 7011718c8e8b9fe187796955b0543c250e345978 (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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
<?
# Lifter010: TODO
use Studip\Button, Studip\LinkButton;

?>
<form action="<?= $controller->url_for('siteinfo/save') ?>" method="POST" class="default">
    <?= CSRFProtection::tokenTag() ?>
    <fieldset>
        <legend>
            <? if(isset($edit_rubric)): ?>
                <?= _('Rubrik bearbeiten') ?>
            <? else : ?>
                <?= _('Seite bearbeiten') ?>
            <? endif ?>
        </legend>

        <? if(isset($edit_rubric)): ?>
            <input type="hidden" name="rubric_id" value="<?= htmlReady($rubric_id) ?>">
            <label>
                <?= _('Titel der Rubrik')?>
                <input type="text" name="rubric_name" id="rubric_name" value="<?= htmlReady($rubric_name) ?>">
            </label>
            <label>
                <?= _('Position der Rubrik') ?>
                <input type="number" name="rubric_position" id="rubric_position" value="<?= (int)$rubric_position ?>">
            </label>
        <? else: ?>
            <label>
                <?= _('Rubrik-Zuordnung')?>
                <select name="rubric_id">
                <? foreach ($rubrics as $option): ?>
                    <option value="<?= htmlReady($option['rubric_id']) ?>" <? if ($currentrubric == $option['rubric_id']) echo 'selected'; ?>>
                        <?= htmlReady(language_filter($option['name'])) ?>
                    </option>
                <? endforeach; ?>
                </select>
            </label>

            <label>
                <?= _('Seitentitel')?>
                <input type="text" name="detail_name" id="detail_name" value="<?= htmlReady($detail_name) ?>">
            </label>

            <label>
                <input type="checkbox" name="draft_status" id="draft_status" <?= $draft_status ? 'checked' : ''?>>
                <?= _('Entwurfsmodus (nur sichtbar für root)') ?>
            </label>

            <label>
                <input type="checkbox" name="page_disabled_nobody" id="page_disabled_nobody" <?= $page_disabled_nobody ? 'checked' : ''?>>
                <?= _('Seite nicht anzeigen für nicht angemeldete Benutzer') ?>
            </label>

            <label>
                <?= _('Position der Seite') ?>
                <input type="number" name="page_position" id="page_position" value="<?= (int)$page_position ?>">
            </label>

            <label>
                <?= _('Seiteninhalt')?>
                <textarea style="height: 15em;" name="content" id="content" class="size-l wysiwyg"><?= wysiwygReady($content) ?></textarea>
            </label>

            <input type="hidden" name="detail_id" value="<?= $currentdetail?>">
        <? endif; ?>
    </fieldset>

    <footer data-dialog-button>
        <?= Studip\Button::createAccept(_('Abschicken')) ?>
        <?= Studip\LinkButton::createCancel(_('Abbrechen'), $controller->url_for('siteinfo/show/'.$currentrubric.'/'.$currentdetail)) ?>
    </footer>
</form>

<? if(!isset($edit_rubric)): ?>
    <?= $this->render_partial('siteinfo/help.php') ?>
<? endif; ?>