Index: modules/block/block.admin.inc =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.admin.inc,v retrieving revision 1.12 diff -U3 -r1.12 block.admin.inc --- modules/block/block.admin.inc 26 Nov 2007 16:36:42 -0000 1.12 +++ modules/block/block.admin.inc 16 Dec 2007 17:38:15 -0000 @@ -28,6 +28,10 @@ function block_admin_display_form(&$form_state, $blocks, $theme = NULL) { global $theme_key, $custom_theme; + if (arg(3) == 'list') { + menu_rebuild(); + } + // Add CSS drupal_add_css(drupal_get_path('module', 'block') .'/block.css', 'module', 'all', FALSE); @@ -39,8 +43,9 @@ $block_regions = system_region_list($theme_key) + array(BLOCK_REGION_NONE => '<'. t('none') .'>'); // Build form tree + $path = arg(3) == 'list' || arg(3) == 'list-all' ? 'admin/build/block/'. arg(3) .'/'. $theme_key : 'admin/build/block'; $form = array( - '#action' => arg(3) ? url('admin/build/block/list/'. $theme_key) : url('admin/build/block'), + '#action' => url($path), '#tree' => TRUE, ); @@ -74,9 +79,10 @@ if ($throttle) { $form[$key]['throttle'] = array('#type' => 'checkbox', '#default_value' => isset($block['throttle']) ? $block['throttle'] : FALSE); } - $form[$key]['configure'] = array('#value' => l(t('configure'), 'admin/build/block/configure/'. $block['module'] .'/'. $block['delta'])); + $options = arg(3) == 'list-all' ? array('query' => array('destination' => 'admin/build/block/list-all')) : array(); + $form[$key]['configure'] = array('#value' => l(t('configure'), 'admin/build/block/configure/'. $block['module'] .'/'. $block['delta'], $options)); if ($block['module'] == 'block') { - $form[$key]['delete'] = array('#value' => l(t('delete'), 'admin/build/block/delete/'. $block['delta'])); + $form[$key]['delete'] = array('#value' => l(t('delete'), 'admin/build/block/delete/'. $block['delta'], $options)); } } Index: modules/block/block.module =================================================================== RCS file: /cvs/drupal/drupal/modules/block/block.module,v retrieving revision 1.291 diff -U3 -r1.291 block.module --- modules/block/block.module 16 Dec 2007 10:30:09 -0000 1.291 +++ modules/block/block.module 16 Dec 2007 17:38:16 -0000 @@ -139,6 +139,17 @@ 'type' => MENU_CALLBACK, 'file' => 'block.admin.inc', ); + $items['admin/build/block/list-all'] = array( + 'title' => 'List all', + 'type' => MENU_LOCAL_TASK, + 'weight' => -9, + ); + $items['admin/build/block/list-all/js'] = array( + 'title' => 'Javascript List Form', + 'page callback' => 'block_admin_display_js', + 'type' => MENU_CALLBACK, + 'file' => 'block.admin.inc', + ); $items['admin/build/block/configure'] = array( 'title' => 'Configure block', 'page callback' => 'drupal_get_form', @@ -161,9 +172,9 @@ 'file' => 'block.admin.inc', ); $default = variable_get('theme_default', 'garland'); + $admin_theme = variable_get('admin_theme', '0'); foreach (list_themes() as $key => $theme) { - // only show enabled themes - if ($theme->status) { + if ($theme->status || $key == $admin_theme) { $items['admin/build/block/list/'. $key] = array( 'title' => check_plain($theme->info['name']), 'page arguments' => array($key), @@ -172,6 +183,13 @@ 'file' => 'block.admin.inc', ); } + $items['admin/build/block/list-all/'. $key] = array( + 'title' => check_plain($theme->info['name']), + 'page arguments' => array($key), + 'type' => $key == $default ? MENU_DEFAULT_LOCAL_TASK : MENU_LOCAL_TASK, + 'weight' => $key == $default ? -10 : 0, + 'file' => 'block.admin.inc', + ); } return $items; }