tablesort-indicator.func.php 949 B

12345678910111213141516171819202122232425262728293031323334353637383940
  1. <?php
  2. /**
  3. * @file
  4. * Stub file for bootstrap_tablesort_indicator().
  5. */
  6. /**
  7. * Returns HTML for a tablesort indicator.
  8. *
  9. * @param array $variables
  10. * An associative array containing:
  11. * - style: Set to either 'asc' or 'desc', this determines which icon to
  12. * show.
  13. *
  14. * @return string
  15. * The constructed HTML.
  16. *
  17. * @see theme_tablesort_indicator()
  18. *
  19. * @ingroup theme_functions
  20. */
  21. function bootstrap_tablesort_indicator(array $variables) {
  22. if ($variables['style'] === 'asc') {
  23. return _bootstrap_icon('chevron-down', t('(asc)'), array(
  24. 'class' => array('icon-after'),
  25. 'data-toggle' => 'tooltip',
  26. 'data-placement' => 'bottom',
  27. 'title' => t('sort ascending'),
  28. ));
  29. }
  30. else {
  31. return _bootstrap_icon('chevron-up', t('(desc)'), array(
  32. 'class' => array('icon-after'),
  33. 'data-toggle' => 'tooltip',
  34. 'data-placement' => 'bottom',
  35. 'title' => t('sort descending'),
  36. ));
  37. }
  38. }