aboutsummaryrefslogtreecommitdiff
path: root/app/view/templates/editrightbar.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2019-01-30 14:29:05 +0100
committervincent-peugnet <v.peugnet@free.fr>2019-01-30 14:29:05 +0100
commit3309bd722454fa8696ce2415075f401e444c9910 (patch)
treea96f73782faf66c715504de78172328d6347fe57 /app/view/templates/editrightbar.php
parent5e1ca86211da0439003303cf3e0741edf31bced4 (diff)
downloadwcms-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.php53
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>