From 27f1fb9c19fa2c2fd28863809ccc6ba526499c0d Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Thu, 30 Jan 2020 03:32:31 +0100 Subject: thumbnail can be changed in multi edit --- app/class/Controllerhome.php | 2 +- app/view/templates/editleftbar.php | 38 ++++++++++---------------------------- app/view/templates/edittopbar.php | 2 +- app/view/templates/home.php | 2 +- app/view/templates/homemenu.php | 12 +++++++++++- 5 files changed, 24 insertions(+), 32 deletions(-) (limited to 'app') diff --git a/app/class/Controllerhome.php b/app/class/Controllerhome.php index d102930..02d6c9d 100644 --- a/app/class/Controllerhome.php +++ b/app/class/Controllerhome.php @@ -36,7 +36,7 @@ class Controllerhome extends Controllerpage $columns = $this->modelhome->setcolumns($this->user->columns()); - $vars = ['user' => $this->user, 'table2' => $table2, 'opt' => $this->opt, 'columns' => $columns, 'faviconlist' => $this->mediamanager->listfavicon(), 'editorlist' => $this->usermanager->getlisterbylevel(2, '>='), 'colors' => $colors]; + $vars = ['user' => $this->user, 'table2' => $table2, 'opt' => $this->opt, 'columns' => $columns, 'faviconlist' => $this->mediamanager->listfavicon(), 'thumbnaillist' => $this->mediamanager->listthumbnail(), 'editorlist' => $this->usermanager->getlisterbylevel(2, '>='), 'colors' => $colors]; $vars['footer'] = ['version' => getversion(), 'total' => count($table), 'database' => Config::pagetable()]; if (isset($_POST['query']) && $this->user->iseditor()) { diff --git a/app/view/templates/editleftbar.php b/app/view/templates/editleftbar.php index cf30624..3004351 100644 --- a/app/view/templates/editleftbar.php +++ b/app/view/templates/editleftbar.php @@ -52,7 +52,9 @@ --no thumbnail--'; + if(!file_exists(Wcms\Model::thumbnailpath() . $page->thumbnail())) { + echo ''; + } foreach ($thumbnaillist as $thumbnail) { ?> @@ -97,6 +99,11 @@ ?> +
+ templateoptions()) ? 'checked' : '' ?>> + +
+ - - templatecss())) { - ?>
templateoptions()) ? 'checked' : '' ?>> @@ -126,20 +129,7 @@ templateoptions()) ? 'checked' : '' ?>>
-
- templateoptions()) ? 'checked' : '' ?>> - -
- templateoptions() as $option) { - if($option != 'externaljavascript') { - echo ''; - } - } - } - - ?> + @@ -155,20 +145,12 @@ - templatejavascript())) { - ?> +
templateoptions()) ? 'checked' : '' ?>>
- templateoptions())) { - echo ''; - } - - } ?> diff --git a/app/view/templates/edittopbar.php b/app/view/templates/edittopbar.php index 5aa13ba..2eefd0f 100644 --- a/app/view/templates/edittopbar.php +++ b/app/view/templates/edittopbar.php @@ -2,7 +2,7 @@ -
+
diff --git a/app/view/templates/home.php b/app/view/templates/home.php index 3ca4556..fafd87b 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -16,7 +16,7 @@ insert('homemenu', ['user' => $user, 'opt' => $opt, 'optlist' => $optlist, 'pagelist' => $pagelist, 'faviconlist' => $faviconlist, 'editorlist' => $editorlist, 'colors' => $colors]); + $this->insert('homemenu', ['user' => $user, 'opt' => $opt, 'optlist' => $optlist, 'pagelist' => $pagelist, 'faviconlist' => $faviconlist, 'thumbnaillist' => $thumbnaillist, 'editorlist' => $editorlist, 'colors' => $colors]); ?> diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php index 51a58e9..e437a4e 100644 --- a/app/view/templates/homemenu.php +++ b/app/view/templates/homemenu.php @@ -76,7 +76,7 @@
- Favicon + Images

+ + +
Templates