commit 90469d6be7823f9816e544b7d30bcd74db6edca3 Author: Joel Pittet Date: Tue Dec 10 17:10:33 2013 -0800 108 diff --git a/core/themes/seven/seven.theme b/core/themes/seven/seven.theme index c493254..722b701 100644 --- a/core/themes/seven/seven.theme +++ b/core/themes/seven/seven.theme @@ -114,33 +114,6 @@ function seven_preprocess_admin_block_content(&$variables) { } /** - * Implements hook_preprocess_HOOK() for tablesort indicator templates. - * - * Uses Seven's image versions, so the arrows show up as black and not gray on - * gray. - */ -function seven_preprocess_tablesort_indicator(&$variables) { - $theme_path = drupal_get_path('theme', 'seven'); - if ($variables['style'] == 'asc') { - $variables['uri'] = $theme_path . '/images/arrow-asc.png'; - $text = t('Sort ascending'); - } - else { - $variables['uri'] = $theme_path . '/images/arrow-desc.png'; - $text = t('Sort descending'); - } - - $variables['image'] = array( - '#theme' => 'image', - '#uri' => $variables['uri'], - '#width' => 9, - '#height' => 5, - '#alt' => $text, - '#title' => $text, - ); -} - -/** * Overrides theme_menu_local_action(). */ function seven_menu_local_action($variables) { diff --git a/core/themes/seven/templates/tablesort-indicator.html.twig b/core/themes/seven/templates/tablesort-indicator.html.twig new file mode 100644 index 0000000..7fea0dc --- /dev/null +++ b/core/themes/seven/templates/tablesort-indicator.html.twig @@ -0,0 +1,16 @@ +{# +/** + * @file + * Default theme implementation for displaying a tablesort indicator. + * + * Available variables: + * - style: Either 'asc' or 'desc', indicating the sorting direction. + * + * @ingroup themeable + */ +#} +{% if style == 'asc' -%} + {{ 'Sort ascending'|t }} +{% else -%} + {{ 'Sort descending'|t }} +{% endif %}