From 2ebe1e7f0770bb32099ef4dc01135b9339f16b11 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Roland=20H=C3=A4der?= Date: Mon, 27 Oct 2008 18:08:54 +0000 Subject: [PATCH] Base idea for handling multiple applications in admin area introduced --- .gitattributes | 9 +++ application/admin/admin/.htaccess | 1 + application/admin/main/actions/.htaccess | 1 + application/admin/main/actions/web/.htaccess | 1 + .../web/class_WebAdminLoginWelcomeAction.php | 74 +++++++++++++++++++ .../de/code/action_admin_login_welcome.ctp | 4 + application/blog/admin/.htaccess | 1 + application/selector/admin/.htaccess | 1 + application/ship-simu/admin/.htaccess | 1 + .../main/actions/web/class_WebShipSimuLogin | 2 +- application/shoutbox/admin/.htaccess | 1 + application/todo/admin/.htaccess | 1 + 12 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 application/admin/admin/.htaccess create mode 100644 application/admin/main/actions/.htaccess create mode 100644 application/admin/main/actions/web/.htaccess create mode 100644 application/admin/main/actions/web/class_WebAdminLoginWelcomeAction.php create mode 100644 application/blog/admin/.htaccess create mode 100644 application/selector/admin/.htaccess create mode 100644 application/ship-simu/admin/.htaccess create mode 100644 application/shoutbox/admin/.htaccess create mode 100644 application/todo/admin/.htaccess diff --git a/.gitattributes b/.gitattributes index 6621d2a..acf6931 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2,6 +2,7 @@ /Doxyfile -text application/.htaccess -text application/admin/.htaccess -text +application/admin/admin/.htaccess -text application/admin/class_ApplicationHelper.php -text application/admin/config.php -text application/admin/data.php -text @@ -12,6 +13,9 @@ application/admin/init.php -text application/admin/interfaces/.htaccess -text application/admin/loader.php -text application/admin/main/.htaccess -text +application/admin/main/actions/.htaccess -text +application/admin/main/actions/web/.htaccess -text +application/admin/main/actions/web/class_WebAdminLoginWelcomeAction.php -text application/admin/main/class_ -text application/admin/main/commands/.htaccess -text application/admin/main/commands/web/.htaccess -text @@ -52,6 +56,7 @@ application/admin/templates/images/de/image/.htaccess -text application/admin/templates/images/de/image/base_code.itp -text application/admin/templates/images/de/image/code_captcha.itp -text application/blog/.htaccess -text +application/blog/admin/.htaccess -text application/blog/class_ApplicationHelper.php -text application/blog/config.php -text application/blog/data.php -text @@ -95,6 +100,7 @@ application/blog/templates/images/de/image/.htaccess -text application/blog/templates/images/de/image/base_code.itp -text application/blog/templates/images/de/image/code_captcha.itp -text application/selector/.htaccess -text +application/selector/admin/.htaccess -text application/selector/class_ApplicationHelper.php -text application/selector/class_ApplicationSelector.php -text application/selector/config.php -text @@ -110,6 +116,7 @@ application/selector/templates/de/code/.htaccess -text application/selector/templates/de/code/selector_apps.ctp -text application/selector/templates/de/code/selector_main.ctp -text application/ship-simu/.htaccess -text +application/ship-simu/admin/.htaccess -text application/ship-simu/class_ApplicationHelper.php -text application/ship-simu/config.php -text application/ship-simu/data.php -text @@ -287,6 +294,7 @@ application/ship-simu/templates/images/de/image/.htaccess -text application/ship-simu/templates/images/de/image/base_code.itp -text application/ship-simu/templates/images/de/image/code_captcha.itp -text application/shoutbox/.htaccess -text +application/shoutbox/admin/.htaccess -text application/shoutbox/class_ApplicationHelper.php -text application/shoutbox/config.php -text application/shoutbox/data.php -text @@ -330,6 +338,7 @@ application/shoutbox/templates/images/de/image/.htaccess -text application/shoutbox/templates/images/de/image/base_code.itp -text application/shoutbox/templates/images/de/image/code_captcha.itp -text application/todo/.htaccess -text +application/todo/admin/.htaccess -text application/todo/class_ApplicationHelper.php -text application/todo/config.php -text application/todo/data.php -text diff --git a/application/admin/admin/.htaccess b/application/admin/admin/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/admin/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/main/actions/.htaccess b/application/admin/main/actions/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/main/actions/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/main/actions/web/.htaccess b/application/admin/main/actions/web/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/admin/main/actions/web/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/admin/main/actions/web/class_WebAdminLoginWelcomeAction.php b/application/admin/main/actions/web/class_WebAdminLoginWelcomeAction.php new file mode 100644 index 0000000..a5e545f --- /dev/null +++ b/application/admin/main/actions/web/class_WebAdminLoginWelcomeAction.php @@ -0,0 +1,74 @@ + + * @version 0.0.0 + * @copyright Copyright (c) 2007, 2008 Roland Haeder, this is free software + * @license GNU GPL 3.0 or any newer version + * @link http://www.ship-simu.org + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ +class WebAdminLoginWelcomeAction extends BaseAction implements PerformableAction, Registerable { + /** + * Protected constructor + * + * @return void + */ + protected function __construct () { + // Call parent constructor + parent::__construct(__CLASS__); + } + + /** + * Creates an instance of this action + * + * @return $actionInstance An instance of this action class + */ + public final static function createWebAdminLoginWelcomeAction () { + // Get a new instance + $actionInstance = new WebAdminLoginWelcomeAction(); + + // Return the instance + return $actionInstance; + } + + /** + * Executes the command with given request and response objects + * + * @param $requestInstance An instance of a class with an Requestable interface + * @param $responseInstance An instance of a class with an Responseable interface + * @return void + * @todo Maybe we need to do something later here + */ + public function execute (Requestable $requestInstance, Responseable $responseInstance) { + $this->partialStub("Unfinished part."); + } + + /** + * Adds extra filters to the given controller instance + * + * @param $controllerInstance A controller instance + * @param $requestInstance An instance of a class with an Requestable interface + * @return void + * @todo 0% done + */ + public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { + $this->partialStub("Need to add filters which looks for applications with admin directory."); + } +} + +// [EOF] +?> diff --git a/application/admin/templates/de/code/action_admin_login_welcome.ctp b/application/admin/templates/de/code/action_admin_login_welcome.ctp index 749b239..c1e0574 100644 --- a/application/admin/templates/de/code/action_admin_login_welcome.ctp +++ b/application/admin/templates/de/code/action_admin_login_welcome.ctp @@ -1,3 +1,7 @@ +
+ {?admin_app_list?} +
+
{?admin_overview?}
diff --git a/application/blog/admin/.htaccess b/application/blog/admin/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/blog/admin/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/selector/admin/.htaccess b/application/selector/admin/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/selector/admin/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/ship-simu/admin/.htaccess b/application/ship-simu/admin/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/ship-simu/admin/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/ship-simu/main/actions/web/class_WebShipSimuLogin b/application/ship-simu/main/actions/web/class_WebShipSimuLogin index b2959ff..f6cb95e 100644 --- a/application/ship-simu/main/actions/web/class_WebShipSimuLogin +++ b/application/ship-simu/main/actions/web/class_WebShipSimuLogin @@ -70,7 +70,7 @@ class WebShipSimuLogin???Action extends BaseAction implements Commandable, Regis */ public function addExtraFilters (Controller $controllerInstance, Requestable $requestInstance) { // Add user status filter here - $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_class')); + $controllerInstance->addPreFilter(ObjectFactory::createObjectByConfiguredName('user_status_filter')); } } diff --git a/application/shoutbox/admin/.htaccess b/application/shoutbox/admin/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/shoutbox/admin/.htaccess @@ -0,0 +1 @@ +Deny from all diff --git a/application/todo/admin/.htaccess b/application/todo/admin/.htaccess new file mode 100644 index 0000000..3a42882 --- /dev/null +++ b/application/todo/admin/.htaccess @@ -0,0 +1 @@ +Deny from all -- 2.30.2