diff options
author | vincent-peugnet <v.peugnet@free.fr> | 2018-12-26 19:35:19 +0100 |
---|---|---|
committer | vincent-peugnet <v.peugnet@free.fr> | 2018-12-26 19:35:19 +0100 |
commit | 3cbecb3a54fac2708774158ae65dafec6d098937 (patch) | |
tree | bf3b105f0dffe425d528f4caa4de4dc40261167b /app/view/templates | |
parent | b596f5d1c15ce3e2df50c756fd56080192e438ef (diff) | |
download | wcms-3cbecb3a54fac2708774158ae65dafec6d098937.tar.gz wcms-3cbecb3a54fac2708774158ae65dafec6d098937.zip |
feature: invite editors
Diffstat (limited to 'app/view/templates')
-rw-r--r-- | app/view/templates/edit.php | 2 | ||||
-rw-r--r-- | app/view/templates/editrightbar.php | 30 | ||||
-rw-r--r-- | app/view/templates/navart.php | 2 | ||||
-rw-r--r-- | app/view/templates/read.php | 2 |
4 files changed, 32 insertions, 4 deletions
diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php index 32de517..415fcce 100644 --- a/app/view/templates/edit.php +++ b/app/view/templates/edit.php @@ -20,7 +20,7 @@ <?php $this->insert('editleftbar', ['art' => $art, 'tablist' => $tablist, 'artlist' => $artlist, 'showleftpanel' => $showleftpanel, 'faviconlist' => $faviconlist]) ?> <?php $this->insert('edittabs', ['tablist' => $tablist, 'opentab' => $art->interface(), 'templates' => $art->template()]) ?> - <?php $this->insert('editrightbar', ['art' => $art, 'artlist' => $artlist, 'showrightpanel' => $showrightpanel, 'templates' => $art->template(), 'tagartlist' => $tagartlist, 'lasteditedartlist' => $lasteditedartlist]) ?> + <?php $this->insert('editrightbar', ['art' => $art, 'artlist' => $artlist, 'showrightpanel' => $showrightpanel, 'templates' => $art->template(), 'tagartlist' => $tagartlist, 'lasteditedartlist' => $lasteditedartlist, 'inviteuserlist' => $inviteuserlist, 'user' => $user]) ?> </div> diff --git a/app/view/templates/editrightbar.php b/app/view/templates/editrightbar.php index 8ee402d..e42cdf1 100644 --- a/app/view/templates/editrightbar.php +++ b/app/view/templates/editrightbar.php @@ -73,7 +73,35 @@ ?> </ul> - + + <?php if($user->level() >= 4) { ?> + + <h3>Invites editors</h3> + + <label for="invites">Invites editors</label> + <select name="invites[]" id="invites"> + <option value="" selected>--select 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>
\ No newline at end of file diff --git a/app/view/templates/navart.php b/app/view/templates/navart.php index 9d9f3ed..be3b248 100644 --- a/app/view/templates/navart.php +++ b/app/view/templates/navart.php @@ -89,7 +89,7 @@ <?php } ?> -<?php if($user->iseditor() && $artexist) { ?> +<?php if($canedit && $artexist) { ?> <li class="drop"> <a class="button" href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank">display</a> diff --git a/app/view/templates/read.php b/app/view/templates/read.php index 42fba7b..f8201cc 100644 --- a/app/view/templates/read.php +++ b/app/view/templates/read.php @@ -34,7 +34,7 @@ $this->stop(); <?php if ($readernav) { - $this->insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist]); + $this->insert('navart', ['user' => $user, 'art' => $art, 'artexist' => $artexist, 'canedit' => $canedit]); } ?> |