aboutsummaryrefslogtreecommitdiff
path: root/app/class/Controllerhome.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2020-01-29 21:15:38 +0100
committervincent-peugnet <v.peugnet@free.fr>2020-01-29 21:15:38 +0100
commitc3014fb7be5c54ac9d1325f33f6fe0a2624161a8 (patch)
tree1583b667316e4ac6fe2e2b5bedcc190de7ff46c2 /app/class/Controllerhome.php
parentb28f1a4a516f93044c632b254670dd21f52e625c (diff)
downloadwcms-c3014fb7be5c54ac9d1325f33f6fe0a2624161a8.tar.gz
wcms-c3014fb7be5c54ac9d1325f33f6fe0a2624161a8.zip
new feature : home>display>tags colors
Diffstat (limited to 'app/class/Controllerhome.php')
-rw-r--r--app/class/Controllerhome.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/app/class/Controllerhome.php b/app/class/Controllerhome.php
index 9f8896c..d102930 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, '>=')];
+ $vars = ['user' => $this->user, 'table2' => $table2, 'opt' => $this->opt, 'columns' => $columns, 'faviconlist' => $this->mediamanager->listfavicon(), 'editorlist' => $this->usermanager->getlisterbylevel(2, '>='), 'colors' => $colors];
$vars['footer'] = ['version' => getversion(), 'total' => count($table), 'database' => Config::pagetable()];
if (isset($_POST['query']) && $this->user->iseditor()) {
@@ -61,6 +61,18 @@ class Controllerhome extends Controllerpage
$this->routedirect('home');
}
+ public function colors()
+ {
+ if (isset($_POST['tagcolor']) && $this->user->issupereditor()) {
+ $colors = new Colors();
+ $colors->hydrate($_POST);
+ $colors->tocss();
+ $colors->writecssfile();
+ }
+ $this->routedirect('home');
+
+ }
+
public function search()
{
if (isset($_POST['id']) && !empty($_POST['id'])) {