diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/class/art2.php | 2 | ||||
-rw-r--r-- | app/class/controllerart.php | 2 | ||||
-rw-r--r-- | app/class/model.php | 2 | ||||
-rw-r--r-- | app/view/templates/backtopbar.php | 51 | ||||
-rw-r--r-- | app/view/templates/edit.php | 3 | ||||
-rw-r--r-- | app/view/templates/editleftbar.php | 2 | ||||
-rw-r--r-- | app/view/templates/edittopbar.php | 32 | ||||
-rw-r--r-- | app/view/templates/home.php | 6 |
8 files changed, 44 insertions, 56 deletions
diff --git a/app/class/art2.php b/app/class/art2.php index 2bd1138..81b6569 100644 --- a/app/class/art2.php +++ b/app/class/art2.php @@ -171,7 +171,7 @@ class Art2 public function description($type = 'string') { if($type == 'short' && strlen($this->description) > 15 ) { - return substr($this->description, 0, 15) . '.'; + return substr($this->description, 0, 20) . '...'; } else { return $this->description; } diff --git a/app/class/controllerart.php b/app/class/controllerart.php index ce742a1..f8155ea 100644 --- a/app/class/controllerart.php +++ b/app/class/controllerart.php @@ -171,7 +171,7 @@ class Controllerart extends Controller } $fonts = []; - $this->showtemplate('edit', ['art' => $this->art, 'artexist' => true, 'tablist' => $tablist, 'artlist' => $idlist, 'showleftpanel' => $showleftpanel, 'showrightpanel' => $showrightpanel, 'fonts' => $fonts, 'tagartlist' => $tagartlist, 'lasteditedartlist' => $lasteditedartlist, 'faviconlist' => $faviconlist, 'editorlist' => $editorlist]); + $this->showtemplate('edit', ['art' => $this->art, 'artexist' => true, 'tablist' => $tablist, 'artlist' => $idlist, 'showleftpanel' => $showleftpanel, 'showrightpanel' => $showrightpanel, 'fonts' => $fonts, 'tagartlist' => $tagartlist, 'lasteditedartlist' => $lasteditedartlist, 'faviconlist' => $faviconlist, 'editorlist' => $editorlist, 'user' => $this->user]); } else { $this->routedirect('artread/', ['art' => $this->art->id()]); } diff --git a/app/class/model.php b/app/class/model.php index b514b00..2b222ec 100644 --- a/app/class/model.php +++ b/app/class/model.php @@ -17,7 +17,7 @@ abstract class Model const MEDIA_EXTENSIONS = array('jpeg', 'jpg', 'JPG', 'png', 'gif', 'mp3', 'mp4', 'mov', 'wav', 'flac', 'pdf'); const MEDIA_TYPES = ['image', 'video', 'sound', 'other']; - const COLUMNS = ['title', 'description', 'tag', 'date', 'datemodif', 'datecreation', 'secure', 'linkfrom', 'linkto', 'visitcount', 'affcount', 'editcount']; + const COLUMNS = ['id', 'title', 'description', 'tag', 'date', 'datemodif', 'datecreation', 'secure', 'linkfrom', 'linkto', 'visitcount', 'affcount', 'editcount']; const TEXT_ELEMENTS = ['header', 'nav', 'main', 'aside', 'footer']; const EDIT_SYMBOLS = ['pen', 'tool', 'none']; diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php index d6b522e..7d04c2e 100644 --- a/app/view/templates/backtopbar.php +++ b/app/view/templates/backtopbar.php @@ -8,6 +8,31 @@ </span> + +<?php if($user->iseditor()) { ?> + +<span id="menu"> +<a href="<?= $this->url('home') ?>" <?= $tab == 'home' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/home.png" alt="" class="icon">home</a> +<a href="<?= $this->url('media') ?>" <?= $tab == 'media' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/media.png" alt="" class="icon">media</a> +<a href="<?= $this->url('font') ?>" <?= $tab == 'font' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/font.png" alt="" class="icon">font</a> +<?php +if($user->isadmin()) { +?> +<a href="<?= $this->url('admin') ?>" <?= $tab == 'admin' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/admin.png" alt="" class="icon">admin</a> +<?php +} +?> +<a href="<?= $this->url('info') ?>" <?= $tab == 'info' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/info.png" alt="" class="icon">info</a> +</span> + + + + + +<?php } ?> + + + <span id="user"> <?php if($user->isvisitor()) { ?> @@ -23,8 +48,8 @@ <?php } else { ?> <span> -<a href="<?= $this->url('timeline') ?>" <?= $tab == 'timeline' ? 'class="actualpage"' : '' ?>>timeline</a> -<a href="<?= $this->url('user') ?>" <?= $tab == 'user' ? 'class="actualpage"' : '' ?>><?= $user->id() ?></a> <i><?= $user->level() ?></i> +<a href="<?= $this->url('timeline') ?>" <?= $tab == 'timeline' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/timeline.png" alt="" class="icon">timeline</a> +<a href="<?= $this->url('user') ?>" <?= $tab == 'user' ? 'class="actualpage"' : '' ?>><img src="/assets/icons/user.png" alt="" class="icon"><?= $user->id() ?></a> <i><?= $user->level() ?></i> </span> @@ -41,26 +66,4 @@ <?php } ?> -<?php if($user->iseditor()) { ?> - -<span id="menu"> -<a href="<?= $this->url('home') ?>" <?= $tab == 'home' ? 'class="actualpage"' : '' ?>>home</a> -<a href="<?= $this->url('media') ?>" <?= $tab == 'media' ? 'class="actualpage"' : '' ?>>media</a> -<a href="<?= $this->url('font') ?>" <?= $tab == 'font' ? 'class="actualpage"' : '' ?>>font</a> -<?php -if($user->isadmin()) { -?> -<a href="<?= $this->url('admin') ?>" <?= $tab == 'admin' ? 'class="actualpage"' : '' ?>>admin</a> -<?php -} -?> -<a href="<?= $this->url('info') ?>" <?= $tab == 'info' ? 'class="actualpage"' : '' ?>>info</a> -</span> - - - - - -<?php } ?> - </div>
\ No newline at end of file diff --git a/app/view/templates/edit.php b/app/view/templates/edit.php index 8d79174..5ce1d35 100644 --- a/app/view/templates/edit.php +++ b/app/view/templates/edit.php @@ -10,6 +10,9 @@ <body> <main class="editor"> + <?php $this->insert('backtopbar', ['user' => $user, 'tab' => 'edit']) ?> + + <?php $this->insert('edittopbar', ['art' => $art, 'user' => $user]) ?> <div id="workspace"> diff --git a/app/view/templates/editleftbar.php b/app/view/templates/editleftbar.php index d510f5d..7b4986d 100644 --- a/app/view/templates/editleftbar.php +++ b/app/view/templates/editleftbar.php @@ -62,7 +62,7 @@ <details <?= !empty($art->templatebody()) || !empty($art->templatecss()) || !empty($art->templatejavascript()) ? 'open' : '' ?>> - <summary>Tempalte</summary> + <summary>Template</summary> <fieldset> <label for="templatebody">BODY template</label> <select name="templatebody" id="templatebody"> diff --git a/app/view/templates/edittopbar.php b/app/view/templates/edittopbar.php index 1c422b7..3182d4d 100644 --- a/app/view/templates/edittopbar.php +++ b/app/view/templates/edittopbar.php @@ -1,4 +1,4 @@ -<div id="topbar"> +<div id="edittopbar"> @@ -9,7 +9,6 @@ <span> - <a href="<?= $this->url('home') ?>" class="icon" >⍇</a> <input type="submit" value="update" accesskey="s" form="update"> @@ -18,38 +17,21 @@ - <a href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank" class="icon" >👁</a> + <a href="<?= $this->uart('artread/', $art->id()) ?>" target="_blank" ><img src="/assets/icons/read.png" class="icon">display</a> <span id="headid"><?= $art->id() ?></span> </span> - - - -<span id="menu" > - <?php if($user->iseditor()) { ?> - - <a href="<?= $this->url('media') ?>"><span class="symbol">📁</span><span class="text">media</span></a> - <a href="<?= $this->url('font') ?>"><span class="symbol">📝</span><span class="text">font</span></a> - - <?php - if($user->isadmin()) { - ?> - <a href="<?= $this->url('admin') ?>"><span class="symbol">🔑</span><span class="text">admin</span></a> - <?php - } - } - ?> -</span> - - - - <span id="fontsize"> <label for="fontsize">Font-size</label> <input type="number" name="fontsize" value="<?= Config::fontsize() ?>" id="fontsize" min="5" max="99"> </span> +<span id="download"> + <a href="<?= $this->uart('artdownload', $art->id()) ?>"><img src="/assets/icons/download.png" class="icon"><span class="text">download</span></a> +</span> + + <span id="delete"> <a href="<?= $this->uart('artconfirmdelete', $art->id()) ?>"><span class="symbol">✖</span><span class="text">delete</span></a> </span> diff --git a/app/view/templates/home.php b/app/view/templates/home.php index 137e1b3..c741c70 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -117,11 +117,11 @@ <tr> <td><input type="checkbox" name="id[]" value="<?= $item->id() ?>" id="id_<?= $item->id() ?>"></td> <td><label title="<?= $item->title() ?>" for="id_<?= $item->id() ?>"><?= $item->id() ?></label></td> - <td><a href="<?= $this->uart('artedit', $item->id()) ?>">✏</a></td> - <td><a href="<?= $this->uart('artread/', $item->id()) ?>" target="_blank">👁</a></td> + <td><a href="<?= $this->uart('artedit', $item->id()) ?>"><img src="/assets/icons/edit.png" class="icon"></a></td> + <td><a href="<?= $this->uart('artread/', $item->id()) ?>" target="_blank"><img src="/assets/icons/read.png" class="icon"></a></td> <td class="delete"><a href="<?= $this->uart('artdelete', $item->id()) ?>" >✖</a></td> <?php if($user->issupereditor()) { ?> - <td><a href="<?= $this->uart('artdownload', $item->id()) ?>" download>↓</a></td> + <td><a href="<?= $this->uart('artdownload', $item->id()) ?>" download><img src="/assets/icons/download.png" class="icon"></a></td> <?php } if($columns['tag']) { ?> <td class="tag"><a title="<?= $item->tag('string') ?>"><?= $item->tag('sort') ?></a></td> <?php } if($columns['title']) { ?> |