You are here

tablesort-indicator.html.twig in Open Social 8

Theme override for displaying a tablesort indicator.

Available variables:

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

File

themes/socialbase/templates/system/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. <span{{ attributes.addClass('tablesort') }}>
  11. {% if style == 'asc' -%}
  12. <svg class="icon-tablesort">
  13. <use xlink:href="#icon-arrow_drop_down"></use>
  14. </svg>
  15. <span class="visually-hidden">
  16. {{ 'Sort ascending'|t }}
  17. </span>
  18. {% else -%}
  19. <svg class="icon-tablesort">
  20. <use xlink:href="#icon-arrow_drop_up"></use>
  21. </svg>
  22. <span class="visually-hidden">
  23. {{ 'Sort descending'|t }}
  24. </span>
  25. {% endif %}
  26. </span>