summaryrefslogtreecommitdiff
path: root/modules/block
diff options
context:
space:
mode:
authorAngie Byron <webchick@24967.no-reply.drupal.org>2010-07-31 12:54:59 +0000
committerAngie Byron <webchick@24967.no-reply.drupal.org>2010-07-31 12:54:59 +0000
commit9588a5b38b2e607c8c3253a56585eedc80481d2b (patch)
tree0e02421b4a15c97caa8493366db8523ed4f626dc /modules/block
parentf8dea099d7dab1585ad23debf923695f07b33af6 (diff)
downloadbrdo-9588a5b38b2e607c8c3253a56585eedc80481d2b.tar.gz
brdo-9588a5b38b2e607c8c3253a56585eedc80481d2b.tar.bz2
#655416 by casey, yoroy, BTMash, Bojhan, Gábor Hojtsy, sun, ksenzee, oseldman, jrguitar21, et al: 'Demonstrate block preview' should not open in the overlay, and should reflect the regions in the front-end theme.
Diffstat (limited to 'modules/block')
-rw-r--r--modules/block/block.css19
-rw-r--r--modules/block/block.module21
2 files changed, 40 insertions, 0 deletions
diff --git a/modules/block/block.css b/modules/block/block.css
index 56ba1c560..1f543d92a 100644
--- a/modules/block/block.css
+++ b/modules/block/block.css
@@ -16,3 +16,22 @@
margin-bottom: 4px;
padding: 3px;
}
+a.block-demo-backlink,
+a.block-demo-backlink:link,
+a.block-demo-backlink:visited {
+ background-color: #B4D7F0;
+ border-radius: 0 0 10px 10px;
+ -moz-border-radius: 0 0 10px 10px;
+ -webkit-border-radius: 0 0 10px 10px;
+ color: #000;
+ font-family: "Lucida Grande", Verdana, sans-serif;
+ font-size: small;
+ line-height: 20px;
+ left: 20px; /*LTR*/
+ padding: 5px 10px;
+ position: fixed;
+ z-index: 499;
+}
+a.block-demo-backlink:hover {
+ text-decoration: underline;
+}
diff --git a/modules/block/block.module b/modules/block/block.module
index 1dc32f6af..bfca75590 100644
--- a/modules/block/block.module
+++ b/modules/block/block.module
@@ -294,6 +294,15 @@ function block_page_build(&$page) {
'#weight' => 15,
);
}
+ $page['page_top']['backlink'] = array(
+ '#type' => 'link',
+ '#title' => t('Exit block region demonstration'),
+ '#href' => 'admin/structure/block/list' . (variable_get('theme_default', 'garland') == $theme ? '' : '/' . $theme),
+ // Add the "overlay-restore" class to indicate this link should restore
+ // the context in which the region demonstration page was opened.
+ '#options' => array('attributes' => array('class' => array('block-demo-backlink', 'overlay-restore'))),
+ '#weight' => -10,
+ );
}
}
}
@@ -981,6 +990,18 @@ function block_form_system_performance_settings_alter(&$form, &$form_state) {
}
/**
+ * Implements hook_admin_paths().
+ */
+function block_admin_paths() {
+ $paths = array(
+ // Exclude the block demonstration page from admin (overlay) treatment.
+ // This allows us to present this page in its true form, full page.
+ 'admin/structure/block/demo/*' => FALSE,
+ );
+ return $paths;
+}
+
+/**
* Implements hook_modules_uninstalled().
*
* Cleanup {block} and {block_role} tables from modules' blocks.