- Patch #997408 by erikwebb, Jeff Burnz, JohnAlbin, tim.plunkett: is always set.

8.0.x
Dries Buytaert 2011-05-16 22:09:57 -07:00
parent b4c6551cad
commit bc012df10c
4 changed files with 10 additions and 14 deletions

View File

@ -2188,17 +2188,13 @@ function menu_local_tabs() {
function theme_menu_local_tasks(&$variables) { function theme_menu_local_tasks(&$variables) {
$output = ''; $output = '';
if (!empty($variables['primary'])) { if ($primary = drupal_render($variables['primary'])) {
$variables['primary']['#prefix'] = '<h2 class="element-invisible">' . t('Primary tabs') . '</h2>'; $output .= '<h2 class="element-invisible">' . t('Primary tabs') . '</h2>';
$variables['primary']['#prefix'] .= '<ul class="tabs primary">'; $output .= '<ul class="tabs primary">' . $primary . '</ul>';
$variables['primary']['#suffix'] = '</ul>';
$output .= drupal_render($variables['primary']);
} }
if (!empty($variables['secondary'])) { if ($secondary = drupal_render($variables['secondary'])) {
$variables['secondary']['#prefix'] = '<h2 class="element-invisible">' . t('Secondary tabs') . '</h2>'; $output .= '<h2 class="element-invisible">' . t('Secondary tabs') . '</h2>';
$variables['secondary']['#prefix'] .= '<ul class="tabs secondary">'; $output .= '<ul class="tabs secondary">' . $secondary . '</ul>';
$variables['secondary']['#suffix'] = '</ul>';
$output .= drupal_render($variables['secondary']);
} }
return $output; return $output;

View File

@ -122,7 +122,7 @@
<?php print render($title_prefix); ?> <?php print render($title_prefix); ?>
<?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?> <?php if ($title): ?><h1 class="title" id="page-title"><?php print $title; ?></h1><?php endif; ?>
<?php print render($title_suffix); ?> <?php print render($title_suffix); ?>
<?php if ($tabs): ?><div class="tabs"><?php print render($tabs); ?></div><?php endif; ?> <?php if ($tabs = render($tabs)): ?><div class="tabs"><?php print $tabs; ?></div><?php endif; ?>
<?php print render($page['help']); ?> <?php print render($page['help']); ?>
<?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?> <?php if ($action_links): ?><ul class="action-links"><?php print render($action_links); ?></ul><?php endif; ?>
<?php print render($page['content']); ?> <?php print render($page['content']); ?>

View File

@ -192,9 +192,9 @@
</h1> </h1>
<?php endif; ?> <?php endif; ?>
<?php print render($title_suffix); ?> <?php print render($title_suffix); ?>
<?php if ($tabs): ?> <?php if ($tabs = render($tabs)): ?>
<div class="tabs"> <div class="tabs">
<?php print render($tabs); ?> <?php print $tabs; ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php print render($page['help']); ?> <?php print render($page['help']); ?>

View File

@ -46,7 +46,7 @@
<h1<?php print $tabs ? ' class="with-tabs"' : '' ?>><?php print $title ?></h1> <h1<?php print $tabs ? ' class="with-tabs"' : '' ?>><?php print $title ?></h1>
<?php endif; ?> <?php endif; ?>
<?php print render($title_suffix); ?> <?php print render($title_suffix); ?>
<?php if ($tabs): ?><?php print render($tabs); ?></div><?php endif; ?> <?php if ($tabs = render($tabs)): ?><?php print $tabs; ?></div><?php endif; ?>
<?php print render($tabs2); ?> <?php print render($tabs2); ?>
<?php print $messages; ?> <?php print $messages; ?>
<?php print render($page['help']); ?> <?php print render($page['help']); ?>