diff options
| author | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-15 19:27:30 +0000 |
|---|---|---|
| committer | Tim Almdal <tnalmdal@shaw.ca> | 2009-03-15 19:27:30 +0000 |
| commit | 6ac6c6a7e0824d8fda81e36240818f9b7e9c4696 (patch) | |
| tree | a5ad572c446667f8ab5fef3d2e0c6b63043344c2 /modules/developer/views/admin_controller.txt.php | |
| parent | 7c5ba9d4229a6e3c258f6a80769e70c5dcd68578 (diff) | |
Updates to the developer tool create module.
It now creates a fully functional sidebar block, a dialog pop up on
the option menu for albums or photos, a dashboard block and an admin
screen.
Diffstat (limited to 'modules/developer/views/admin_controller.txt.php')
| -rw-r--r-- | modules/developer/views/admin_controller.txt.php | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/modules/developer/views/admin_controller.txt.php b/modules/developer/views/admin_controller.txt.php index 42b5ff38..7f741378 100644 --- a/modules/developer/views/admin_controller.txt.php +++ b/modules/developer/views/admin_controller.txt.php @@ -20,17 +20,13 @@ */ class Admin_<?= $class_name ?>_Controller extends Admin_Controller { public function index() { - $view = new Admin_View("admin.html"); - $view->content = new View("admin_<?=$module ?>.html"); - $view->content->form = $this->_get_admin_form(); - - print $view; + print $this->_get_view(); } public function handler() { access::verify_csrf(); - $form = $this->_get_admin_form(); + $form = $this->_get_form(); if ($form->validate()) { // @todo process the admin form @@ -38,17 +34,18 @@ class Admin_<?= $class_name ?>_Controller extends Admin_Controller { url::redirect("admin/<?= $module ?>"); } - $view = new Admin_View("admin.html"); - $view->content = new View("admin_<?=$module ?>.html"); - $view->content->form = $form; - print $view; + print $this->_get_view($form); } - private function _get_admin_view($form=null) { + private function _get_view($form=null) { + $v = new Admin_View("admin.html"); + $v->content = new View("admin_<?=$module ?>.html"); + $v->content->form = empty($form) ? $this->_get_form() : $form; + return $v; } - private function _get_admin_form() { + private function _get_form() { $form = new Forge("admin/<?= $module ?>/handler", "", "post", array("id" => "gAdminForm")); $group = $form->group("group"); |
