diff --git a/includes/theme.inc b/includes/theme.inc index d91386166cc..15795e68bfc 100644 --- a/includes/theme.inc +++ b/includes/theme.inc @@ -1898,11 +1898,11 @@ function template_preprocess_page(&$variables) { // Set up layout variable. $variables['layout'] = 'none'; - if (!empty($variables['page']['left'])) { - $variables['layout'] = 'left'; + if (!empty($variables['page']['sidebar_first'])) { + $variables['layout'] = 'first'; } - if (!empty($variables['page']['right'])) { - $variables['layout'] = ($variables['layout'] == 'left') ? 'both' : 'right'; + if (!empty($variables['page']['sidebar_second'])) { + $variables['layout'] = ($variables['layout'] == 'first') ? 'both' : 'second'; } // Construct page title diff --git a/includes/theme.maintenance.inc b/includes/theme.maintenance.inc index 291b927c558..2dacf27ab82 100644 --- a/includes/theme.maintenance.inc +++ b/includes/theme.maintenance.inc @@ -238,11 +238,11 @@ function template_preprocess_maintenance_page(&$variables) { // Setup layout variable. $variables['layout'] = 'none'; - if (!empty($variables['left'])) { - $variables['layout'] = 'left'; + if (!empty($variables['sidebar_first'])) { + $variables['layout'] = 'first'; } - if (!empty($variables['right'])) { - $variables['layout'] = ($variables['layout'] == 'left') ? 'both' : 'right'; + if (!empty($variables['sidebar_second'])) { + $variables['layout'] = ($variables['layout'] == 'first') ? 'both' : 'second'; } // Construct page title diff --git a/modules/block/block.module b/modules/block/block.module index 6566324653f..2f139a6146e 100644 --- a/modules/block/block.module +++ b/modules/block/block.module @@ -241,8 +241,8 @@ function block_page_alter($page) { // Load all region content assigned via blocks. foreach (array_keys($all_regions) as $region) { - // Prevent left and right regions from rendering blocks when 'show_blocks' == FALSE. - if (!empty($page['#show_blocks']) || ($region != 'left' && $region != 'right')) { + // Prevent sidebar regions from rendering blocks when 'show_blocks' == FALSE. + if (!empty($page['#show_blocks']) || (strpos($region, 'sidebar_') !== 0)) { // Assign blocks to region. if ($blocks = block_get_blocks_by_region($region)) { $page[$region] = $blocks; diff --git a/modules/block/block.test b/modules/block/block.test index ca2d771e4a8..e5217d3f9a0 100644 --- a/modules/block/block.test +++ b/modules/block/block.test @@ -27,9 +27,9 @@ class BlockTestCase extends DrupalWebTestCase { // Define the existing regions $this->regions = array(); $this->regions[] = array('name' => 'header', 'id' => 'header-region'); - $this->regions[] = array('name' => 'left', 'id' => 'sidebar-left'); + $this->regions[] = array('name' => 'sidebar_first', 'id' => 'sidebar-first'); $this->regions[] = array('name' => 'content', 'id' => 'center'); - $this->regions[] = array('name' => 'right', 'id' => 'sidebar-right'); + $this->regions[] = array('name' => 'sidebar_second', 'id' => 'sidebar-second'); $this->regions[] = array('name' => 'footer'); } @@ -80,7 +80,7 @@ class BlockTestCase extends DrupalWebTestCase { // Set the created box to a specific region. $bid = db_query("SELECT bid FROM {box} WHERE info = :info", array(':info' => $box['info']))->fetchField(); $edit = array(); - $edit['block_' . $bid . '[region]'] = 'left'; + $edit['block_' . $bid . '[region]'] = $this->regions[1]['name']; $this->drupalPost('admin/structure/block', $edit, t('Save blocks')); // Confirm that the box is being displayed using configured text format. @@ -115,7 +115,7 @@ class BlockTestCase extends DrupalWebTestCase { $edit['roles[2]'] = TRUE; $this->drupalPost('admin/structure/block/configure/' . $block['module'] . '/' . $block['delta'], $edit, t('Save block')); - // Move block to the left sidebar. + // Move block to the first sidebar. $this->moveBlockToRegion($block, $this->regions[1]); $this->drupalGet(''); @@ -171,9 +171,9 @@ class BlockTestCase extends DrupalWebTestCase { // For convenience of developers, put the navigation block back. $edit = array(); - $edit[$block['module'] . '_' . $block['delta'] . '[region]'] = 'left'; + $edit[$block['module'] . '_' . $block['delta'] . '[region]'] = $this->regions[1]['name']; $this->drupalPost('admin/structure/block', $edit, t('Save blocks')); - $this->assertText(t('The block settings have been updated.'), t('Block successfully move to left region.')); + $this->assertText(t('The block settings have been updated.'), t('Block successfully move to first sidebar region.')); $this->drupalPost('admin/structure/block/configure/' . $block['module'] . '/' . $block['delta'], array('title' => 'Navigation'), t('Save block')); $this->assertText(t('The block configuration has been saved.'), t('Block title set.')); @@ -262,7 +262,7 @@ class NewDefaultThemeBlocks extends DrupalWebTestCase { $result = db_query("SELECT * FROM {block} WHERE theme='stark'"); foreach ($result as $block) { unset($block->theme, $block->bid); - $this->assertEqual($blocks[$block->module][$block->delta], $block, t('Block matched')); + $this->assertEqual($blocks[$block->module][$block->delta], $block, t('Block %name matched', array('%name' => $block->module . '-' . $block->delta))); } } } diff --git a/modules/blog/blog.test b/modules/blog/blog.test index 70a43ea3f2a..fea8d6edb16 100644 --- a/modules/blog/blog.test +++ b/modules/blog/blog.test @@ -62,7 +62,7 @@ class BlogTestCase extends DrupalWebTestCase { $this->drupalLogin($this->big_user); // Enable the recent blog block. $edit = array(); - $edit['blog_recent[region]'] = 'right'; + $edit['blog_recent[region]'] = 'sidebar_second'; $this->drupalPost('admin/structure/block', $edit, t('Save blocks')); $this->assertResponse(200); diff --git a/modules/comment/comment.test b/modules/comment/comment.test index d5de02a28f6..588d7ae82fd 100644 --- a/modules/comment/comment.test +++ b/modules/comment/comment.test @@ -651,10 +651,10 @@ class CommentBlockFunctionalTest extends CommentHelperCase { // Set the block to a region to confirm block is available. $edit = array( - 'comment_recent[region]' => 'left', + 'comment_recent[region]' => 'sidebar_first', ); $this->drupalPost('admin/structure/block', $edit, t('Save blocks')); - $this->assertText(t('The block settings have been updated.'), t('Block saved to left region.')); + $this->assertText(t('The block settings have been updated.'), t('Block saved to first sidebar region.')); // Set block title and variables. $block = array( diff --git a/modules/forum/forum.test b/modules/forum/forum.test index 9abfc5f23a4..f3137edac4e 100644 --- a/modules/forum/forum.test +++ b/modules/forum/forum.test @@ -76,14 +76,14 @@ class ForumTestCase extends DrupalWebTestCase { // Enable the active forum block. $edit = array(); - $edit['forum_active[region]'] = 'right'; + $edit['forum_active[region]'] = 'sidebar_second'; $this->drupalPost('admin/structure/block', $edit, t('Save blocks')); $this->assertResponse(200); $this->assertText(t('The block settings have been updated.'), t('[Active forum topics] Forum block was enabled')); // Enable the new forum block. $edit = array(); - $edit['forum_new[region]'] = 'right'; + $edit['forum_new[region]'] = 'sidebar_second'; $this->drupalPost('admin/structure/block', $edit, t('Save blocks')); $this->assertResponse(200); $this->assertText(t('The block settings have been updated.'), t('[New forum topics] Forum block was enabled')); diff --git a/modules/locale/locale.test b/modules/locale/locale.test index 57605f1a5cf..3138348a5db 100644 --- a/modules/locale/locale.test +++ b/modules/locale/locale.test @@ -1055,7 +1055,7 @@ class LanguageSwitchingFunctionalTest extends DrupalWebTestCase { function testLanguageBlock() { // Enable the language switching block. $edit = array( - 'locale_language-switcher[region]' => 'left', + 'locale_language-switcher[region]' => 'sidebar_first', ); $this->drupalPost('admin/structure/block', $edit, t('Save blocks')); diff --git a/modules/menu/menu.test b/modules/menu/menu.test index afb1a2405ec..6161843a0f5 100644 --- a/modules/menu/menu.test +++ b/modules/menu/menu.test @@ -125,7 +125,7 @@ class MenuTestCase extends DrupalWebTestCase { // Enable the custom menu block. $menu_name = 'menu-' . $menu_name; // Drupal prepends the name with 'menu-'. $edit = array(); - $edit['menu_' . $menu_name . '[region]'] = 'left'; + $edit['menu_' . $menu_name . '[region]'] = 'sidebar_first'; $this->drupalPost('admin/structure/block', $edit, t('Save blocks')); $this->assertResponse(200); $this->assertText(t('The block settings have been updated.'), t('Custom menu block was enabled')); diff --git a/modules/system/admin-rtl.css b/modules/system/admin-rtl.css index 08f12acd723..f9420333a48 100644 --- a/modules/system/admin-rtl.css +++ b/modules/system/admin-rtl.css @@ -4,6 +4,17 @@ div.admin-panel .body { padding: 0 8px 2px 4px; } +div.admin .left { + float: right; + margin-left: 0; + margin-right: 1em; +} +div.admin .right { + float: left; + margin-left: 1em; + margin-right: 0; +} + div.admin .expert-link { text-align: left; margin-right: 0; diff --git a/modules/system/admin.css b/modules/system/admin.css index e37c696448a..0f11126e55e 100644 --- a/modules/system/admin.css +++ b/modules/system/admin.css @@ -22,14 +22,14 @@ div.admin { } div.admin .left { - float: left; + float: left; /* LTR */ width: 47%; - margin-left: 1em; + margin-left: 1em; /* LTR */ } div.admin .right { - float: right; + float: right; /* LTR */ width: 47%; - margin-right: 1em; + margin-right: 1em; /* LTR */ } div.admin .expert-link { diff --git a/modules/system/maintenance-page.tpl.php b/modules/system/maintenance-page.tpl.php index e411afd11a5..cd4127927ec 100644 --- a/modules/system/maintenance-page.tpl.php +++ b/modules/system/maintenance-page.tpl.php @@ -57,10 +57,10 @@