From 7c5ba9d4229a6e3c258f6a80769e70c5dcd68578 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 15 Mar 2009 05:15:45 +0000 Subject: Refactored the developer module. When a new module is generated a skeleton adminstration page is generated as well. @todo is still generate a skeleton block and a skeleton dialog. --- modules/developer/views/admin_controller.txt.php | 60 ++++++++ modules/developer/views/admin_html.txt.php | 10 ++ modules/developer/views/block.txt.php | 26 ++++ modules/developer/views/developer_module.html.php | 6 +- modules/developer/views/event.txt.php | 96 +++++++++++++ modules/developer/views/installer.txt.php | 9 +- modules/developer/views/menu.txt.php | 42 ++++++ modules/developer/views/theme.txt.php | 163 ++++++++++++++++++++++ 8 files changed, 403 insertions(+), 9 deletions(-) create mode 100644 modules/developer/views/admin_controller.txt.php create mode 100644 modules/developer/views/admin_html.txt.php create mode 100644 modules/developer/views/block.txt.php create mode 100644 modules/developer/views/event.txt.php create mode 100644 modules/developer/views/menu.txt.php create mode 100644 modules/developer/views/theme.txt.php (limited to 'modules/developer/views') diff --git a/modules/developer/views/admin_controller.txt.php b/modules/developer/views/admin_controller.txt.php new file mode 100644 index 00000000..42b5ff38 --- /dev/null +++ b/modules/developer/views/admin_controller.txt.php @@ -0,0 +1,60 @@ + + +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2008 Bharat Mediratta + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class Admin__Controller extends Admin_Controller { + public function index() { + $view = new Admin_View("admin.html"); + $view->content = new View("admin_.html"); + $view->content->form = $this->_get_admin_form(); + + print $view; + } + + public function handler() { + access::verify_csrf(); + + $form = $this->_get_admin_form(); + if ($form->validate()) { + // @todo process the admin form + + message::success(t(" Adminstration Complete Successfully")); + + url::redirect("admin/"); + } + $view = new Admin_View("admin.html"); + $view->content = new View("admin_.html"); + $view->content->form = $form; + + print $view; + } + + private function _get_admin_view($form=null) { + } + + private function _get_admin_form() { + $form = new Forge("admin//handler", "", "post", + array("id" => "gAdminForm")); + $group = $form->group("group"); + $group->input("text")->label(t("Text"))->rules("required"); + $group->submit("submit")->value(t("Submit")); + + return $form; + } +} \ No newline at end of file diff --git a/modules/developer/views/admin_html.txt.php b/modules/developer/views/admin_html.txt.php new file mode 100644 index 00000000..34b699d7 --- /dev/null +++ b/modules/developer/views/admin_html.txt.php @@ -0,0 +1,10 @@ + +" ?> + +
+

+ " ?> +

+ " ?> + +
diff --git a/modules/developer/views/block.txt.php b/modules/developer/views/block.txt.php new file mode 100644 index 00000000..b8a96da0 --- /dev/null +++ b/modules/developer/views/block.txt.php @@ -0,0 +1,26 @@ + + +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2008 Bharat Mediratta + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class _block { + static function get($block_id) { + } + static function get_list() { + } +} diff --git a/modules/developer/views/developer_module.html.php b/modules/developer/views/developer_module.html.php index d572ecfb..4ce28ff7 100644 --- a/modules/developer/views/developer_module.html.php +++ b/modules/developer/views/developer_module.html.php @@ -31,13 +31,9 @@ $("#gModuleCreateForm").ready(function() { "theme[]", "multiple" => true, "size" => 6), $theme, $form["theme[]"]) ?> -
  • - - "block[]", "multiple" => true, "size" => 6), $block, $form["block[]"]) ?> -
  • - "menu[]", "multiple" => true, "size" => 6), $menu, $form["block[]"]) ?> + "menu[]", "multiple" => true, "size" => 6), $menu, $form["menu[]"]) ?>
  • diff --git a/modules/developer/views/event.txt.php b/modules/developer/views/event.txt.php new file mode 100644 index 00000000..e2731f96 --- /dev/null +++ b/modules/developer/views/event.txt.php @@ -0,0 +1,96 @@ + + +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2008 Bharat Mediratta + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class _event { + + static function batch_complete() { + } + + + + static function comment_add_form($form) { + } + + + + static function comment_created($theme, $args) { + } + + + + static function comment_updated($old, $new) { + } + + + + static function group_before_delete($group) { + } + + + + static function group_created($group) { + } + + + + static function item_before_delete($item) { + } + + + + static function item_created($item) { + } + + + + static function item_related_update($item) { + } + + + + static function item_related_update_batch($sql) { + } + + + + static function item_updated($old, $new) { + } + + + + static function user_before_delete($user) { + } + + + + static function user_created($user) { + } + + + + static function user_login($user) { + } + + + + static function user_logout($user) { + } + +} diff --git a/modules/developer/views/installer.txt.php b/modules/developer/views/installer.txt.php index 81d6d795..1ccc3327 100644 --- a/modules/developer/views/installer.txt.php +++ b/modules/developer/views/installer.txt.php @@ -18,16 +18,17 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ -class _installer { +class _installer { static function install() { - $version = module::get_version(""); + $version = module::get_version(""); if ($version == 0) { /* @todo Put database creation here */ - module::set_version("", 1); + module::set_version("", 1); } } static function uninstall() { - module::delete(""); + /* @todo Put database table drops here */ + module::delete(""); } } diff --git a/modules/developer/views/menu.txt.php b/modules/developer/views/menu.txt.php new file mode 100644 index 00000000..5404f6c5 --- /dev/null +++ b/modules/developer/views/menu.txt.php @@ -0,0 +1,42 @@ + + +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2008 Bharat Mediratta + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class _menu { + static function admin($menu, $theme) { + $menu->get("settings_menu") + ->append(Menu::factory("link") + ->id("_menu") + ->label(t(" Administration")) + ->url(url::site("admin/"))); + } + + + static function album($menu, $theme) { + } + + + + static function photo($menu, $theme) { + } + + + static function site($menu, $theme) { + } +} diff --git a/modules/developer/views/theme.txt.php b/modules/developer/views/theme.txt.php new file mode 100644 index 00000000..df7b18e0 --- /dev/null +++ b/modules/developer/views/theme.txt.php @@ -0,0 +1,163 @@ + + +/** + * Gallery - a web based photo album viewer and editor + * Copyright (C) 2000-2008 Bharat Mediratta + * + * 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 2 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, write to the Free Software + * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. + */ +class _theme { + + + static function album_blocks() { + } + + + + static function album_bottom() { + } + + + + static function album_top() { + } + + + + static function admin_credits() { + } + + + + static function admin_footer() { + } + + + + static function admin_header_top() { + } + + + + static function admin_header_bottom() { + } + + + + static function admin_page_bottom() { + } + + + + static function admin_page_top() { + } + + + + static function admin_head() { + } + + + + static function credits() { + } + + + + static function dynamic_bottom() { + } + + + + static function dynamic_top() { + } + + + + static function footer() { + } + + + + static function head() { + } + + + + static function header_bottom() { + } + + + + static function header_top() { + } + + + + static function page_bottom() { + } + + + + static function page_top() { + } + + + + static function photo_blocks() { + } + + + + static function photo_bottom() { + } + + + + static function photo_top() { + } + + + + static function sidebar_blocks() { + } + + + + static function sidebar_bottom() { + } + + + + static function sidebar_top() { + } + + + + static function thumb_bottom($child) { + } + + + + static function thumb_info($child) { + } + + + + static function thumb_top($child) { + } + + +} -- cgit v1.2.3