aboutsummaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-12-04 22:12:34 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-12-04 22:12:34 +0100
commitfc56b60be55b4340d647d2017fdeb24b81eb84b6 (patch)
treebf4875de0115181549408f981804f19350b69b80 /app
parent42e89ac398bdf2a98167b0b71123c98e297b2130 (diff)
downloadwcms-fc56b60be55b4340d647d2017fdeb24b81eb84b6.tar.gz
wcms-fc56b60be55b4340d647d2017fdeb24b81eb84b6.zip
showeditmenu
Diffstat (limited to 'app')
-rw-r--r--app/class/controllerart.php2
-rw-r--r--app/view/templates/edit.php2
-rw-r--r--app/view/templates/editrightbar.php4
-rw-r--r--app/view/templates/edittopbar.php25
-rw-r--r--app/view/templates/navart.php4
5 files changed, 30 insertions, 7 deletions
diff --git a/app/class/controllerart.php b/app/class/controllerart.php
index f64cda8..be82e6f 100644
--- a/app/class/controllerart.php
+++ b/app/class/controllerart.php
@@ -102,7 +102,7 @@ class Controllerart extends Controller
$this->art->addaffcount();
$this->artmanager->update($this->art);
}
- $data = array_merge($alerts, $page, ['art' => $this->art, 'artexist' => $artexist, 'canread' => $canread, 'readernav' => true]);
+ $data = array_merge($alerts, $page, ['art' => $this->art, 'artexist' => $artexist, 'canread' => $canread, 'readernav' => Config::showeditmenu()]);
$this->showtemplate('read', $data);
diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php
index 346d5bb..18940ff 100644
--- a/app/view/templates/edit.php
+++ b/app/view/templates/edit.php
@@ -14,7 +14,7 @@
- <?php $this->insert('edittopbar', ['art' => $art]) ?>
+ <?php $this->insert('edittopbar', ['art' => $art, 'user' => $user]) ?>
<div id="workspace">
diff --git a/app/view/templates/editrightbar.php b/app/view/templates/editrightbar.php
index 9572678..26976e8 100644
--- a/app/view/templates/editrightbar.php
+++ b/app/view/templates/editrightbar.php
@@ -10,7 +10,7 @@
<?php
foreach ($lasteditedartlist as $id) {
?>
- <li><a href="<?= $this->uart('artedit', $id) ?>"><?= $id === $art->id() ? '★' : '✎' ?> <?= $id ?></a></li>
+ <li><a href="<?= $this->uart('artedit', $id) ?>"><?= $id === $art->id() ? '➤' : '✎' ?> <?= $id ?></a></li>
<?php
}
@@ -32,7 +32,7 @@
echo '<ul>';
foreach ($idlist as $id) {
if($id === $art->id()) {
- echo '<li>★ '.$id.'</li>';
+ echo '<li>➤ '.$id.'</li>';
} else {
?>
<li><a href="<?= $this->uart('artedit', $id) ?>">✎ <?= $id ?></a></li>
diff --git a/app/view/templates/edittopbar.php b/app/view/templates/edittopbar.php
index 6d90932..a1aba01 100644
--- a/app/view/templates/edittopbar.php
+++ b/app/view/templates/edittopbar.php
@@ -1,9 +1,12 @@
<div id="topbar">
+
<form action="<?= $this->uart('artupdate', $art->id()) ?>" method="post" id="update">
+
+
<span>
- <a href="<?= $this->url('home') ?>" class="icon" >⏏</a>
+ <a href="<?= $this->url('home') ?>" class="icon" >⍇</a>
</span>
<span>
<input type="submit" value="update" accesskey="x" form="update">
@@ -27,4 +30,24 @@
<label for="fontsize">Font-size</label>
<input type="number" name="fontsize" value="<?= Config::fontsize() ?>" id="fontsize">
</span>
+
+
+
+<span id="test">
+ <?php if($user->iseditor()) { ?>
+
+ <?php
+ if($user->isadmin()) {
+ ?>
+ <a href="<?= $this->url('font') ?>">font</a>
+ <a href="<?= $this->url('admin') ?>">admin</a>
+ <?php
+ }
+ }
+ ?>
+</span>
+
+
+
+
</div> \ No newline at end of file
diff --git a/app/view/templates/navart.php b/app/view/templates/navart.php
index 8e7c40b..9d9f3ed 100644
--- a/app/view/templates/navart.php
+++ b/app/view/templates/navart.php
@@ -107,7 +107,7 @@
<?php if ($user->iseditor()) { ?>
<li class="drop">
- <a class="button" href="?aff=media" >Media</a>
+ <a class="button" href="<?= $this->url('media') ?>" >Media</a>
</li>
<?php } ?>
@@ -115,7 +115,7 @@
<?php if($user->isadmin()) { ?>
<li class="drop">
- <a class="button" href="?aff=admin" >Admin</a>
+ <a class="button" href="<?= $this->url('admin') ?>" >Admin</a>
</li>
<?php } ?>