You are here

tablesort-indicator.html.twig in Drupal 10

Theme override for displaying a tablesort indicator.

Available variables:

  • style: Either 'asc' or 'desc', indicating the sorting direction.

File

core/themes/stable/templates/admin/tablesort-indicator.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for displaying a tablesort indicator.
  5. *
  6. * Available variables:
  7. * - style: Either 'asc' or 'desc', indicating the sorting direction.
  8. */
  9. #}
  10. {%
  11. set classes = [
  12. 'tablesort',
  13. 'tablesort--' ~ style,
  14. ]
  15. %}
  16. <span{{ attributes.addClass(classes) }}>
  17. <span class="visually-hidden">
  18. {% if style == 'asc' -%}
  19. {{ 'Sort ascending'|t }}
  20. {% else -%}
  21. {{ 'Sort descending'|t }}
  22. {% endif %}
  23. </span>
  24. </span>