summaryrefslogtreecommitdiff
path: root/core/controllers
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2008-12-11 17:20:55 +0000
committerTim Almdal <tnalmdal@shaw.ca>2008-12-11 17:20:55 +0000
commite1f2a5d4e60f431e0a94c998afc026f1136fb26b (patch)
tree76d05837701cbe78a6a2b3a845fd05cf971f4693 /core/controllers
parent773d7024eb57765822e345380be7682ce5f14d17 (diff)
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
Diffstat (limited to 'core/controllers')
-rw-r--r--core/controllers/welcome.php11
1 files changed, 11 insertions, 0 deletions
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);
+ }
}