diff options
Diffstat (limited to 'modules/developer/views')
-rw-r--r-- | modules/developer/views/admin_controller.txt.php | 57 | ||||
-rw-r--r-- | modules/developer/views/admin_developer.html.php | 15 | ||||
-rw-r--r-- | modules/developer/views/admin_html.txt.php | 10 | ||||
-rw-r--r-- | modules/developer/views/block.txt.php | 38 | ||||
-rw-r--r-- | modules/developer/views/block_html.txt.php | 10 | ||||
-rw-r--r-- | modules/developer/views/controller.txt.php | 53 | ||||
-rw-r--r-- | modules/developer/views/developer_module.html.php | 49 | ||||
-rw-r--r-- | modules/developer/views/event.txt.php | 96 | ||||
-rw-r--r-- | modules/developer/views/installer.txt.php | 34 | ||||
-rw-r--r-- | modules/developer/views/menu.txt.php | 51 | ||||
-rw-r--r-- | modules/developer/views/module_info.txt.php | 5 | ||||
-rw-r--r-- | modules/developer/views/theme.txt.php | 168 |
12 files changed, 0 insertions, 586 deletions
diff --git a/modules/developer/views/admin_controller.txt.php b/modules/developer/views/admin_controller.txt.php deleted file mode 100644 index 7f741378..00000000 --- a/modules/developer/views/admin_controller.txt.php +++ /dev/null @@ -1,57 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access."); ?> -<?= "<?php defined(\"SYSPATH\") or die(\"No direct script access.\");" ?> -/** - * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2008 Bharat Mediratta - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ -class Admin_<?= $class_name ?>_Controller extends Admin_Controller { - public function index() { - print $this->_get_view(); - } - - public function handler() { - access::verify_csrf(); - - $form = $this->_get_form(); - if ($form->validate()) { - // @todo process the admin form - - message::success(t("<?= $name ?> Adminstration Complete Successfully")); - - url::redirect("admin/<?= $module ?>"); - } - - print $this->_get_view($form); - } - - 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_form() { - $form = new Forge("admin/<?= $module ?>/handler", "", "post", - array("id" => "gAdminForm")); - $group = $form->group("group"); - $group->input("text")->label(t("Text"))->rules("required"); - $group->submit("submit")->value(t("Submit")); - - return $form; - } -}
\ No newline at end of file diff --git a/modules/developer/views/admin_developer.html.php b/modules/developer/views/admin_developer.html.php deleted file mode 100644 index eeebaa03..00000000 --- a/modules/developer/views/admin_developer.html.php +++ /dev/null @@ -1,15 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<?= html::script("modules/developer/js/developer.js") ?> -<div id="gDeveloper"> - <h2> - <?= t("Developer Tools") ?> - </h2> - <div id="gDeveloperTools"> - <ul> - <li><a href="#create-module"><span><?= t("Create new module") ?></span></a></li> - </ul> - <div id="#create-module"> - <?= $module_create ?> - </div> - </div> -</div> diff --git a/modules/developer/views/admin_html.txt.php b/modules/developer/views/admin_html.txt.php deleted file mode 100644 index 5408cdab..00000000 --- a/modules/developer/views/admin_html.txt.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<?= "<?php defined(\"SYSPATH\") or die(\"No direct script access.\") ?>" ?> - -<div id="gAdmin<?= $css_id ?>"> - <h2> - <?= "<?= t(\"$name Adminstration\") ?>" ?> - </h2> - <?= "<?= \$form ?>" ?> - -</div> diff --git a/modules/developer/views/block.txt.php b/modules/developer/views/block.txt.php deleted file mode 100644 index 56c0bf8c..00000000 --- a/modules/developer/views/block.txt.php +++ /dev/null @@ -1,38 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access."); ?> -<?= "<?php defined(\"SYSPATH\") or die(\"No direct script access.\");" ?> -/** - * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2008 Bharat Mediratta - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ -class <?= $module ?>_block { - static function get($block_id) { - $block = new Block(); - if ($block_id == "<?= $module ?>") { - $block->css_id = "g<?= $css_id ?>Admin"; - $block->title = t("<?= $module ?> Dashboard Block"); - $block->content = new View("<?= $module ?>block.html"); - - $block->content->item = ORM::factory("item", 1); - } - return $block; - } - - static function get_list() { - return array( - "<?= $module ?>" => t("<?= $name ?> Dashboard Block")); - } -} diff --git a/modules/developer/views/block_html.txt.php b/modules/developer/views/block_html.txt.php deleted file mode 100644 index b0e07a1a..00000000 --- a/modules/developer/views/block_html.txt.php +++ /dev/null @@ -1,10 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<?= "<?php defined(\"SYSPATH\") or die(\"No direct script access.\") ?>" ?> - -<div class="g<?= $css_id ?>Block"> - <?= "<a href=\"<?= \$item->url() ?>\">" ?> - - <?= "<?= \$item->thumb_tag(array(\"class\" => \"gThumbnail\")) ?>" ?> - - </a> -</div> diff --git a/modules/developer/views/controller.txt.php b/modules/developer/views/controller.txt.php deleted file mode 100644 index b11fa5f3..00000000 --- a/modules/developer/views/controller.txt.php +++ /dev/null @@ -1,53 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access."); ?> -<?= "<?php defined(\"SYSPATH\") or die(\"No direct script access.\");" ?> -/** - * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2008 Bharat Mediratta - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ -class <?= $class_name ?>_Controller extends Controller { - public function index() { - print $this->_get_form(); - } - - public function handler() { - access::verify_csrf(); - - $form = $this->_get_form(); - if ($form->validate()) { - // @todo process the admin form - - message::success(t("<?= $name ?> Processing Successfully")); - - print json_encode( - array("result" => "success")); - } else { - print json_encode( - array("result" => "error", - "form" => $form->__toString())); - } - } - - private function _get_form() { - $form = new Forge("<?= $module ?>/handler", "", "post", - array("id" => "g<?= $css_id ?>Form")); - $group = $form->group("group")->label(t("<?= $name ?> Handler")); - $group->input("text")->label(t("Text"))->rules("required"); - $group->submit("submit")->value(t("Submit")); - - return $form; - } -}
\ No newline at end of file diff --git a/modules/developer/views/developer_module.html.php b/modules/developer/views/developer_module.html.php deleted file mode 100644 index 4ce28ff7..00000000 --- a/modules/developer/views/developer_module.html.php +++ /dev/null @@ -1,49 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access.") ?> -<script> -$("#gModuleCreateForm").ready(function() { - ajaxify_developer_form("#gModuleCreateForm form", module_success); -}); - -</script> -<div id="gModuleCreateForm"> - <?= form::open($action, array("method" => "post"), $hidden) ?> - <ul> - <li <? if (!empty($errors["name"])): ?> class="gError"<? endif ?>> - <?= form::label("name", t("Name")) ?> - <?= form::input("name", $form["name"]) ?> - <? if (!empty($errors["name"]) && $errors["name"] == "required"): ?> - <p class="gError"><?= t("Module name is required") ?></p> - <? endif ?> - <? if (!empty($errors["name"]) && $errors["name"] == "module_exists"): ?> - <p class="gError"><?= t("Module is already implemented") ?></p> - <? endif ?> - </li> - <li <? if (!empty($errors["description"])): ?> class="gError"<? endif ?>> - <?= form::label("description", t("Description")) ?> - <?= form::input("description", $form["description"]) ?> - <? if (!empty($errors["description"]) && $errors["description"] == "required"): ?> - <p class="gError"><?= t("Module description is required")?></p> - <? endif ?> - </li> - <li> - <ul> - <li> - <?= form::label("theme[]", t("Theme Callbacks")) ?> - <?= form::dropdown(array("name" => "theme[]", "multiple" => true, "size" => 6), $theme, $form["theme[]"]) ?> - </li> - <li> - <?= form::label("menu[]", t("Menu Callback")) ?> - <?= form::dropdown(array("name" => "menu[]", "multiple" => true, "size" => 6), $menu, $form["menu[]"]) ?> - </li> - <li> - <?= form::label("event[]", t("Gallery Event Handlers")) ?> - <?= form::dropdown(array("name" => "event[]", "multiple" => true, "size" => 6), $event, $form["event[]"]) ?> - </li> - </ul> - </li> - <li> - <?= form::submit(array("id" => "gGenerateModule", "name" => "generate", "class" => "submit"), t("Generate")) ?> - </li> - </ul> - <?= form::close() ?> -</div> diff --git a/modules/developer/views/event.txt.php b/modules/developer/views/event.txt.php deleted file mode 100644 index e2731f96..00000000 --- a/modules/developer/views/event.txt.php +++ /dev/null @@ -1,96 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access."); ?> -<?= "<?php defined(\"SYSPATH\") or die(\"No direct script access.\");" ?> -/** - * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2008 Bharat Mediratta - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ -class <?= $module ?>_event { -<? if (!empty($callbacks["batch_complete"])): ?> - static function batch_complete() { - } - -<? endif ?> -<? if (!empty($callbacks["comment_add_form"])): ?> - static function comment_add_form($form) { - } - -<? endif ?> -<? if (!empty($callbacks["comment_created"])): ?> - static function comment_created($theme, $args) { - } - -<? endif ?> -<? if (!empty($callbacks["comment_updated"])): ?> - static function comment_updated($old, $new) { - } - -<? endif ?> -<? if (!empty($callbacks["group_before_delete"])): ?> - static function group_before_delete($group) { - } - -<? endif ?> -<? if (!empty($callbacks["group_created"])): ?> - static function group_created($group) { - } - -<? endif ?> -<? if (!empty($callbacks["item_before_delete"])): ?> - static function item_before_delete($item) { - } - -<? endif ?> -<? if (!empty($callbacks["item_created"])): ?> - static function item_created($item) { - } - -<? endif ?> -<? if (!empty($callbacks["item_related_update"])): ?> - static function item_related_update($item) { - } - -<? endif ?> -<? if (!empty($callbacks["item_related_update_batch"])): ?> - static function item_related_update_batch($sql) { - } - -<? endif ?> -<? if (!empty($callbacks["item_updated"])): ?> - static function item_updated($old, $new) { - } - -<? endif ?> -<? if (!empty($callbacks["user_before_delete"])): ?> - static function user_before_delete($user) { - } - -<? endif ?> -<? if (!empty($callbacks["user_created"])): ?> - static function user_created($user) { - } - -<? endif ?> -<? if (!empty($callbacks["user_login"])): ?> - static function user_login($user) { - } - -<? endif ?> -<? if (!empty($callbacks["user_logout"])): ?> - static function user_logout($user) { - } -<? endif ?> -} diff --git a/modules/developer/views/installer.txt.php b/modules/developer/views/installer.txt.php deleted file mode 100644 index 1ccc3327..00000000 --- a/modules/developer/views/installer.txt.php +++ /dev/null @@ -1,34 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access."); ?> -<?= "<?php defined(\"SYSPATH\") or die(\"No direct script access.\");" ?> -/** - * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2008 Bharat Mediratta - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ -class <?= $module ?>_installer { - static function install() { - $version = module::get_version("<?= $module ?>"); - if ($version == 0) { - /* @todo Put database creation here */ - module::set_version("<?= $module ?>", 1); - } - } - - static function uninstall() { - /* @todo Put database table drops here */ - module::delete("<?= $module ?>"); - } -} diff --git a/modules/developer/views/menu.txt.php b/modules/developer/views/menu.txt.php deleted file mode 100644 index dd315972..00000000 --- a/modules/developer/views/menu.txt.php +++ /dev/null @@ -1,51 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access."); ?> -<?= "<?php defined(\"SYSPATH\") or die(\"No direct script access.\");" ?> -/** - * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2008 Bharat Mediratta - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ -class <?= $module ?>_menu { - static function admin($menu, $theme) { - $menu->get("settings_menu") - ->append(Menu::factory("link") - ->id("<?= $module ?>_menu") - ->label(t("<?= $module_name ?> Administration")) - ->url(url::site("admin/<?= $module ?>"))); - } - -<? if (!empty($callbacks["album"])): ?> - static function album($menu, $theme) { - } - -<? endif ?> -<? if (!empty($callbacks["photo"])): ?> - static function photo($menu, $theme) { - } - -<? endif ?> - static function site($menu, $theme) { - $item = $theme->item(); - - if ($item && access::can("edit", $item)) { - $options_menu = $menu->get("options_menu") - ->append(Menu::factory("dialog") - ->id("<?= $module ?>") - ->label(t("Peform <?= $module_name ?> Processing")) - ->url(url::site("<?= $module ?>/index/$item->id"))); - } - } -} diff --git a/modules/developer/views/module_info.txt.php b/modules/developer/views/module_info.txt.php deleted file mode 100644 index 4c4b4280..00000000 --- a/modules/developer/views/module_info.txt.php +++ /dev/null @@ -1,5 +0,0 @@ -name = <?= $module_name ?> - -description = <?= $module_description ?> - -version = 1 diff --git a/modules/developer/views/theme.txt.php b/modules/developer/views/theme.txt.php deleted file mode 100644 index 339a7553..00000000 --- a/modules/developer/views/theme.txt.php +++ /dev/null @@ -1,168 +0,0 @@ -<?php defined("SYSPATH") or die("No direct script access."); ?> -<?= "<?php defined(\"SYSPATH\") or die(\"No direct script access.\");" ?> -/** - * Gallery - a web based photo album viewer and editor - * Copyright (C) 2000-2008 Bharat Mediratta - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or (at - * your option) any later version. - * - * This program is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. - */ -class <?= $module ?>_theme { - static function sidebar_blocks($theme) { - $block = new Block(); - $block->css_id = "g<?= $css_id ?>"; - $block->title = t("<?= $name ?>"); - $block->content = new View("<?= $module ?>_block.html"); - - $block->content->item = ORM::factory("item", 1); - - return $block; - } - -<? if (!empty($callbacks["album_blocks"])): ?> - static function album_blocks($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["album_bottom"])): ?> - static function album_bottom($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["album_top"])): ?> - static function album_top($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["admin_credits"])): ?> - static function admin_credits($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["photo"])): ?> - static function admin_footer($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["admin_header_top"])): ?> - static function admin_header_top($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["admin_header_bottom"])): ?> - static function admin_header_bottom($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["admin_page_bottom"])): ?> - static function admin_page_bottom($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["admin_page_top"])): ?> - static function admin_page_top($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["admin_head"])): ?> - static function admin_head($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["credits"])): ?> - static function credits($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["dynamic_bottom"])): ?> - static function dynamic_bottom($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["dynamic_top"])): ?> - static function dynamic_top($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["footer"])): ?> - static function footer($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["head"])): ?> - static function head($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["header_bottom"])): ?> - static function header_bottom($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["header_top"])): ?> - static function header_top($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["page_bottom"])): ?> - static function page_bottom($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["pae_top"])): ?> - static function page_top($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["photo_blocks"])): ?> - static function photo_blocks($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["photo_bottom"])): ?> - static function photo_bottom($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["photo_top"])): ?> - static function photo_top($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["sidebar_bottom"])): ?> - static function sidebar_bottom($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["sidebar_top"])): ?> - static function sidebar_top($theme) { - } - -<? endif ?> -<? if (!empty($callbacks["thumb_bottom"])): ?> - static function thumb_bottom($theme, $child) { - } - -<? endif ?> -<? if (!empty($callbacks["thumb_info"])): ?> - static function thumb_info($theme, $child) { - } - -<? endif ?> -<? if (!empty($callbacks["thumb_top"])): ?> - static function thumb_top($theme, $child) { - } - -<? endif ?> -} |