diff options
author | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-14 19:43:04 +0000 |
---|---|---|
committer | Tim Almdal <tnalmdal@shaw.ca> | 2008-12-14 19:43:04 +0000 |
commit | 4b4e9e8e45465012805854dd322431f87f2b09c7 (patch) | |
tree | f275761db2763a19e0db16894a516357f73fa2a2 /core | |
parent | 7fa014ae61b7463632e67923b745a6de07dd3f20 (diff) |
The start of the watermark module. It doesn't save the watermark at this point. This is more of trying out the approach where Forge is not used for forms. Basic html and the Validation library.
Diffstat (limited to 'core')
-rw-r--r-- | core/controllers/welcome.php | 13 | ||||
-rw-r--r-- | core/views/welcome.html.php | 3 |
2 files changed, 13 insertions, 3 deletions
diff --git a/core/controllers/welcome.php b/core/controllers/welcome.php index cff39fd1..3b00a1b8 100644 --- a/core/controllers/welcome.php +++ b/core/controllers/welcome.php @@ -35,12 +35,20 @@ class Welcome_Controller extends Template_Controller { ->where("type", "photo")->orderby("level", "desc")->find(); $this->template->album_tree = $this->_load_album_tree(); $this->template->add_photo_html = $this->_get_add_photo_html(); + if (module::is_installed("watermark")) { +// $this->template->add_watermark_html = $this->_get_add_watermark_html(); + $this->template->add_watermark_html = new View("watermark_add_form.html"); + $this->template->add_watermark_html->fields = array("file" => ""); + } else { + $this->template->add_watermark_html = ""; + } } catch (Exception $e) { $this->template->album_count = 0; $this->template->photo_count = 0; $this->template->deepest_photo = null; $this->template->album_tree = array(); $this->template->add_photo_html = ""; + $this->template->add_watermark_html = ""; } $this->_load_user_info(); @@ -507,8 +515,7 @@ class Welcome_Controller extends Template_Controller { 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); + public function _get_add_watermark_html() { + return watermark::get_watermark_form(); } } diff --git a/core/views/welcome.html.php b/core/views/welcome.html.php index 7b132231..075a485a 100644 --- a/core/views/welcome.html.php +++ b/core/views/welcome.html.php @@ -284,6 +284,9 @@ <?= new View("rearrange.html") ?> </fieldset> <? endif ?> + <? if (module::is_installed("watermark")): ?> + <?= $add_watermark_html ?> + <? endif ?> </div> <? if (module::is_installed("user")): ?> |