commit daf87b75aba4fa75ac867d5e4fe4c49ba6a1a371 Author: Joel Pittet Date: Sat Sep 6 18:20:53 2014 -0700 touchups diff --git a/core/includes/menu.inc b/core/includes/menu.inc index 669b86a..12d2a23 100644 --- a/core/includes/menu.inc +++ b/core/includes/menu.inc @@ -411,7 +411,7 @@ function template_preprocess_menu_local_task(&$variables) { ); if (!empty($link['href'])) { - // @todo - remove this once all pages are converted to routes. + // @todo - Remove this once all pages are converted to routes. $variables['link']['#href'] = $link['href']; } else { @@ -450,8 +450,6 @@ function template_preprocess_menu_local_action(&$variables) { '#options' => $link['localized_options'], ); - // @todo Remove this check and the call to l() when all pages are converted to - // routes. // @todo Figure out how to support local actions without a href properly. if ($link['href'] === '' && !empty($link['route_name'])) { $variables['link'] += array( @@ -460,6 +458,7 @@ function template_preprocess_menu_local_action(&$variables) { ); } else { + // @todo - Remove this once all pages are converted to routes. $variables['link']['#href'] = $link['href']; } } diff --git a/core/lib/Drupal/Core/Menu/LocalTaskManagerInterface.php b/core/lib/Drupal/Core/Menu/LocalTaskManagerInterface.php index c832b90..e75307d 100644 --- a/core/lib/Drupal/Core/Menu/LocalTaskManagerInterface.php +++ b/core/lib/Drupal/Core/Menu/LocalTaskManagerInterface.php @@ -49,7 +49,7 @@ public function getLocalTasksForRoute($route_name); * The route for which to make renderable local tasks. * * @return array - * A render array as expected by theme_menu_local_tasks. + * A render array as expected by menu-local-tasks.html.twig. */ public function getTasksBuild($current_route_name); diff --git a/core/modules/system/templates/menu-local-action.html.twig b/core/modules/system/templates/menu-local-action.html.twig index eb02f42..0eb03a9 100644 --- a/core/modules/system/templates/menu-local-action.html.twig +++ b/core/modules/system/templates/menu-local-action.html.twig @@ -4,6 +4,7 @@ * Default theme implementation for a single local action link. * * Available variables: + * - attributes: HTML attributes for the wrapper element. * - link: A rendered link element. * * @see template_preprocess_menu_local_action() @@ -11,4 +12,4 @@ * @ingroup themeable */ #} -
  • {{ link }}
  • +{{ link }} diff --git a/core/modules/system/templates/menu-local-task.html.twig b/core/modules/system/templates/menu-local-task.html.twig index 2d2d351..5939203 100644 --- a/core/modules/system/templates/menu-local-task.html.twig +++ b/core/modules/system/templates/menu-local-task.html.twig @@ -5,7 +5,7 @@ * * Available variables: * - attributes: HTML attributes for the wrapper element. - * - link: The rendered link ( tag). + * - link: A rendered link element. * * Note: This template renders the content for each task item in * menu-local-tasks.html.twig. @@ -15,8 +15,4 @@ * @ingroup themeable */ #} -{% spaceless %} - - {{ link }} - -{% endspaceless %} +{{ link }} diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index 496bf26..f2281cb 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -63,7 +63,7 @@ function seven_preprocess_menu_local_tasks(&$variables) { /** * Implements hook_preprocess_HOOK() for menu-local-task templates. */ -function seven_preprocess_menu_local_task(array &$variables) { +function seven_preprocess_menu_local_task(&$variables) { $variables['attributes']['class'][] = 'tabs__tab'; } @@ -124,7 +124,6 @@ function seven_preprocess_tablesort_indicator(&$variables) { * Implements hook_preprocess_HOOK() for menu-local-action templates. */ function seven_preprocess_menu_local_action(array &$variables) { - $variables['link']['#options']['attributes']['class'][] = 'button'; $variables['link']['#options']['attributes']['class'][] = 'button--primary'; $variables['link']['#options']['attributes']['class'][] = 'button--small';