From 93eb8b341392b5a04488d0d3a0a9d8136da6a2cf Mon Sep 17 00:00:00 2001 From: Angie Byron Date: Mon, 5 Oct 2009 02:43:01 +0000 Subject: #60552 by JohnAlbin: Added Add region.tpl.php for all regions in themes. --- modules/block/block-admin-display-form.tpl.php | 4 ++-- modules/block/block.css | 2 +- modules/block/block.test | 14 +++++------ modules/system/page.tpl.php | 20 ++++------------ modules/system/region.tpl.php | 32 ++++++++++++++++++++++++++ modules/system/system.module | 13 ++++++++++- 6 files changed, 59 insertions(+), 26 deletions(-) create mode 100644 modules/system/region.tpl.php (limited to 'modules') diff --git a/modules/block/block-admin-display-form.tpl.php b/modules/block/block-admin-display-form.tpl.php index 5195f4af1..f7c9b1cf6 100644 --- a/modules/block/block-admin-display-form.tpl.php +++ b/modules/block/block-admin-display-form.tpl.php @@ -45,8 +45,8 @@ $title): ?> - - + + diff --git a/modules/block/block.css b/modules/block/block.css index 3d579ee6c..56ba1c560 100644 --- a/modules/block/block.css +++ b/modules/block/block.css @@ -1,6 +1,6 @@ /* $Id$ */ -#blocks td.region { +#blocks tr.region-title td { font-weight: bold; } #blocks tr.region-message { diff --git a/modules/block/block.test b/modules/block/block.test index 085d5c36a..02b774ca8 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -26,10 +26,10 @@ class BlockTestCase extends DrupalWebTestCase { // Define the existing regions $this->regions = array(); - $this->regions[] = array('name' => 'header', 'id' => 'header-region'); - $this->regions[] = array('name' => 'sidebar_first', 'id' => 'sidebar-first'); - $this->regions[] = array('name' => 'content', 'id' => 'center'); - $this->regions[] = array('name' => 'sidebar_second', 'id' => 'sidebar-second'); + $this->regions[] = array('name' => 'header', 'class' => 'region region-header clearfix'); + $this->regions[] = array('name' => 'sidebar_first'); + $this->regions[] = array('name' => 'content'); + $this->regions[] = array('name' => 'sidebar_second'); $this->regions[] = array('name' => 'footer'); } @@ -193,8 +193,8 @@ class BlockTestCase extends DrupalWebTestCase { function moveBlockToRegion($block, $region) { // If an id for an region hasn't been specified, we assume it's the same as the name. - if (!(isset($region['id']))) { - $region['id'] = $region['name']; + if (!(isset($region['class']))) { + $region['class'] = 'region region-' . str_replace('_', '-', $region['name']); } // Set the created block to a specific region. @@ -209,7 +209,7 @@ class BlockTestCase extends DrupalWebTestCase { $this->assertText(t($block['title']), t('Block successfully being displayed on the page.')); // Confirm that the custom block was found at the proper region. - $xpath = '//div[@id="' . $region['id'] . '"]//div[@id="block-' . $block['module'] . '-' . $block['delta'] . '"]/*'; + $xpath = '//div[@class="' . $region['class'] . '"]//div[@id="block-' . $block['module'] . '-' . $block['delta'] . '"]/*'; $this->assertFieldByXPath($xpath, FALSE, t('Custom block found in %region_name region.', array('%region_name' => $region['name']))); } } diff --git a/modules/system/page.tpl.php b/modules/system/page.tpl.php index 417a18c3f..c7c0d5526 100644 --- a/modules/system/page.tpl.php +++ b/modules/system/page.tpl.php @@ -86,11 +86,7 @@ - -
- -
- + @@ -114,20 +110,18 @@
-
- -
+ -