aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates/editrightbar.php
blob: a081aac134ba924dd49c51f42b3526b563036a72 (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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
<div id="rightbar" class="bar">
    <input id="showrightpanel" name="workspace[showrightpanel]" value="1" class="toggle" type="checkbox"  <?= $showrightpanel == true ? 'checked' : '' ?>>
    <label for="showrightpanel" class="toogle"></label>
    <div id="rightbarpanel" class="panel">
    

    <details id="lastedited" open>
        <summary>Last edited</summary>
    <ul>
    <?php
    foreach ($lasteditedartlist as $id) {
        ?>
        <li><a href="<?= $this->uart('artedit', $id) ?>"><?= $id === $art->id() ? '➤' : '✎' ?> <?= $id ?></a></li>
        <?php
    }

    ?>
    </ul>

    </details>


    <details id="tags" open>
        <summary>Tags</summary>
        <?php
        foreach ($tagartlist as $tag => $idlist) {
            if(count($idlist) > 1) {
            ?>
            <strong><?= $tag ?></strong>
            <?php

            echo '<ul>';
            foreach ($idlist as $id) {
                if($id === $art->id()) {
                    echo '<li>➤ '.$id.'</li>';
                } else {
                ?>
                <li><a href="<?= $this->uart('artedit', $id) ?>"><?= $id ?></a></li>
                <?php
                }
            }
            }
            echo '</ul>';
        }

        ?>

    </details>

    <details id="tempaltes" open>
        <summary>Templates</summary>
        <ul>
        <?php
        foreach ($templates as $template => $id) {
            if(!empty($id) && !is_bool($id)) {
                ?>
                <li><?= $template ?> : <?= $id ?> <a href="<?= $this->uart('artedit', $id) ?>"></a></li>
                <?php
            }
        }
        
        ?>
        </ul>
        
    </details>

        <h3>Authors</h3>
    <ul>
    <?php
    foreach ($art->authors() as $author) {
        echo '<li>⬖ ' . $author .'</li>';
    }
    
    ?>
    </ul>

    <?php if($user->level() >= 4) { ?>

    <h3>Invites editors</h3>

    <label for="invites">Invites editors</label>
        <select name="invites[]" id="invites">
        <option value="" selected>--add invite user--</option>
        <?php
        $newinviteuserlist = array_diff($inviteuserlist, $art->invites());
        foreach ($newinviteuserlist as $inviteuser) {
            echo '<option value="'.$inviteuser.'" >'.$inviteuser.'</option>';
        }
        ?>
        </select>
        <?php
            $validateinviteusers = array_intersect($inviteuserlist, $art->invites());
            foreach ($validateinviteusers as $invite) {
                ?>
                <div class="checkexternal">
                <input type="checkbox" name="invites[]" id="<?= $invite ?>" value="<?= $invite ?>" checked>
                <label for="<?= $invite ?>" ><?= $invite ?></label>
                </div>
                <?php
            }
        ?>
    
        <?php } ?>

    </div>

</div>