diff --git modules/block/block.module modules/block/block.module index e45c8d2..1860fea 100644 --- modules/block/block.module +++ modules/block/block.module @@ -63,8 +63,8 @@ function block_help($path, $arg) { case 'admin/structure/block/add': return '

' . t('Use this page to create a new custom block.') . '

'; } - if ($arg[0] == 'admin' && $arg[1] == 'structure' && $arg['2'] == 'block' && (empty($arg[3]) || $arg[3] == 'list')) { - $demo_theme = !empty($arg[4]) ? $arg[4] : variable_get('theme_default', 'bartik'); + if ($arg[0] == 'admin' && $arg[1] == 'structure' && $arg['2'] == 'block' && $arg[3] != 'demo') { + $demo_theme = !empty($arg[3]) ? $arg[3] : variable_get('theme_default', 'bartik'); $themes = list_themes(); $output = '

' . t('This page provides a drag-and-drop interface for assigning a block to a region, and for controlling the order of blocks within regions. Since not all themes implement the same regions, or display regions in the same way, blocks are positioned on a per-theme basis. Remember that your changes will not be saved until you click the Save blocks button at the bottom of the page. Click the configure link next to each block to configure its specific title and visibility settings.') . '

'; $output .= '

' . l(t('Demonstrate block regions (@theme)', array('@theme' => $themes[$demo_theme]->info['name'])), 'admin/structure/block/demo/' . $demo_theme) . '

'; @@ -113,11 +113,6 @@ function block_menu() { 'access arguments' => array('administer blocks'), 'file' => 'block.admin.inc', ); - $items['admin/structure/block/list'] = array( - 'title' => 'List', - 'type' => MENU_DEFAULT_LOCAL_TASK, - 'weight' => -10, - ); $items['admin/structure/block/manage/%/%'] = array( 'title' => 'Configure block', 'page callback' => 'drupal_get_form', @@ -148,7 +143,7 @@ function block_menu() { 'file' => 'block.admin.inc', ); foreach (list_themes() as $key => $theme) { - $items['admin/structure/block/list/' . $key] = array( + $items['admin/structure/block/' . $key] = array( 'title' => check_plain($theme->info['name']), 'page arguments' => array($key), 'type' => $key == $default_theme ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK, @@ -158,7 +153,7 @@ function block_menu() { 'file' => 'block.admin.inc', ); if ($key != $default_theme) { - $items['admin/structure/block/list/' . $key . '/add'] = array( + $items['admin/structure/block/' . $key . '/add'] = array( 'title' => 'Add block', 'page callback' => 'drupal_get_form', 'page arguments' => array('block_add_block_form'), @@ -297,7 +292,7 @@ function block_page_build(&$page) { $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), + '#href' => 'admin/structure/block' . (variable_get('theme_default', 'bartik') == $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'))), diff --git modules/block/block.test modules/block/block.test index db8a257..9622ab1 100644 --- modules/block/block.test +++ modules/block/block.test @@ -47,8 +47,8 @@ class BlockTestCase extends DrupalWebTestCase { // Confirm that the add block link appears on block overview pages. $this->drupalGet('admin/structure/block'); $this->assertRaw(l('Add block', 'admin/structure/block/add'), t('Add block link is present on block overview page for default theme.')); - $this->drupalGet('admin/structure/block/list/seven'); - $this->assertRaw(l('Add block', 'admin/structure/block/list/seven/add'), t('Add block link is present on block overview page for non-default theme.')); + $this->drupalGet('admin/structure/block/seven'); + $this->assertRaw(l('Add block', 'admin/structure/block/seven/add'), t('Add block link is present on block overview page for non-default theme.')); // Confirm that hidden regions are not shown as options for block placement // when adding a new block. @@ -297,7 +297,7 @@ class NonDefaultBlockAdmin extends DrupalWebTestCase { $admin_user = $this->drupalCreateUser(array('administer blocks', 'administer themes')); $this->drupalLogin($admin_user); theme_enable(array('stark')); - $this->drupalGet('admin/structure/block/list/stark'); + $this->drupalGet('admin/structure/block/stark'); } } @@ -372,13 +372,13 @@ class BlockAdminThemeTestCase extends DrupalWebTestCase { $this->drupalLogin($admin_user); // Ensure that access to block admin page is denied when theme is disabled. - $this->drupalGet('admin/structure/block/list/stark'); + $this->drupalGet('admin/structure/block/stark'); $this->assertResponse(403, t('The block admin page for a disabled theme can not be accessed')); // Enable admin theme and confirm that tab is accessible. $edit['admin_theme'] = 'stark'; $this->drupalPost('admin/appearance', $edit, t('Save configuration')); - $this->drupalGet('admin/structure/block/list/stark'); + $this->drupalGet('admin/structure/block/stark'); $this->assertResponse(200, t('The block admin page for the admin theme can be accessed')); } } diff --git modules/dashboard/dashboard.module modules/dashboard/dashboard.module index fad6a9e..21baa42 100644 --- modules/dashboard/dashboard.module +++ modules/dashboard/dashboard.module @@ -22,7 +22,7 @@ function dashboard_help($path, $arg) { case 'admin/structure/dashboard': // @todo This assumes the current page is being displayed using the same // theme that the dashboard is displayed in. - $output = '

' . t('Rearrange blocks for display on the dashboard. Disabling a block makes it available on the main blocks administration page.', array('@dashboard-url' => url('admin/dashboard'), '@blocks-url' => url("admin/structure/block/list/{$GLOBALS['theme_key']}"))) . '

'; + $output = '

' . t('Rearrange blocks for display on the dashboard. Disabling a block makes it available on the main blocks administration page.', array('@dashboard-url' => url('admin/dashboard'), '@blocks-url' => url("admin/structure/block/{$GLOBALS['theme_key']}"))) . '

'; return $output; } }