You are here

tablesort-indicator.html.twig in Zircon Profile 8.0

Default theme implementation for displaying a tablesort indicator.

Available variables:

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

See also

template_preprocess_tablesort_indicator()

File

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

Related topics