1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Admin-ui: Auto-display sort button when sortField is not empty and 'sort' parm is not set.

This commit is contained in:
Cameron 2017-05-08 18:47:51 -07:00
parent ea9f998ed3
commit f58e00c41b
2 changed files with 9 additions and 1 deletions

View File

@ -7256,6 +7256,7 @@ class e_admin_form_ui extends e_form
*/
public function getController()
{
return $this->_controller;
}
}

View File

@ -4129,9 +4129,16 @@ class e_form
}
*/
$sf = $this->getController()->getSortField();
if(!isset($parms['sort']) && !empty($sf))
{
$parms['sort'] = true;
}
$value = "<div class='btn-group'>";
if(!empty($parms['sort']) && empty($attributes['grid']))//FIXME use a global variable such as $fieldpref
if(!empty($parms['sort']) && empty($attributes['grid']))
{
$mode = preg_replace('/[^\w]/', '', vartrue($_GET['mode'], ''));
$from = intval(vartrue($_GET['from'],0));