--- modules/block/block.admin.inc Sat Jun 27 13:48:58 2009
+++ modules/block/block.admin.inc Mon Jun 29 22:40:28 2009
@@ -87,6 +87,7 @@
}
// Do not allow disabling the main system content block.
unset($form['system_main']['region']['#options'][BLOCK_REGION_NONE]);
+ unset($form['system_secondary_tabs']['region']['#options'][BLOCK_REGION_NONE]);
$form['submit'] = array(
'#type' => 'submit',
--- modules/block/block.module Sat Jun 27 12:10:06 2009
+++ modules/block/block.module Tue Jun 30 19:20:09 2009
@@ -274,7 +274,7 @@
$build[$key] = $block->content;
unset($block->content);
$build[$key] += array(
- '#theme_wrapper' => 'block',
+ '#theme_wrapper' => ($key != 'system_page_title' ? 'block' : ''),
'#block' => $block,
'#weight' => ++$weight,
);
--- modules/system/system.module Sun Jun 28 14:52:58 2009
+++ modules/system/system.module Wed Jul 01 17:18:07 2009
@@ -966,6 +966,24 @@
// Cached elsewhere.
'cache' => BLOCK_NO_CACHE,
);
+
+ $blocks['page_title'] = array(
+ 'info' => t('Page title'),
+ 'cache' => BLOCK_NO_CACHE,
+ );
+ $blocks['primary_tabs'] = array(
+ 'info' => t('Primary tabs'),
+ 'cache' => BLOCK_NO_CACHE,
+ );
+ $blocks['secondary_tabs'] = array(
+ 'info' => t('Secondary tabs'),
+ 'cache' => BLOCK_NO_CACHE,
+ );
+ $blocks['messages'] = array(
+ 'info' => t('Messages'),
+ 'cache' => BLOCK_NO_CACHE,
+ );
+
$blocks['powered-by'] = array(
'info' => t('Powered by Drupal'),
'weight' => '10',
@@ -1038,6 +1056,53 @@
$block['subject'] = NULL;
$block['content'] = drupal_set_page_content();
return $block;
+ case 'page_title':
+
+ global $theme_key;
+ $result = db_select('block', 'b')
+ ->fields('b')
+ ->condition('b.theme', $theme_key)
+ ->condition('b.module', 'system')
+ ->condition('b.delta', 'primary_tabs')
+ ->condition('b.status', 1)
+ ->addTag('block_load')
+ ->execute()->fetchObject();
+
+ $page_title = drupal_get_title();
+ $block['subject'] = NULL;
+
+ if (!$result) {
+ $tabs_content = menu_primary_local_tasks();
+ if ($page_title || $tabs_content) {
+ $block['content'] = '
' .
+ ($page_title ? t('
!title
', array('!title' => $page_title)) : '') .
+ ($tabs_content ? '
' : '') . '
';
+ }
+ }
+ else if ($page_title) {
+ $block['content'] = t('!title
', array('!title' => drupal_get_title()));
+ }
+ return $block;
+ case 'primary_tabs':
+ if (!variable_get('drupal_title_with_tabs', 0)) {
+ $tabs_content = menu_primary_local_tasks();
+ if ($tabs_content) {
+ $block['subject'] = NULL;
+ $block['content'] = '';
+ }
+ }
+ return $block;
+ case 'secondary_tabs':
+ $tabs_content = menu_secondary_local_tasks();
+ if ($tabs_content) {
+ $block['subject'] = NULL;
+ $block['content'] = '';
+ }
+ return $block;
+ case 'messages':
+ $block['subject'] = NULL;
+ $block['content'] = theme('status_messages');
+ return $block;
case 'powered-by':
$image_path = 'misc/' . variable_get('drupal_badge_color', 'powered-blue') . '-' . variable_get('drupal_badge_size', '80x15') . '.png';
$block['subject'] = NULL;
@@ -1356,6 +1421,7 @@
'regions' => array(
'left' => 'Left sidebar',
'right' => 'Right sidebar',
+ 'title' => 'Title',
'content' => 'Content',
'header' => 'Header',
'footer' => 'Footer',
--- modules/system/page.tpl.php Thu Jun 18 23:19:02 2009
+++ modules/system/page.tpl.php Wed Jul 01 17:15:33 2009
@@ -156,14 +156,11 @@
-
-
-
-
+
--- themes/garland/page.tpl.php Thu May 28 18:44:08 2009
+++ themes/garland/page.tpl.php Wed Jul 01 16:51:06 2009
@@ -46,11 +46,7 @@
-
-
-
+
--- themes/garland/style.css Sat Jun 20 09:40:36 2009
+++ themes/garland/style.css Tue Jun 30 19:22:53 2009
@@ -617,7 +617,7 @@
margin: -0.2em -26px 1em;
padding: 0 26px 0.6em;
}
-h2.with-tabs {
+h1.with-tabs {
float: left; /* LTR */
margin: 0 2em 0 0; /* LTR */
padding: 0;
--- includes/theme.inc Thu Jun 18 23:19:02 2009
+++ includes/theme.inc Tue Jun 30 19:54:20 2009
@@ -1945,13 +1945,11 @@
$variables['language'] = $GLOBALS['language'];
$variables['language']->dir = $GLOBALS['language']->direction ? 'rtl' : 'ltr';
$variables['logo'] = theme_get_setting('logo');
- $variables['messages'] = $variables['show_messages'] ? theme('status_messages') : '';
$variables['main_menu'] = theme_get_setting('toggle_main_menu') ? menu_main_menu() : array();
$variables['secondary_menu'] = theme_get_setting('toggle_secondary_menu') ? menu_secondary_menu() : array();
$variables['search_box'] = (theme_get_setting('toggle_search') ? drupal_render(drupal_get_form('search_theme_form')) : '');
$variables['site_name'] = (theme_get_setting('toggle_name') ? filter_xss_admin(variable_get('site_name', 'Drupal')) : '');
$variables['site_slogan'] = (theme_get_setting('toggle_slogan') ? filter_xss_admin(variable_get('site_slogan', '')) : '');
- $variables['tabs'] = theme('menu_local_tasks');
$variables['title'] = drupal_get_title();
// RDFa allows annotation of XHTML pages with RDF data, while GRDDL provides
// mechanisms for extraction of this RDF content via XSLT transformation