summaryrefslogtreecommitdiff
path: root/themes
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2009-01-12 08:26:38 +0000
committerBharat Mediratta <bharat@menalto.com>2009-01-12 08:26:38 +0000
commitbc421a615ab89cf5416af12173471235cdf5d297 (patch)
treea4318a7c649423e2a4a23327ba8aa1fa183397eb /themes
parentce6d7b8d3799cf5996a7c4fd512bf4efb85d1c5b (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 'themes')
-rw-r--r--themes/admin_default/views/block.html.php7
-rw-r--r--themes/default/views/block.html.php2
2 files changed, 5 insertions, 4 deletions
diff --git a/themes/admin_default/views/block.html.php b/themes/admin_default/views/block.html.php
index 7f14353a..b92675e3 100644
--- a/themes/admin_default/views/block.html.php
+++ b/themes/admin_default/views/block.html.php
@@ -1,8 +1,9 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="<?= $id ?>" class="gBlock ui-widget-dialog">
+<div id="<?= $css_id ?>" class="gBlock ui-widget-dialog">
<div class="ui-dialog-titlebar ui-widget-header">
- <a href="#" class="ui-dialog-titlebar-close">
- <span class="ui-icon ui-icon-closethick">close</span>
+ <a href="<?= url::site("admin/dashboard/remove_block/$id?csrf=" . access::csrf_token()) ?>"
+ class="ui-dialog-titlebar-close">
+ <span class="ui-icon ui-icon-closethick">remove</span>
</a>
<?= $title ?>
</div>
diff --git a/themes/default/views/block.html.php b/themes/default/views/block.html.php
index 42d09196..a2357ab6 100644
--- a/themes/default/views/block.html.php
+++ b/themes/default/views/block.html.php
@@ -1,5 +1,5 @@
<?php defined("SYSPATH") or die("No direct script access.") ?>
-<div id="<?= $id ?>" class="gBlock">
+<div id="<?= $css_id ?>" class="gBlock">
<h2><?= $title ?></h2>
<div class="gBlockContent">
<?= $content ?>