From cdd3895f772d60404c73abf9067b0f0a09e4ebf2 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Wed, 22 Jan 2020 02:14:11 +0100 Subject: admin use actual interface style --- app/view/templates/admin.php | 389 +++++++++++++++++++++---------------------- 1 file changed, 189 insertions(+), 200 deletions(-) diff --git a/app/view/templates/admin.php b/app/view/templates/admin.php index f7d25b3..7186f26 100644 --- a/app/view/templates/admin.php +++ b/app/view/templates/admin.php @@ -10,284 +10,273 @@
-
+ + +
-

Administration

-
- - -
- - - -
- -
- -

Home page

- -

Here you can set the home-page view for visitors.

- -
- > - -
- -
- > - -
- -
- > - -
- - - -
- -
-

Page creation

+

Home page

-

What really happend when you create a new page

+

Here you can set the home-page view for visitors.

- - +
+ form="admin"> + +
+
+ form="admin"> + +
+
+ form="admin"> + +
+ - - - - - - - - - - - -
- -
- - - -

Alert pages

- -

Common options

- - - + + Link to this page (for visitors) - + ?> + - - +

Page creation

+

What really happend when you create a new page

+ + -

Un-existing

- - This will also be shown as a tooltip over links. - -
- - > - -
-

Private

- - - -
- - > - -
+ + -

Not published

+ + + + - - -
- - > - -
+

Alert pages

-

CSS

+

Common options

-
- - > - -
+ + -

- You can use body.alert class to specify style. -

-
- - -
- + + -

Render

-
- - > - -
+ + -

Links

-
- - > - -
+

Un-existing

-
- - > - -
+ + This will also be shown as a tooltip over links. + - (This modifications need re-rendering) +
+ + form="admin"> + +
+

Private

-
+ + +
+ + form="admin"> + +
+

Not published

+ + +
+ + form="admin"> + +
-
+

CSS

-

CSS

+
+ + form="admin"> + +
- - +

+ You can use body.alert class to specify style. +

- - + -
+

Render

+
+ + form="admin"> + +
+

Links

+
+ + form="admin"> + +
+
+ + form="admin"> + +
+ (This modifications need re-rendering) -
-

Interface

-

Set interface Style

+

CSS

- + + -
+ + +

Databases

+

Manage databases

-
+

+ -

Tracking

+ +

- - +

+ + + + +

+

+ - (Need rendering to work) -
+

Interface

+

Set interface Style

+ +

Tracking

-
- -
+ + + (Need rendering to work) -
-- cgit v1.2.3 From 40ef00fee7286a186673ff3fb26b6802421b2bc4 Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Thu, 30 Jan 2020 01:54:50 +0100 Subject: work on thumbnail admin --- app/class/Config.php | 13 +++++++++++++ app/class/Page.php | 26 +++----------------------- app/view/templates/admin.php | 12 ++++++++++++ app/view/templates/editleftbar.php | 33 ++++++++++++++++++++++++--------- assets/css/tagcolors.css | 17 +++++++++++++++++ 5 files changed, 69 insertions(+), 32 deletions(-) create mode 100644 assets/css/tagcolors.css diff --git a/app/class/Config.php b/app/class/Config.php index 555129b..6ddb3e4 100644 --- a/app/class/Config.php +++ b/app/class/Config.php @@ -23,6 +23,7 @@ abstract class Config protected static $defaultbody = '%HEADER%'. PHP_EOL .PHP_EOL . '%NAV%'. PHP_EOL .PHP_EOL . '%ASIDE%'. PHP_EOL .PHP_EOL . '%MAIN%'. PHP_EOL .PHP_EOL . '%FOOTER%'; protected static $defaultpage = ''; protected static $defaultfavicon = ''; + protected static $defaultthumbnail = ''; protected static $analytics = ''; protected static $externallinkblank = true; protected static $internallinkblank = false; @@ -204,6 +205,11 @@ abstract class Config return self::$defaultfavicon; } + public static function defaultthumbnail() + { + return self::$defaultthumbnail; + } + public static function analytics() { return self::$analytics; @@ -363,6 +369,13 @@ abstract class Config } } + public static function setdefaultthumbnail($defaultthumbnail) + { + if(is_string($defaultthumbnail)) { + self::$defaultthumbnail = $defaultthumbnail; + } + } + public static function setdefaultpage($defaultpage) { if(is_string($defaultpage)) { diff --git a/app/class/Page.php b/app/class/Page.php index 7475b6b..fff98dc 100644 --- a/app/class/Page.php +++ b/app/class/Page.php @@ -17,7 +17,6 @@ class Page extends Dbitem protected $datemodif; protected $daterender; protected $css; - protected $quickcss; protected $javascript; protected $body; protected $header; @@ -76,7 +75,6 @@ class Page extends Dbitem $this->setdatemodif($now); $this->setdaterender($now); $this->setcss(''); - $this->setquickcss([]); $this->setjavascript(''); $this->setbody(''); $this->setheader(''); @@ -93,7 +91,7 @@ class Page extends Dbitem $this->settemplatebody(''); $this->settemplatecss(''); $this->settemplatejavascript(''); - $this->settemplateoptions(['externalcss', 'externaljavascript', 'favicon', 'reccursivecss', 'quickcss']); + $this->settemplateoptions(['externalcss', 'externaljavascript', 'favicon', 'thumbnail', 'reccursivecss']); $this->setfavicon(''); $this->setauthors([]); $this->setinvites([]); @@ -228,15 +226,6 @@ class Page extends Dbitem return $this->css; } - public function quickcss($type = 'array') - { - if ($type == 'json') { - return json_encode($this->quickcss); - } elseif ($type == 'array') { - return $this->quickcss; - } - } - public function javascript($type = 'string') { return $this->javascript; @@ -365,9 +354,9 @@ class Page extends Dbitem $template['javascript'] = $this->templatejavascript; $template['cssreccursive'] = $this->checkoption('reccursive'); - $template['cssquickcss'] = $this->checkoption('quickcss'); $template['externalcss'] = $this->checkoption('externalcss'); $template['cssfavicon'] = $this->checkoption('favicon'); + $template['cssthumbnail'] = $this->checkoption('thumbnail'); $template['externaljavascript'] = $this->checkoption('externaljavascript'); @@ -381,7 +370,7 @@ class Page extends Dbitem function checkoption($option) { - if (in_array('reccursive', $this->templateoptions)) { + if (in_array($option, $this->templateoptions)) { return true; } else { return false; @@ -536,15 +525,6 @@ class Page extends Dbitem } - public function setquickcss($quickcss) - { - if (is_string($quickcss)) { - $quickcss = json_decode($quickcss, true); - } - if (is_array($quickcss)) { - $this->quickcss = $quickcss; - } - } public function setjavascript($javascript) { diff --git a/app/view/templates/admin.php b/app/view/templates/admin.php index 7186f26..ab71957 100644 --- a/app/view/templates/admin.php +++ b/app/view/templates/admin.php @@ -229,6 +229,18 @@ ?> + + +

Databases

diff --git a/app/view/templates/editleftbar.php b/app/view/templates/editleftbar.php index 8302090..a7a8be6 100644 --- a/app/view/templates/editleftbar.php +++ b/app/view/templates/editleftbar.php @@ -43,11 +43,26 @@ ?> -
- - - no-thumbnail -
+ + + + + @@ -98,10 +113,6 @@
- templateoptions()) ? 'checked' : '' ?>> - -
-
templateoptions()) ? 'checked' : '' ?>>
@@ -109,6 +120,10 @@ templateoptions()) ? 'checked' : '' ?>> +
+ templateoptions()) ? 'checked' : '' ?>> + +
templateoptions() as $option) { diff --git a/assets/css/tagcolors.css b/assets/css/tagcolors.css new file mode 100644 index 0000000..97a28d4 --- /dev/null +++ b/assets/css/tagcolors.css @@ -0,0 +1,17 @@ + +.tag_color { background-color: #785ae2; } +.tag_w { background-color: #d660e7; } +.tag_sans { background-color: #a44432; } +.tag_secret { background-color: #f449d8; } +.tag_fiit { background-color: #d5ccfc; } +.tag_salle { background-color: #488d4f; } +.tag_ab { background-color: #6f8934; } +.tag_template { background-color: #85e961; } +.tag_tttaaaaggggeee { background-color: #654760; } +.tag_salle01 { background-color: #57f55c; } +.tag_event { background-color: #d1bc49; } +.tag_delire { background-color: #8c967a; } +.tag_phasme { background-color: #a23e85; } +.tag_animal { background-color: #c85b73; } +.tag_blague { background-color: #6ac3f3; } +.tag_festival { background-color: #67a46c; } \ No newline at end of file -- cgit v1.2.3 From eab190e895124ef643c2b0574c84f3424857eeac Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Thu, 30 Jan 2020 02:46:19 +0100 Subject: default thumbnail fix #49 --- app/class/Controlleradmin.php | 20 +++++++++---------- app/class/Controllerpage.php | 33 ++++++++++++------------------ app/class/Modelmedia.php | 41 ++++++++++++++++++++++++-------------- app/class/Modelrender.php | 8 +++++--- app/class/Page.php | 30 +++++++++++++--------------- app/view/templates/admin.php | 2 +- app/view/templates/edit.php | 2 +- app/view/templates/editleftbar.php | 6 ++++++ assets/css/edit.css | 2 +- assets/css/tagcolors.css | 32 ++++++++++++++--------------- 10 files changed, 93 insertions(+), 83 deletions(-) diff --git a/app/class/Controlleradmin.php b/app/class/Controlleradmin.php index 3935bff..b7d0e31 100644 --- a/app/class/Controlleradmin.php +++ b/app/class/Controlleradmin.php @@ -11,26 +11,26 @@ class Controlleradmin extends Controller public function desktop() { if($this->user->isadmin()) { - $pagelist = $this->pagemanager->list(); + $datas['pagelist'] = $this->pagemanager->list(); $this->mediamanager = new Modelmedia(); - $faviconlist = $this->mediamanager->listfavicon(); - $interfacecsslist = $this->mediamanager->listinterfacecss(); - if(in_array(Config::defaultpage(), $pagelist)) { - $defaultpageexist = true; + $datas['faviconlist'] = $this->mediamanager->listfavicon(); + $datas['thumbnaillist'] = $this->mediamanager->listthumbnail(); + $datas['interfacecsslist'] = $this->mediamanager->listinterfacecss(); + if(in_array(Config::defaultpage(), $datas['pagelist'])) { + $datas['defaultpageexist'] = true; } else { - $defaultpageexist = true; + $datas['defaultpageexist'] = false; } $globalcssfile = Model::GLOBAL_DIR . 'global.css'; if(is_file($globalcssfile)) { - $globalcss = file_get_contents($globalcssfile); + $datas['globalcss'] = file_get_contents($globalcssfile); } else { - $globalcss = ""; + $datas['globalcss'] = ""; } - $admin = ['pagelist' => $pagelist, 'defaultpageexist' => $defaultpageexist, 'globalcss' => $globalcss, 'faviconlist' => $faviconlist, 'interfacecsslist' => $interfacecsslist]; - $this->showtemplate('admin', $admin); + $this->showtemplate('admin', $datas); } else { $this->routedirect('home'); } diff --git a/app/class/Controllerpage.php b/app/class/Controllerpage.php index 75ac6cf..cfab5d3 100644 --- a/app/class/Controllerpage.php +++ b/app/class/Controllerpage.php @@ -174,28 +174,28 @@ class Controllerpage extends Controller if ($this->importpage() && $this->canedit()) { - $tablist = ['main' => $this->page->main(), 'css' => $this->page->css(), 'header' => $this->page->header(), 'nav' => $this->page->nav(), 'aside' => $this->page->aside(), 'footer' => $this->page->footer(), 'body' => $this->page->body(), 'javascript' => $this->page->javascript()]; + $datas['tablist'] = ['main' => $this->page->main(), 'css' => $this->page->css(), 'header' => $this->page->header(), 'nav' => $this->page->nav(), 'aside' => $this->page->aside(), 'footer' => $this->page->footer(), 'body' => $this->page->body(), 'javascript' => $this->page->javascript()]; - $faviconlist = $this->mediamanager->listfavicon(); - $idlist = $this->pagemanager->list(); + $datas['faviconlist'] = $this->mediamanager->listfavicon(); + $datas['thumbnaillist'] = $this->mediamanager->listthumbnail(); + $datas['pagelist'] = $this->pagemanager->list(); $pagelist = $this->pagemanager->getlister(); - $tagpagelist = $this->pagemanager->tagpagelist($this->page->tag('array'), $pagelist); - $lasteditedpagelist = $this->pagemanager->lasteditedpagelist(5, $pagelist); + $datas['tagpagelist'] = $this->pagemanager->tagpagelist($this->page->tag('array'), $pagelist); + $datas['lasteditedpagelist'] = $this->pagemanager->lasteditedpagelist(5, $pagelist); - $editorlist = $this->usermanager->getlisterbylevel(2, '>='); + $datas['editorlist'] = $this->usermanager->getlisterbylevel(2, '>='); if (isset($_SESSION['workspace'])) { - $showleftpanel = $_SESSION['workspace']['showleftpanel']; - $showrightpanel = $_SESSION['workspace']['showrightpanel']; + $datas['showleftpanel'] = $_SESSION['workspace']['showleftpanel']; + $datas['showrightpanel'] = $_SESSION['workspace']['showrightpanel']; } else { - $showleftpanel = false; - $showrightpanel = false; + $datas['showleftpanel'] = false; + $datas['showrightpanel'] = false; } - $fonts = []; - - $this->showtemplate('edit', ['page' => $this->page, 'pageexist' => true, 'tablist' => $tablist, 'pagelist' => $idlist, 'showleftpanel' => $showleftpanel, 'showrightpanel' => $showrightpanel, 'fonts' => $fonts, 'tagpagelist' => $tagpagelist, 'lasteditedpagelist' => $lasteditedpagelist, 'faviconlist' => $faviconlist, 'editorlist' => $editorlist, 'user' => $this->user]); + $datas = array_merge($datas, ['page' => $this->page, 'pageexist' => true, 'user' => $this->user]); + $this->showtemplate('edit', $datas); } else { $this->routedirect('pageread/', ['page' => $this->page->id()]); } @@ -337,13 +337,6 @@ class Controllerpage extends Controller $this->page->addauthor($this->user->id()); $this->page->removeeditby($this->user->id()); - // Add thumbnail image file under 1Mo - If(isset($_FILES)) { - $this->mediamanager->dircheck(Model::THUMBNAIL_DIR); - $this->mediamanager->simpleupload('thumbnail', Model::THUMBNAIL_DIR . $this->page->id(), 1024*1024, ['jpg', 'jpeg', 'JPG', 'JPEG'], true); - } - - $this->pagemanager->update($this->page); $this->routedirect('pageedit', ['page' => $this->page->id()]); diff --git a/app/class/Modelmedia.php b/app/class/Modelmedia.php index 61a2286..567e659 100644 --- a/app/class/Modelmedia.php +++ b/app/class/Modelmedia.php @@ -111,30 +111,41 @@ class Modelmedia extends Model public function listfavicon() { - $extensions = ['ico', 'png', 'jpg', 'jpeg']; - $faviconlist = []; - foreach ($extensions as $extension ) { - $glob = Model::FAVICON_DIR . '*.' . $extension; - $faviconlist = array_merge($faviconlist, glob($glob)); - } - $faviconlist = array_map(function ($input){ - return basename($input); - }, $faviconlist); + $faviconlist = $this->globlist(self::FAVICON_DIR, ['ico', 'png', 'jpg', 'jpeg', 'gif']); + return $faviconlist; + } + + public function listthumbnail() + { + $faviconlist = $this->globlist(self::THUMBNAIL_DIR, ['ico', 'png', 'jpg', 'jpeg', 'gif']); return $faviconlist; } public function listinterfacecss() { - $glob = Model::CSS_DIR . '*.css'; - $listinterfacecss = glob($glob); - $listinterfacecss = array_map(function ($input) { - return basename($input); - }, $listinterfacecss); - $listinterfacecss = array_diff($listinterfacecss, ['edit.css', 'home.css']); + $listinterfacecss = $this->globlist(self::CSS_DIR, ['css']); + $listinterfacecss = array_diff($listinterfacecss, ['edit.css', 'home.css', 'tagcolors.css']); return $listinterfacecss; } + public function globlist (string $dir = '', array $extensions = []) : array + { + $list = []; + if(empty($extensions)) { + $glob = $dir . '*.'; + } else { + foreach ($extensions as $extension ) { + $glob = $dir . '*.' . $extension; + $list = array_merge($list, glob($glob)); + } + } + $list = array_map(function ($input){ + return basename($input); + }, $list); + return $list; + } + /** * Generate an reccursive array where each folder is a array and containing a filecount in each folder diff --git a/app/class/Modelrender.php b/app/class/Modelrender.php index 5a86d0b..b544d21 100644 --- a/app/class/Modelrender.php +++ b/app/class/Modelrender.php @@ -8,7 +8,7 @@ use Michelf\MarkdownExtra; class Modelrender extends Modelpage { protected $router; - /** @var page2 */ + /** @var Page */ protected $page; protected $pagelist; protected $linkfrom = []; @@ -249,8 +249,10 @@ class Modelrender extends Modelpage $head .= '' . PHP_EOL; $head .= '' . PHP_EOL; - if($this->page->thumbnailexist()) { - $head .= '' . PHP_EOL; + if(!empty($this->page->thumbnail())) { + $head .= '' . PHP_EOL; + } elseif(!empty(Config::defaultthumbnail())) { + $head .= '' . PHP_EOL; } $head .= '' . PHP_EOL; diff --git a/app/class/Page.php b/app/class/Page.php index fff98dc..8adf418 100644 --- a/app/class/Page.php +++ b/app/class/Page.php @@ -35,6 +35,7 @@ class Page extends Dbitem protected $templatejavascript; protected $templateoptions; protected $favicon; + protected $thumbnail; protected $authors; protected $invites; protected $readers; @@ -93,6 +94,7 @@ class Page extends Dbitem $this->settemplatejavascript(''); $this->settemplateoptions(['externalcss', 'externaljavascript', 'favicon', 'thumbnail', 'reccursivecss']); $this->setfavicon(''); + $this->setthumbnail(''); $this->setauthors([]); $this->setinvites([]); $this->setreaders([]); @@ -112,22 +114,6 @@ class Page extends Dbitem return ['pagevarlist' => $classvarlist]; } - /** - * Check if page have a thumbnail - * @return bool true if the page have a thumbnail otherwise return false. - */ - public function thumbnailexist() : bool - { - $thumbnaillink = Model::THUMBNAIL_DIR . $this->id . '.jpg'; - - $test = file_exists($thumbnaillink); - - $exist = file_exists(Model::THUMBNAIL_DIR . $this->id . '.jpg'); - - return $exist; - } - - // _____________________________________________________ G E T ____________________________________________________ public function id($type = 'string') @@ -382,6 +368,11 @@ class Page extends Dbitem return $this->favicon; } + public function thumbnail($type = 'string') + { + return $this->thumbnail; + } + public function authors($type = 'array') { if($type == 'string') { @@ -681,6 +672,13 @@ class Page extends Dbitem } } + public function setthumbnail($thumbnail) + { + if (is_string($thumbnail)) { + $this->thumbnail = $thumbnail; + } + } + public function setauthors($authors) { if(is_array($authors)) { diff --git a/app/view/templates/admin.php b/app/view/templates/admin.php index ab71957..57abfcc 100644 --- a/app/view/templates/admin.php +++ b/app/view/templates/admin.php @@ -229,7 +229,7 @@ ?> - + + thumbnail())) { ?> +
+ +
+ + diff --git a/assets/css/edit.css b/assets/css/edit.css index e2c1611..c7fe67b 100644 --- a/assets/css/edit.css +++ b/assets/css/edit.css @@ -365,7 +365,7 @@ a.icon { -div#thumbnail img { +div#showthumbnail img { width: 100%; height: 100%; max-height: 150px; diff --git a/assets/css/tagcolors.css b/assets/css/tagcolors.css index 97a28d4..e0b9727 100644 --- a/assets/css/tagcolors.css +++ b/assets/css/tagcolors.css @@ -1,17 +1,17 @@ -.tag_color { background-color: #785ae2; } -.tag_w { background-color: #d660e7; } -.tag_sans { background-color: #a44432; } -.tag_secret { background-color: #f449d8; } -.tag_fiit { background-color: #d5ccfc; } -.tag_salle { background-color: #488d4f; } -.tag_ab { background-color: #6f8934; } -.tag_template { background-color: #85e961; } -.tag_tttaaaaggggeee { background-color: #654760; } -.tag_salle01 { background-color: #57f55c; } -.tag_event { background-color: #d1bc49; } -.tag_delire { background-color: #8c967a; } -.tag_phasme { background-color: #a23e85; } -.tag_animal { background-color: #c85b73; } -.tag_blague { background-color: #6ac3f3; } -.tag_festival { background-color: #67a46c; } \ No newline at end of file +.tag_color { background-color: #5649df; } +.tag_w { background-color: #9ff567; } +.tag_sans { background-color: #4eacbf; } +.tag_secret { background-color: #50a07e; } +.tag_fiit { background-color: #c9e952; } +.tag_salle { background-color: #3fa0c1; } +.tag_ab { background-color: #aaae52; } +.tag_template { background-color: #b1c46e; } +.tag_tttaaaaggggeee { background-color: #39b885; } +.tag_salle01 { background-color: #b7e36c; } +.tag_event { background-color: #838e9b; } +.tag_delire { background-color: #8646f3; } +.tag_phasme { background-color: #a9be35; } +.tag_animal { background-color: #9e5988; } +.tag_blague { background-color: #6aaa8d; } +.tag_festival { background-color: #c18f57; } \ No newline at end of file -- cgit v1.2.3 From 27f1fb9c19fa2c2fd28863809ccc6ba526499c0d Mon Sep 17 00:00:00 2001 From: vincent-peugnet Date: Thu, 30 Jan 2020 03:32:31 +0100 Subject: thumbnail can be changed in multi edit --- app/class/Controllerhome.php | 2 +- app/view/templates/editleftbar.php | 38 ++++++++++---------------------------- app/view/templates/edittopbar.php | 2 +- app/view/templates/home.php | 2 +- app/view/templates/homemenu.php | 12 +++++++++++- 5 files changed, 24 insertions(+), 32 deletions(-) diff --git a/app/class/Controllerhome.php b/app/class/Controllerhome.php index d102930..02d6c9d 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, '>='), 'colors' => $colors]; + $vars = ['user' => $this->user, 'table2' => $table2, 'opt' => $this->opt, 'columns' => $columns, 'faviconlist' => $this->mediamanager->listfavicon(), 'thumbnaillist' => $this->mediamanager->listthumbnail(), 'editorlist' => $this->usermanager->getlisterbylevel(2, '>='), 'colors' => $colors]; $vars['footer'] = ['version' => getversion(), 'total' => count($table), 'database' => Config::pagetable()]; if (isset($_POST['query']) && $this->user->iseditor()) { diff --git a/app/view/templates/editleftbar.php b/app/view/templates/editleftbar.php index cf30624..3004351 100644 --- a/app/view/templates/editleftbar.php +++ b/app/view/templates/editleftbar.php @@ -52,7 +52,9 @@ --no thumbnail--'; + if(!file_exists(Wcms\Model::thumbnailpath() . $page->thumbnail())) { + echo ''; + } foreach ($thumbnaillist as $thumbnail) { ?> @@ -97,6 +99,11 @@ ?> +
+ templateoptions()) ? 'checked' : '' ?>> + +
+ - - templatecss())) { - ?>
templateoptions()) ? 'checked' : '' ?>> @@ -126,20 +129,7 @@ templateoptions()) ? 'checked' : '' ?>>
-
- templateoptions()) ? 'checked' : '' ?>> - -
- templateoptions() as $option) { - if($option != 'externaljavascript') { - echo ''; - } - } - } - - ?> + @@ -155,20 +145,12 @@ - templatejavascript())) { - ?> +
templateoptions()) ? 'checked' : '' ?>>
- templateoptions())) { - echo ''; - } - - } ?> diff --git a/app/view/templates/edittopbar.php b/app/view/templates/edittopbar.php index 5aa13ba..2eefd0f 100644 --- a/app/view/templates/edittopbar.php +++ b/app/view/templates/edittopbar.php @@ -2,7 +2,7 @@ -
+
diff --git a/app/view/templates/home.php b/app/view/templates/home.php index 3ca4556..fafd87b 100644 --- a/app/view/templates/home.php +++ b/app/view/templates/home.php @@ -16,7 +16,7 @@ insert('homemenu', ['user' => $user, 'opt' => $opt, 'optlist' => $optlist, 'pagelist' => $pagelist, 'faviconlist' => $faviconlist, 'editorlist' => $editorlist, 'colors' => $colors]); + $this->insert('homemenu', ['user' => $user, 'opt' => $opt, 'optlist' => $optlist, 'pagelist' => $pagelist, 'faviconlist' => $faviconlist, 'thumbnaillist' => $thumbnaillist, 'editorlist' => $editorlist, 'colors' => $colors]); ?> diff --git a/app/view/templates/homemenu.php b/app/view/templates/homemenu.php index 51a58e9..e437a4e 100644 --- a/app/view/templates/homemenu.php +++ b/app/view/templates/homemenu.php @@ -76,7 +76,7 @@
- Favicon + Images

+ + +
Templates
- + @@ -79,7 +79,8 @@ Images

+ - +
+ Templates

+
+ '; + } else { + $radio = ''; + } + + echo ''; + echo '' . $radio . ''; + echo ''; + echo '' . $dirlist['dirfilecount'] . ''; + echo ''; + foreach ($dirlist as $key => $value) { + if (is_array($value)) { + basictree($value, $key, $deepness + 1, $path . DIRECTORY_SEPARATOR . $key, $currentdir); + } + } +} + function checkboxes(string $name, array $optionlist = [], array $checkedlist = []) { $checkboxes = ''; @@ -245,6 +278,22 @@ function checkboxes(string $name, array $optionlist = [], array $checkedlist = [ } +function recurse_copy($src,$dst) { + $dir = opendir($src); + mkdir($dst); + while(false !== ( $file = readdir($dir)) ) { + if (( $file != '.' ) && ( $file != '..' )) { + if ( is_dir($src . '/' . $file) ) { + recurse_copy($src . '/' . $file,$dst . '/' . $file); + } + else { + copy($src . '/' . $file,$dst . '/' . $file); + } + } + } + closedir($dir); +} + diff --git a/app/view/templates/admin.php b/app/view/templates/admin.php index 57abfcc..0c9f5af 100644 --- a/app/view/templates/admin.php +++ b/app/view/templates/admin.php @@ -10,37 +10,37 @@
- +
- +

configuration

+
- +

Home page

@@ -51,11 +51,6 @@
-
- form="admin"> - -
-
form="admin"> @@ -66,7 +61,7 @@ + ?> >--use default BODY element-- + ?> @@ -104,7 +99,7 @@ + ?> Alert pages +

Set the style and text to show when a page does not exist, or when a visitor don't have access to it.

+

Common options

@@ -125,7 +122,7 @@ + ?> @@ -183,7 +180,7 @@ You can use body.alert class to specify style.

- +

Render

@@ -222,7 +219,7 @@ + ?> --no thumbnail-- - - + + - - -

Databases

- -

Manage databases

- -

- - - -

- -

-

- - - -
-

- - -

Interface

Set interface Style

@@ -273,7 +244,7 @@ + ?> - +
+
+
+

Databases

+
+ +
+ + + + + + +
usingdatabasespages
+ + + + +
+ +

Duplicate Database

+ +
+ + + + + + + +
+ + +
+
+
+
diff --git a/app/view/templates/backtopbar.php b/app/view/templates/backtopbar.php index c632d66..c1dd361 100644 --- a/app/view/templates/backtopbar.php +++ b/app/view/templates/backtopbar.php @@ -30,10 +30,6 @@ media -> - - font - isadmin()) { ?> @@ -74,10 +70,7 @@ if($user->isadmin()) { -> - - timeline - + > id() ?> diff --git a/assets/css/home.css b/assets/css/home.css index fdf6e5b..1c2edfb 100644 --- a/assets/css/home.css +++ b/assets/css/home.css @@ -242,6 +242,12 @@ main.admin input, main.admin select, main.admin textarea { +main section.admin { + max-width: 400px; +} + + + div.checkbox [type="checkbox"] { display: inline-block; width: auto; -- cgit v1.2.3