function bootstrap_tablesort_indicator

7.x-3.x tablesort-indicator.func.php bootstrap_tablesort_indicator(array $variables)

Returns HTML for a tablesort indicator.

Parameters

array $variables: An associative array containing:

  • style: Set to either 'asc' or 'desc', this determines which icon to show.

Return value

string The constructed HTML.

Related topics

Source templates/system/tablesort-indicator.func.php (line 23)

function bootstrap_tablesort_indicator(array $variables) {
  if ($variables['style'] === 'asc') {
    return _bootstrap_icon('chevron-down', t('(asc)'), array(
      'class' => array('icon-after'),
      'data-toggle' => 'tooltip',
      'data-placement' => 'bottom',
      'title' => t('sort ascending'),
    ));
  }
  else {
    return _bootstrap_icon('chevron-up', t('(desc)'), array(
      'class' => array('icon-after'),
      'data-toggle' => 'tooltip',
      'data-placement' => 'bottom',
      'title' => t('sort descending'),
    ));
  }
}