private function _getSortAnchor()
{
$result = '';
/*
* Plain Bootstrap with glyphicons
*/
if ('resource-table::bootstrap' === $this->_viewName) {
$result .= '<a href="' . $this->sortUrl() . '" class="pull-right">';
$glyphicon = 'glyphicon-sort';
if ($this->sortActive()) {
// Column is active - we can show proper icon
$glyphicon = $this->sortDirection() === 'DESC' ? 'glyphicon-sort-by-attributes' : 'glyphicon-sort-by-attributes-alt';
}
$result .= '<i class="glyphicon ' . $glyphicon . '"></i>';
$result .= '</a>';
}
/*
* Just simple table
*/
if (!$result) {
$result .= '<a href="' . $this->sortUrl() . '" style="font-weight:' . ($this->sortActive() ? 'bold' : 'normal') . '">';
$result .= $this->sortDirection() === 'DESC' ? '↓' : '↑';
$result .= '</a>';
}
return $result;
}