diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2019-01-30 14:29:05 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2019-01-30 14:29:05 +0100 |
commit | 3309bd722454fa8696ce2415075f401e444c9910 (patch) | |
tree | a96f73782faf66c715504de78172328d6347fe57 /app/view/templates/editrightbar.php | |
parent | 5e1ca86211da0439003303cf3e0741edf31bced4 (diff) | |
download | wcms-3309bd722454fa8696ce2415075f401e444c9910.tar.gz wcms-3309bd722454fa8696ce2415075f401e444c9910.zip |
author and user management
Diffstat (limited to 'app/view/templates/editrightbar.php')
-rw-r--r-- | app/view/templates/editrightbar.php | 53 |
1 files changed, 24 insertions, 29 deletions
diff --git a/app/view/templates/editrightbar.php b/app/view/templates/editrightbar.php index a081aac..15cef7f 100644 --- a/app/view/templates/editrightbar.php +++ b/app/view/templates/editrightbar.php @@ -65,42 +65,37 @@ </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>'; + <label for="authors">Invites editors</label> + <select name="authors[]" id="authors"> + <option value="" selected>--add author--</option> + <?php + $notyetauthorlist = array_diff($editorlist, $art->authors()); + foreach ($notyetauthorlist as $author) { + echo '<option value="'.$author.'" >'.$author.'</option>'; + } + } + ?> + + </select> + <?php + $alreadyauthorlist = array_intersect($editorlist, $art->authors()); + foreach ($alreadyauthorlist as $author) { + ?> + <div class="checkexternal"> + <?php if($user->level() >= 4) { ?> + <input type="checkbox" name="authors[]" id="<?= $author ?>" value="<?= $author ?>" checked> + <?php } ?> + <label for="<?= $author ?>" >⬗ <?= $author ?></label> + </div> + <?php } - ?> - </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> |