|
@@ -460,20 +460,20 @@
|
|
|
|
|
|
if (!function_exists('th_order_by')) {
|
|
if (!function_exists('th_order_by')) {
|
|
//html table header order by
|
|
//html table header order by
|
|
- function th_order_by($field_name, $columntitle, $order_by, $order, $app_uuid = '', $css = '', $additional_get_params='') {
|
|
|
|
|
|
+ function th_order_by($field_name, $columntitle, $order_by, $order, $app_uuid = '', $css = '', $additional_get_params='', $description='') {
|
|
if (strlen($app_uuid) > 0) { $app_uuid = "&app_uuid=".$app_uuid; } // accomodate need to pass app_uuid where necessary (inbound/outbound routes lists)
|
|
if (strlen($app_uuid) > 0) { $app_uuid = "&app_uuid=".$app_uuid; } // accomodate need to pass app_uuid where necessary (inbound/outbound routes lists)
|
|
if (strlen($additional_get_params) > 0) {$additional_get_params = '&'.$additional_get_params; } // you may need to pass other parameters
|
|
if (strlen($additional_get_params) > 0) {$additional_get_params = '&'.$additional_get_params; } // you may need to pass other parameters
|
|
$html = "<th ".$css." nowrap>";
|
|
$html = "<th ".$css." nowrap>";
|
|
- if (strlen($order_by)==0) {
|
|
|
|
- $html .= "<a href='?order_by=$field_name&order=desc".$app_uuid."$additional_get_params' title='ascending'>$columntitle</a>";
|
|
|
|
|
|
+ $description = (strlen($description) > 0) ? $description . ', ': '';
|
|
|
|
+ if (strlen($order_by) == 0)
|
|
|
|
+ $order = 'asc';
|
|
|
|
+ if ($order == "asc") {
|
|
|
|
+ $description .= 'sort(ascending)';
|
|
|
|
+ $html .= "<a href='?order_by=$field_name&order=desc".$app_uuid."$additional_get_params' title='$description'>$columntitle</a>";
|
|
}
|
|
}
|
|
else {
|
|
else {
|
|
- if ($order=="asc") {
|
|
|
|
- $html .= "<a href='?order_by=$field_name&order=desc".$app_uuid."$additional_get_params' title='ascending'>$columntitle</a>";
|
|
|
|
- }
|
|
|
|
- else {
|
|
|
|
- $html .= "<a href='?order_by=$field_name&order=asc".$app_uuid."$additional_get_params' title='descending'>$columntitle</a>";
|
|
|
|
- }
|
|
|
|
|
|
+ $description .= 'sort(descending)';
|
|
|
|
+ $html .= "<a href='?order_by=$field_name&order=asc".$app_uuid."$additional_get_params' title='$description'>$columntitle</a>";
|
|
}
|
|
}
|
|
$html .= "</th>";
|
|
$html .= "</th>";
|
|
return $html;
|
|
return $html;
|