commit e76651e025ca8714b4d062757142ffb783a54349 Author: Joel Pittet Date: Tue Apr 16 09:14:38 2013 -0700 touchups diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 47e5f45..c96aabc 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -1589,7 +1589,7 @@ function template_preprocess_menu_link(&$variables) { * * Default template: menu-local-task.html.twig. * - * @param $array variables + * @param array variables * An associative array containing: * - element: A render element containing: * - #link: A menu link array with 'title', 'href', and 'localized_options' @@ -2206,53 +2206,6 @@ function menu_local_tabs() { } /** - * Returns HTML for primary and secondary local tasks. - * - * @param $variables - * An associative array containing: - * - primary: (optional) An array of local tasks (tabs). - * - secondary: (optional) An array of local tasks (tabs). - * - * @ingroup themeable - * @see menu_local_tasks() - */ -function theme_menu_local_tasks(&$variables) { - $output = ''; - - if (!empty($variables['primary'])) { - $variables['primary']['#prefix'] = '

' . t('Primary tabs') . '

'; - $variables['primary']['#prefix'] .= ''; - $output .= drupal_render($variables['primary']); - } - if (!empty($variables['secondary'])) { - $variables['secondary']['#prefix'] = '

' . t('Secondary tabs') . '

'; - $variables['secondary']['#prefix'] .= ''; - $output .= drupal_render($variables['secondary']); - } - - return $output; -} - -/** - * Prepares variables for primary and secondary local task templates. - * - * Default template: menu-local-tasks.html.twig. - * - * @param array $variables - * An associative array containing: - * - primary: (optional) An array of local tasks (tabs). - * - secondary: (optional) An array of local tasks (tabs). - * - * @see menu_local_tasks() - */ -function template_preprocess_menu_local_tasks(&$variables) { - $variables['primary_tasks'] = (!empty($variables['primary'])) ? drupal_render($variables['primary']) : FALSE; - $variables['secondary_tasks'] = (!empty($variables['secondary'])) ? drupal_render($variables['secondary']) : FALSE; -} - -/** * Sets (or gets) the active menu for the current page. * * The active menu for the page determines the active trail. diff --git a/core/modules/system/system.theme-rtl.css b/core/modules/system/system.theme-rtl.css index b2ee453..ef509d5 100644 --- a/core/modules/system/system.theme-rtl.css +++ b/core/modules/system/system.theme-rtl.css @@ -71,7 +71,7 @@ ul.menu { } /** - * Markup generated by theme_menu_local_tasks(). + * Markup generated by menu-local-tasks.html.twig. */ .tabs > li { margin-left: 0.3em; diff --git a/core/modules/system/system.theme.css b/core/modules/system/system.theme.css index 094984c..27460b1 100644 --- a/core/modules/system/system.theme.css +++ b/core/modules/system/system.theme.css @@ -372,7 +372,7 @@ ul.inline li { } /** - * Markup generated by theme_menu_local_tasks(). + * Markup generated by menu-local-tasks.html.twig. */ div.tabs { margin: 1em 0; diff --git a/core/modules/system/templates/menu-link.html.twig b/core/modules/system/templates/menu-link.html.twig index 66082b2..5035ea2 100644 --- a/core/modules/system/templates/menu-link.html.twig +++ b/core/modules/system/templates/menu-link.html.twig @@ -5,7 +5,7 @@ * * Available variables: * - wrapper_attributes: HTML attributes for the wrapper element. - * - link: An HTML string representing the rendered link. + * - link: An HTML link element. * - sub_menu: Rendered list item children of the element. * * Note: This template renders the content for each individual menu item in @@ -17,6 +17,6 @@ * @ingroup themeable */ #} -
  • + {{ link }}{{ sub_menu }}
  • diff --git a/core/modules/system/templates/menu-local-task.html.twig b/core/modules/system/templates/menu-local-task.html.twig index 2d1c516..63f9135 100644 --- a/core/modules/system/templates/menu-local-task.html.twig +++ b/core/modules/system/templates/menu-local-task.html.twig @@ -17,7 +17,7 @@ */ #} {% spaceless %} -
  • + {{ link }} {% if active %} {# Add text to indicate active tab for non-visual users. #} diff --git a/core/modules/system/templates/menu-local-tasks.html.twig b/core/modules/system/templates/menu-local-tasks.html.twig index 2ca090d..c290cef 100644 --- a/core/modules/system/templates/menu-local-tasks.html.twig +++ b/core/modules/system/templates/menu-local-tasks.html.twig @@ -4,8 +4,8 @@ * Default theme implementation to display primary and secondary local tasks. * * Available variables: - * - primary_tasks: An HTML string of items representing primary tasks. - * - secondary_tasks: An HTML string of list items representing primary tasks. + * - primary_tasks: HTML list items representing primary tasks. + * - secondary_tasks: HTML list items representing primary tasks. * * Note: Each item for both sets of tasks can be individually themed in * menu-local-task.html.twig. @@ -16,11 +16,11 @@ * @ingroup themeable */ #} -{% if primary_tasks %} +{% if primary %}

    {{ 'Primary tabs'|t }}

    -
      {{ primary_tasks }}
    +
      {{ primary }}
    {% endif %} -{% if secondary_tasks %} +{% if secondary %}

    {{ 'Secondary tabs'|t }}

    -
      {{ secondary_tasks }}
    +
      {{ secondary }}
    {% endif %}