diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-01-12 08:26:38 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-01-12 08:26:38 +0000 |
commit | bc421a615ab89cf5416af12173471235cdf5d297 (patch) | |
tree | a4318a7c649423e2a4a23327ba8aa1fa183397eb /core/helpers/core_dashboard.php | |
parent | ce6d7b8d3799cf5996a7c4fd512bf4efb85d1c5b (diff) |
Implement deleting dashboard blocks.
* Refactor blocks so that they have a separate id vs css_id. This way
we can have a unique identifier for each visual block.
* Store blocks with a random id as their unique identifier
* Add Admin_Dashboard::remove_block() and modify
themes/admin_default/views/block.html.php to call it when you click the
remove box.
Diffstat (limited to 'core/helpers/core_dashboard.php')
-rw-r--r-- | core/helpers/core_dashboard.php | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/core/helpers/core_dashboard.php b/core/helpers/core_dashboard.php index d27ed01b..2e017351 100644 --- a/core/helpers/core_dashboard.php +++ b/core/helpers/core_dashboard.php @@ -32,13 +32,13 @@ class core_dashboard_Core { $block = new Block(); switch($block_id) { case "welcome": - $block->id = "gWelcome"; + $block->css_id = "gWelcome"; $block->title = t("Welcome to Gallery3"); $block->content = new View("admin_block_welcome.html"); break; case "photo_stream": - $block->id = "gPhotoStream"; + $block->css_id = "gPhotoStream"; $block->title = t("Photo Stream"); $block->content = new View("admin_block_photo_stream.html"); $block->content->photos = @@ -46,14 +46,14 @@ class core_dashboard_Core { break; case "log_entries": - $block->id = "gLogEntries"; + $block->css_id = "gLogEntries"; $block->title = t("Log Entries"); $block->content = new View("admin_block_log_entries.html"); $block->content->entries = ORM::factory("log")->orderby("timestamp", "desc")->find_all(5); break; case "stats": - $block->id = "gStats"; + $block->css_id = "gStats"; $block->title = t("Gallery Stats"); $block->content = new View("admin_block_stats.html"); $block->content->album_count = ORM::factory("item")->where("type", "album")->count_all(); @@ -61,13 +61,13 @@ class core_dashboard_Core { break; case "platform_info": - $block->id = "gPlatform"; + $block->css_id = "gPlatform"; $block->title = t("Platform Information"); $block->content = new View("admin_block_platform.html"); break; case "project_news": - $block->id = "gProjectNews"; + $block->css_id = "gProjectNews"; $block->title = t("Gallery Project News"); $block->content = new View("admin_block_news.html"); $block->content->feed = feed::parse("http://gallery.menalto.com/node/feed", 3); |