From e17392e46259e6f2e012017987cf7c31c171488f Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 28 Oct 2018 19:56:27 +0100 Subject: abstract config NWY --- w/class/controllerhome.php | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) (limited to 'w/class/controllerhome.php') diff --git a/w/class/controllerhome.php b/w/class/controllerhome.php index ecbc3c7..8c98949 100644 --- a/w/class/controllerhome.php +++ b/w/class/controllerhome.php @@ -4,6 +4,7 @@ class Controllerhome extends Controllerdb { protected $modelhome; + protected $opt; public function __construct() { parent::__construct(); @@ -15,24 +16,32 @@ class Controllerhome extends Controllerdb public function desktop() { - echo '

Desktop

'; - - echo '

Menu Bar

'; $this->table2(); } public function table2() { - if ($this->useriseditor()) { - $datas = $this->modelhome->table2(); + $table = $this->artmanager->getlister(['id', 'tag', 'linkfrom', 'linkto', 'description', 'title', 'datemodif', 'datecreation', 'secure']); + $this->opt = $this->modelhome->optinit($table); + + $table2 = $this->modelhome->table2($table, $this->opt); + + $this->showtemplate('home', ['user' => $this->user, 'table2' => $table2, 'opt' =>$this->opt]); - var_dump($datas); - - } } + public function analyseall() + { + if($this->user->level() >= Modeluser::EDITOR) { + $scan = new Modelanalyse; + $scan->analyseall(); + + $this->table2(); + } + } + public function massedit() { echo '

Mass Edit

'; -- cgit v1.2.3