aboutsummaryrefslogtreecommitdiff
path: root/w/class/controllerart.php
diff options
context:
space:
mode:
authorvincent-peugnet <v.peugnet@free.fr>2018-11-10 21:43:24 +0100
committervincent-peugnet <v.peugnet@free.fr>2018-11-10 21:43:24 +0100
commit2f363e8fa26ab849539e64ff7caa21bd164e8979 (patch)
tree238f2689e44bfc26329f970ced4c678b1ab6818d /w/class/controllerart.php
parent687b1f851abbb28750d2921d4f5beaac24b3249d (diff)
downloadwcms-2f363e8fa26ab849539e64ff7caa21bd164e8979.tar.gz
wcms-2f363e8fa26ab849539e64ff7caa21bd164e8979.zip
sidebars-html-inserts
Diffstat (limited to 'w/class/controllerart.php')
-rw-r--r--w/class/controllerart.php18
1 files changed, 16 insertions, 2 deletions
diff --git a/w/class/controllerart.php b/w/class/controllerart.php
index ef65f48..33bd93f 100644
--- a/w/class/controllerart.php
+++ b/w/class/controllerart.php
@@ -75,7 +75,20 @@ class Controllerart extends Controllerdb
public function edit()
{
if ($this->importart() && $this->user->canedit()) {
- $this->showtemplate('edit', ['art' => $this->art, 'artexist' => true]);
+ $tablist = ['section' => $this->art->md(), 'css' => $this->art->css(), 'header' => $this->art->header(), 'nav' => $this->art->nav(), 'aside' => $this->art->aside(), 'footer' => $this->art->footer(), 'html' => $this->art->html(), 'javascript' => $this->art->javascript()];
+
+ $artlist = $this->artmanager->list();
+
+ if(isset($_SESSION['workspace'])) {
+ $showleftpanel = $_SESSION['workspace']['showleftpanel'];
+ $showrightpanel = $_SESSION['workspace']['showrightpanel'];
+ } else {
+ $showleftpanel = false;
+ $showrightpanel = false;
+ }
+
+
+ $this->showtemplate('edit', ['art' => $this->art, 'artexist' => true, 'tablist' => $tablist, 'artlist' => $artlist, 'showleftpanel' => $showleftpanel, 'showrightpanel' => $showrightpanel]);
} else {
$this->redirect('?id=' . $this->art->id());
}
@@ -112,7 +125,8 @@ class Controllerart extends Controllerdb
public function update()
{
-
+ $_SESSION['workspace']['showrightpanel'] = isset($_POST['workspace']['showrightpanel']);
+ $_SESSION['workspace']['showleftpanel'] = isset($_POST['workspace']['showleftpanel']);
if ($this->importart() && $this->user->canedit()) {
$this->art->hydrate($_POST);