tablesort-indicator.html.twig in Drupal 10
Same filename in this branch
Same filename and directory in other branches
Default theme implementation for displaying a tablesort indicator.
Available variables:
- style: Either 'asc' or 'desc', indicating the sorting direction.
2 theme calls to tablesort-indicator.html.twig
- TableSort::header in core/
lib/ Drupal/ Core/ Utility/ TableSort.php - Formats a column header.
- template_preprocess_views_view_table in core/
modules/ views/ views.theme.inc - Prepares variables for views table templates.
File
core/modules/system/templates/tablesort-indicator.html.twigView source
- {#
- /**
- * @file
- * Default theme implementation for displaying a tablesort indicator.
- *
- * Available variables:
- * - style: Either 'asc' or 'desc', indicating the sorting direction.
- *
- * @ingroup themeable
- */
- #}
- {%
- set classes = [
- 'tablesort',
- 'tablesort--' ~ style,
- ]
- %}
- <span{{ attributes.addClass(classes) }}>
- <span class="visually-hidden">
- {% if style == 'asc' -%}
- {{ 'Sort ascending'|t }}
- {% else -%}
- {{ 'Sort descending'|t }}
- {% endif %}
- </span>
- </span>