From 33ed4c75fc932cafd701d47d3d58f6e68f5c2e2b Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sat, 13 Jul 2019 11:54:46 +0200 Subject: 1.2.6 Environnement update backtopbar always visible + minor fixes --- app/class/art2.php | 2 +- app/class/controllerart.php | 2 +- app/class/model.php | 2 +- app/view/templates/backtopbar.php | 51 ++++++++++++++++++++------------------ app/view/templates/edit.php | 3 +++ app/view/templates/editleftbar.php | 2 +- app/view/templates/edittopbar.php | 32 ++++++------------------ app/view/templates/home.php | 6 ++--- 8 files changed, 44 insertions(+), 56 deletions(-) (limited to 'app') 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 @@ + +iseditor()) { ?> + + +>home +>media +>font +isadmin()) { +?> +>admin + +>info + + + + + + + + + + isvisitor()) { ?> @@ -23,8 +48,8 @@ ->timeline ->id() ?> level() ?> +>timeline +>id() ?> level() ?> @@ -39,28 +64,6 @@ - - -iseditor()) { ?> - - ->home ->media ->font -isadmin()) { -?> ->admin - ->info - - - - - - \ 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 @@
+ insert('backtopbar', ['user' => $user, 'tab' => 'edit']) ?> + + insert('edittopbar', ['art' => $art, 'user' => $user]) ?>
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 @@
templatebody()) || !empty($art->templatecss()) || !empty($art->templatejavascript()) ? 'open' : '' ?>> - Tempalte + Template
@@ -18,38 +17,21 @@ - 👁 + display id() ?> - - - - - iseditor()) { ?> - - 📁media - 📝font - - isadmin()) { - ?> - 🔑admin - - - - - - + + download + + + delete 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 @@ - - 👁 + + issupereditor()) { ?> - + tag('sort') ?> -- cgit v1.2.3