From 8eadddfa873c4c0e8f14adc079c18a1f8fb0fa44 Mon Sep 17 00:00:00 2001 From: Tim Almdal Date: Sat, 22 Nov 2008 05:51:15 +0000 Subject: Convert gmaps, info, and tag modules to the new block module --- core/libraries/Theme.php | 9 --------- modules/gmaps/helpers/gmaps.php | 29 --------------------------- modules/gmaps/helpers/gmaps_block.php | 29 +++++++++++++++++++++++++++ modules/gmaps/helpers/gmaps_installer.php | 33 +++++++++++++++++++++++++++++++ modules/info/helpers/info.php | 29 --------------------------- modules/info/helpers/info_block.php | 29 +++++++++++++++++++++++++++ modules/info/helpers/info_installer.php | 33 +++++++++++++++++++++++++++++++ modules/tag/helpers/tag.php | 29 --------------------------- modules/tag/helpers/tag_block.php | 29 +++++++++++++++++++++++++++ modules/tag/helpers/tag_installer.php | 33 +++++++++++++++++++++++++++++++ themes/default/views/sidebar.html.php | 3 --- 11 files changed, 186 insertions(+), 99 deletions(-) delete mode 100644 modules/gmaps/helpers/gmaps.php create mode 100644 modules/gmaps/helpers/gmaps_block.php create mode 100644 modules/gmaps/helpers/gmaps_installer.php delete mode 100644 modules/info/helpers/info.php create mode 100644 modules/info/helpers/info_block.php create mode 100644 modules/info/helpers/info_installer.php delete mode 100644 modules/tag/helpers/tag.php create mode 100644 modules/tag/helpers/tag_block.php create mode 100644 modules/tag/helpers/tag_installer.php diff --git a/core/libraries/Theme.php b/core/libraries/Theme.php index 66d0d640..f95ef569 100644 --- a/core/libraries/Theme.php +++ b/core/libraries/Theme.php @@ -57,13 +57,4 @@ class Theme_Core { return new View("in_place_edit.html"); } - public function blocks() { - /** @todo: make this data driven */ - $blocks = array( - 'tag' => tag::block($this), - 'info' => info::block($this), - 'gmaps' => gmaps::block($this), - ); - return $blocks; - } } diff --git a/modules/gmaps/helpers/gmaps.php b/modules/gmaps/helpers/gmaps.php deleted file mode 100644 index 3257e760..00000000 --- a/modules/gmaps/helpers/gmaps.php +++ /dev/null @@ -1,29 +0,0 @@ -id = "gMaps"; - $block->title = _("Location"); - $block->content = new View("gmaps_block.html"); - return $block; - } -} \ No newline at end of file diff --git a/modules/gmaps/helpers/gmaps_block.php b/modules/gmaps/helpers/gmaps_block.php new file mode 100644 index 00000000..1620e881 --- /dev/null +++ b/modules/gmaps/helpers/gmaps_block.php @@ -0,0 +1,29 @@ +id = "gMaps"; + $block->title = _("Location"); + $block->content = new View("gmaps_block.html"); + return $block; + } +} \ No newline at end of file diff --git a/modules/gmaps/helpers/gmaps_installer.php b/modules/gmaps/helpers/gmaps_installer.php new file mode 100644 index 00000000..8238ec88 --- /dev/null +++ b/modules/gmaps/helpers/gmaps_installer.php @@ -0,0 +1,33 @@ +id = "gMetadata"; - $block->title = _("Item Info"); - $block->content = new View("info_block.html"); - return $block; - } -} \ No newline at end of file diff --git a/modules/info/helpers/info_block.php b/modules/info/helpers/info_block.php new file mode 100644 index 00000000..65b60289 --- /dev/null +++ b/modules/info/helpers/info_block.php @@ -0,0 +1,29 @@ +id = "gMetadata"; + $block->title = _("Item Info"); + $block->content = new View("info_block.html"); + return $block; + } +} \ No newline at end of file diff --git a/modules/info/helpers/info_installer.php b/modules/info/helpers/info_installer.php new file mode 100644 index 00000000..edf55c5d --- /dev/null +++ b/modules/info/helpers/info_installer.php @@ -0,0 +1,33 @@ +id = "gTag"; - $block->title = _("Tags"); - $block->content = new View("tag_block.html"); - return $block; - } -} \ No newline at end of file diff --git a/modules/tag/helpers/tag_block.php b/modules/tag/helpers/tag_block.php new file mode 100644 index 00000000..63486435 --- /dev/null +++ b/modules/tag/helpers/tag_block.php @@ -0,0 +1,29 @@ +id = "gTag"; + $block->title = _("Tags"); + $block->content = new View("tag_block.html"); + return $block; + } +} \ No newline at end of file diff --git a/modules/tag/helpers/tag_installer.php b/modules/tag/helpers/tag_installer.php new file mode 100644 index 00000000..03823ff3 --- /dev/null +++ b/modules/tag/helpers/tag_installer.php @@ -0,0 +1,33 @@ + -blocks() as $block): ?> - - -- cgit v1.2.3