From e1f2a5d4e60f431e0a94c998afc026f1136fb26b Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Thu, 11 Dec 2008 17:20:55 +0000 Subject: 1) Begins the creation of the local import module by adding the administation component to the scaffolding Actions tab. The importing functionality will follow shortly. 2) Defines a routining pattern for module administration controllers. URI's of the form admin/module/method/parameters gets remapped into module_admin/method/parameters. This will result in the lookup of the the controller Module_Admin_Controller --- core/controllers/welcome.php | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'core/controllers') diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php index dacaa87f..bddca606 100644 --- a/core/controllers/welcome.php +++ b/core/controllers/welcome.php @@ -36,6 +36,11 @@ class Welcome_Controller extends Template_Controller { $this->template->album_tree = $this->_load_album_tree(); $this->template->rearrange_html = new View("rearrange.html"); $this->template->add_photo_html = $this->_get_add_photo_html(); + if (module::is_installed("local_import")) { + $this->template->local_import_html = $this->_get_local_import_html(); + } else { + $this->template->local_import_html = ""; + } } catch (Exception $e) { $this->template->album_count = 0; $this->template->photo_count = 0; @@ -43,6 +48,7 @@ class Welcome_Controller extends Template_Controller { $this->template->album_tree = array(); $this->template->rearrange_html = ""; $this->template->add_photo_html = ""; + $this->template->local_import_html = ""; } $this->_load_user_info(); @@ -513,4 +519,9 @@ class Welcome_Controller extends Template_Controller { $parent = ORM::factory("item", $parent_id); return photo::get_add_form($parent); } + + public function _get_local_import_html($user_name="admin") { + $user = ORM::factory("user")->where("name", $user_name)->find(); + return local_import::get_admin_page($user); + } } -- cgit v1.2.3