From 8ec0e8471f424ead77a335277d86706c4b6d3add Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 18 Jan 2009 09:06:46 +0000 Subject: 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 --- core/helpers/core_block.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'core/helpers/core_block.php') 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 -- cgit v1.2.3