diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-01-18 09:06:46 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-01-18 09:06:46 +0000 |
commit | 8ec0e8471f424ead77a335277d86706c4b6d3add (patch) | |
tree | 10ed731ec427af0982f2007ccdaeecdc685d06db /core/helpers/core_block.php | |
parent | 9380e306f4e40da8f6d9a4e9cbe7231b7738ed60 (diff) |
Drag and drop in the admin dashboard now saves the location.
* Make block_adder a real block
* Suppress the "close" link on block_adder
* Move the drag/drop JS into the core code out of the admin theme
Diffstat (limited to 'core/helpers/core_block.php')
-rw-r--r-- | core/helpers/core_block.php | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/core/helpers/core_block.php b/core/helpers/core_block.php index 74b81d52..bfc55f09 100644 --- a/core/helpers/core_block.php +++ b/core/helpers/core_block.php @@ -72,8 +72,22 @@ class core_block_Core { $block->content = new View("admin_block_news.html"); $block->content->feed = feed::parse("http://gallery.menalto.com/node/feed", 3); break; + + case "block_adder": + $block->css_id = "gBlockAdder"; + $block->title = t("Dashboard Content"); + $block->content = self::get_add_block_form(); } return $block; } + + public function get_add_block_form() { + $form = new Forge("admin/dashboard/add_block", "", "post"); + $group = $form->group("add_block")->label(t("Add Block")); + $group->dropdown("id")->label("Available Blocks")->options(block_manager::get_available()); + $group->submit("center")->value(t("Add to center")); + $group->submit("sidebar")->value(t("Add to sidebar")); + return $form; + } }
\ No newline at end of file |