From a30e115d62f10183acb7ff946821aaf066d4a61e Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 29 Jan 2020 16:52:37 +0100 Subject: working on cssparser for tags colors --- app/class/Controllerhome.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'app/class/Controllerhome.php') diff --git a/app/class/Controllerhome.php b/app/class/Controllerhome.php index 1603511..81e4300 100644 --- a/app/class/Controllerhome.php +++ b/app/class/Controllerhome.php @@ -27,11 +27,12 @@ class Controllerhome extends Controllerpage } else { - - $table = $this->modelhome->getlister(); $this->opt = $this->modelhome->optinit($table); + $css = 'a.tag_bgg-fds_gd { background-color: #FF0021; } '; + $this->opt->parsetagcss($css); + $table2 = $this->modelhome->table2($table, $this->opt); $columns = $this->modelhome->setcolumns($this->user->columns()); -- cgit v1.2.3 From b28f1a4a516f93044c632b254670dd21f52e625c Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 29 Jan 2020 20:34:08 +0100 Subject: new feature : colored tags --- app/class/Controllerhome.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'app/class/Controllerhome.php') diff --git a/app/class/Controllerhome.php b/app/class/Controllerhome.php index 81e4300..9f8896c 100644 --- a/app/class/Controllerhome.php +++ b/app/class/Controllerhome.php @@ -30,8 +30,7 @@ class Controllerhome extends Controllerpage $table = $this->modelhome->getlister(); $this->opt = $this->modelhome->optinit($table); - $css = 'a.tag_bgg-fds_gd { background-color: #FF0021; } '; - $this->opt->parsetagcss($css); + $colors = new Colors($this->opt->taglist()); $table2 = $this->modelhome->table2($table, $this->opt); -- cgit v1.2.3 From c3014fb7be5c54ac9d1325f33f6fe0a2624161a8 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 29 Jan 2020 21:15:38 +0100 Subject: new feature : home>display>tags colors --- app/class/Controllerhome.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'app/class/Controllerhome.php') 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'])) { -- cgit v1.2.3