aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates/editleftbar.php
blob: 7533599c946cddc078997feae853b0d8f7cb6913 (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
<div id="leftbar">
    <input id="showleftpanel" name="workspace[showleftpanel]" value="1" class="toggle" type="checkbox" <?= $showleftpanel == true ? 'checked' : '' ?>>
    <label for="showleftpanel" class="toogle"></label>
    <div id="leftbarpanel" class="panel">
    <details id="editinfo" open>
        <summary>Infos</summary>
        <fieldset>                        
            <label for="title">title :</label>
            <input type="text" name="title" id="title" value="<?= $art->title(); ?>">
            <label for="description">Description :</label>
            <input type="text" name="description" id="description" value="<?= $art->description(); ?>">
            <label for="tag">Tag(s) :</label>
            <input type="text" name="tag" id="tag" value="<?= $art->tag('string'); ?>">
            <label for="secure">Privacy level :</label>
            <select name="secure" id="secure">
                <option value="0" <?= $art->secure() == 0 ? 'selected' : '' ?>>0</option>
                <option value="1" <?= $art->secure() == 1 ? 'selected' : '' ?>>1</option>
                <option value="2" <?= $art->secure() == 2 ? 'selected' : '' ?>>2</option>
                <option value="3" <?= $art->secure() == 3 ? 'selected' : '' ?>>3</option>
            </select>
        </fieldset>
    </details>
    <details>
        <summary>Advanced</summary>
            <fieldset>
            <h3>Template options</h3>
            <ul>
            <?php
            foreach ($tablist as $element => $value) {
                if(isset($art->template()[$element])) {
                    $template = $art->template()[$element];
                } else {
                    $template = '';
                }
                echo '<li>';
                echo '<label for="'.$element.'template">'.$element.'</label>';
                echo '<select name="template['.$element.']" id="'.$element.'template">';
                ?>
                <option value="" <?= $template === '' ? 'selected' : '' ?>>--no template--</option>
                <?php
                foreach ($artlist as $artid ) {

                    ?>
                    <option value="<?= $artid ?>" <?= $template === $artid ? 'selected' : '' ?>><?= $artid ?></option>
                    <?php
                }
                echo '</select>';
                echo '</li>';
            }


            ?>
            </ul>
            </fieldset>
    </details>
    <details id="editcss" open>
        <summary>Quick CSS</summary>
        
    </details>
    <details>
        <summary>Help</summary>
        <div id="help">
            <?php $this->insert('edithelp') ?>

        </div>
    </details>

    </div>

</div>