From 6ac6c6a7e0824d8fda81e36240818f9b7e9c4696 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sun, 15 Mar 2009 19:27:30 +0000 Subject: 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. --- modules/developer/views/admin_controller.txt.php | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) (limited to 'modules/developer/views/admin_controller.txt.php') 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__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; + 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__Controller extends Admin_Controller { url::redirect("admin/"); } - $view = new Admin_View("admin.html"); - $view->content = new View("admin_.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_.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//handler", "", "post", array("id" => "gAdminForm")); $group = $form->group("group"); -- cgit v1.2.3