From 388bd7c3aff8b440febd83598003f96d5a746505 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Sun, 18 Aug 2019 12:03:45 +0200 Subject: Render All Button --- app/class/controllerhome.php | 14 +++++++++++++- app/class/element.php | 6 +++--- app/class/modelrender.php | 4 ++-- app/class/routes.php | 1 + app/view/templates/homemenu.php | 11 ++++++++--- assets/css/home.css | 3 +-- composer.json | 2 +- 7 files changed, 29 insertions(+), 12 deletions(-) diff --git a/app/class/controllerhome.php b/app/class/controllerhome.php index 5a6d839..afbde7a 100644 --- a/app/class/controllerhome.php +++ b/app/class/controllerhome.php @@ -1,6 +1,6 @@ user->iseditor()) { + $pagelist = $this->modelhome->getlister(); + foreach ($pagelist as $page) { + $this->renderart($page); + $this->artmanager->update($page); + } + } + $this->routedirect('home'); + } + diff --git a/app/class/element.php b/app/class/element.php index 1a801e4..824a0b6 100644 --- a/app/class/element.php +++ b/app/class/element.php @@ -72,18 +72,18 @@ class Element $value = $optionmatch[3]; } else { $read = '

Rendering error :

Paramaters must have a value like : /' . $key . '=__value__ for parameter : ' . $key . '

'; - throw new Exception($read); + //throw new Exception($read); } $method = 'set' . $key; if (in_array($key, self::OPTIONS)) { if (!$this->$method($value)) { $read = '

Rendering error :

Invalid value input : ' . $value . ' for parameter : ' . $key . '

'; - throw new Exception($read); + //throw new Exception($read); } } else { $read = '

Rendering error :

Parameter name : ' . $optionmatch[1] . ' does not exist

'; - throw new Exception($read); + //throw new Exception($read); } } } diff --git a/app/class/modelrender.php b/app/class/modelrender.php index 3d8f25f..3736888 100644 --- a/app/class/modelrender.php +++ b/app/class/modelrender.php @@ -127,7 +127,7 @@ class Modelrender extends Modelart } } else { $read = '

Rendering error :

The page ' . $source . ', called in '. $element->fullmatch() . ', does not exist yet.

'; - throw new Exception($read); + //throw new Exception($read); } } else { @@ -298,7 +298,7 @@ class Modelrender extends Modelart { $text = preg_replace('%(src|href)="([\w-_]+(\/([\w-_])+)*\.[a-z0-9]{1,5})"%', '$1="' . Model::mediapath() . '$2" target="_blank" class="media"', $text); if (!is_string($text)) { - throw new Exception('Rendering error -> media module'); + //throw new Exception('Rendering error -> media module'); } return $text; } diff --git a/app/class/routes.php b/app/class/routes.php index 16aede2..c0b686b 100644 --- a/app/class/routes.php +++ b/app/class/routes.php @@ -17,6 +17,7 @@ class Routes ['GET', '/', 'Controllerhome#desktop', 'home'], ['POST', '/', 'Controllerhome#desktop', 'homequery'], ['POST', '/columns', 'Controllerhome#columns', 'homecolumns'], + ['POST', '/renderall', 'Controllerhome#renderall', 'homerenderall'], ['POST', '/upload', 'Controllerart#upload', 'artupload'], ['POST', '/!co', 'Controllerconnect#log', 'log'], ['GET', '/!co', 'Controllerconnect#connect', 'connect'], diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php index 2dd486c..f81933f 100644 --- a/app/view/templates/homemenu.php +++ b/app/view/templates/homemenu.php @@ -41,9 +41,14 @@ - - Render All - +
+ Actions +
+ Render all pages +
+ +
+
\ No newline at end of file diff --git a/assets/css/home.css b/assets/css/home.css index d1d58e8..a953c47 100644 --- a/assets/css/home.css +++ b/assets/css/home.css @@ -27,7 +27,7 @@ aside.home { aside.home details, aside.home span { - width: 30%; + width: 100%; } @@ -111,7 +111,6 @@ tr:hover { background-color: #7b97b9; width: 100%; padding: 3px 0.5%; - border-bottom: solid 1px dimgrey; } #topbar form { diff --git a/composer.json b/composer.json index f607921..355d0c7 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,7 @@ { "name": "w-cms", "description": "point'n think", - "version": "1.4.5", + "version": "1.4.6", "require": { "michelf/php-markdown": "^1.8", "league/plates": "3.*", -- cgit v1.2.3