From c74735801be83c191086933c218a217daa7e1cd3 Mon Sep 17 00:00:00 2001 From: 1stthomas Date: Mon, 24 May 2021 03:42:17 +0200 Subject: [PATCH] #2 fix page architecture --- controllers/single_page/dashboard/ht7.php | 5 --- .../dashboard/ht7/{settings => }/blocks.php | 7 +---- .../dashboard/ht7/environment/packages.php | 30 ------------------ .../single_page/dashboard/ht7/ht7_servers.php | 25 --------------- .../ht7/{environment.php => servers.php} | 7 +---- .../single_page/dashboard/ht7/settings.php | 25 --------------- .../lists/child_pages_simple.php} | 10 +++--- install.xml | 7 ++--- single_pages/dashboard/ht7.php | 31 +++++++++++-------- .../ht7/{ht7_servers.php => blocks.php} | 0 single_pages/dashboard/ht7/environment.php | 6 ---- .../dashboard/ht7/environment/packages.php | 6 ---- .../ht7/{settings.php => servers.php} | 0 13 files changed, 27 insertions(+), 132 deletions(-) rename controllers/single_page/dashboard/ht7/{settings => }/blocks.php (75%) delete mode 100644 controllers/single_page/dashboard/ht7/environment/packages.php delete mode 100644 controllers/single_page/dashboard/ht7/ht7_servers.php rename controllers/single_page/dashboard/ht7/{environment.php => servers.php} (69%) delete mode 100644 controllers/single_page/dashboard/ht7/settings.php rename elements/{lists/parent_pages_simple.php => dashboard/lists/child_pages_simple.php} (72%) rename single_pages/dashboard/ht7/{ht7_servers.php => blocks.php} (100%) delete mode 100644 single_pages/dashboard/ht7/environment.php delete mode 100644 single_pages/dashboard/ht7/environment/packages.php rename single_pages/dashboard/ht7/{settings.php => servers.php} (100%) diff --git a/controllers/single_page/dashboard/ht7.php b/controllers/single_page/dashboard/ht7.php index 969d1e7..ed8a3e2 100644 --- a/controllers/single_page/dashboard/ht7.php +++ b/controllers/single_page/dashboard/ht7.php @@ -10,11 +10,6 @@ class Ht7 extends DashboardPageController { - public function getCollectionDescription() - { - return t("Ht7 Starting Page"); - } - public function view() { $c = Page::getCurrentPage(); diff --git a/controllers/single_page/dashboard/ht7/settings/blocks.php b/controllers/single_page/dashboard/ht7/blocks.php similarity index 75% rename from controllers/single_page/dashboard/ht7/settings/blocks.php rename to controllers/single_page/dashboard/ht7/blocks.php index 626e3d1..acccab3 100644 --- a/controllers/single_page/dashboard/ht7/settings/blocks.php +++ b/controllers/single_page/dashboard/ht7/blocks.php @@ -1,6 +1,6 @@ getCollectionChildren(); - $this->set('pages', $pages); - } - -} diff --git a/controllers/single_page/dashboard/ht7/ht7_servers.php b/controllers/single_page/dashboard/ht7/ht7_servers.php deleted file mode 100644 index 5f18acc..0000000 --- a/controllers/single_page/dashboard/ht7/ht7_servers.php +++ /dev/null @@ -1,25 +0,0 @@ -getCollectionChildren(); - $this->set('pages', $pages); - } - -} diff --git a/controllers/single_page/dashboard/ht7/environment.php b/controllers/single_page/dashboard/ht7/servers.php similarity index 69% rename from controllers/single_page/dashboard/ht7/environment.php rename to controllers/single_page/dashboard/ht7/servers.php index 347d640..639cd33 100644 --- a/controllers/single_page/dashboard/ht7/environment.php +++ b/controllers/single_page/dashboard/ht7/servers.php @@ -7,14 +7,9 @@ defined('C5_EXECUTE') or die('Access Denied.'); -class Environment extends DashboardPageController +class Servers extends DashboardPageController { - public function getCollectionDescription() - { - return t("Default Settings Page for Ht7 Tools."); - } - public function view() { $c = Page::getCurrentPage(); diff --git a/controllers/single_page/dashboard/ht7/settings.php b/controllers/single_page/dashboard/ht7/settings.php deleted file mode 100644 index f4eb133..0000000 --- a/controllers/single_page/dashboard/ht7/settings.php +++ /dev/null @@ -1,25 +0,0 @@ -getCollectionChildren(); - $this->set('pages', $pages); - } - -} diff --git a/elements/lists/parent_pages_simple.php b/elements/dashboard/lists/child_pages_simple.php similarity index 72% rename from elements/lists/parent_pages_simple.php rename to elements/dashboard/lists/child_pages_simple.php index b8fbf1a..33d581e 100644 --- a/elements/lists/parent_pages_simple.php +++ b/elements/dashboard/lists/child_pages_simple.php @@ -2,8 +2,8 @@ defined('C5_EXECUTE') or die('Access Denied.'); ?>
- - + +

getCollectionName(); ?>

- - + +

- +
\ No newline at end of file diff --git a/install.xml b/install.xml index 9f0b3ed..7b9e7fa 100644 --- a/install.xml +++ b/install.xml @@ -2,10 +2,7 @@ - - - - - + + diff --git a/single_pages/dashboard/ht7.php b/single_pages/dashboard/ht7.php index fb19a38..2f67560 100644 --- a/single_pages/dashboard/ht7.php +++ b/single_pages/dashboard/ht7.php @@ -3,27 +3,32 @@ ?>
- $page): ?> - + $page) { ?> +
- +
-

getCollectionName(); ?>

+

+ getCollectionName(); ?> +

getCollectionChildren(); - if (count($children) > 0): + + if (count($children) > 0) { ?> - +

- - getCollectionName(); ?> + + getCollectionName(); ?>

- - -

- + + +

+
- +
\ No newline at end of file diff --git a/single_pages/dashboard/ht7/ht7_servers.php b/single_pages/dashboard/ht7/blocks.php similarity index 100% rename from single_pages/dashboard/ht7/ht7_servers.php rename to single_pages/dashboard/ht7/blocks.php diff --git a/single_pages/dashboard/ht7/environment.php b/single_pages/dashboard/ht7/environment.php deleted file mode 100644 index cae6db2..0000000 --- a/single_pages/dashboard/ht7/environment.php +++ /dev/null @@ -1,6 +0,0 @@ - $pages], 'ht7_c5_base'); - diff --git a/single_pages/dashboard/ht7/environment/packages.php b/single_pages/dashboard/ht7/environment/packages.php deleted file mode 100644 index cae6db2..0000000 --- a/single_pages/dashboard/ht7/environment/packages.php +++ /dev/null @@ -1,6 +0,0 @@ - $pages], 'ht7_c5_base'); - diff --git a/single_pages/dashboard/ht7/settings.php b/single_pages/dashboard/ht7/servers.php similarity index 100% rename from single_pages/dashboard/ht7/settings.php rename to single_pages/dashboard/ht7/servers.php