mirror of
https://github.com/e107inc/e107.git
synced 2025-08-06 14:46:56 +02:00
Admin-ui: Auto-display sort button when sortField is not empty and 'sort' parm is not set.
This commit is contained in:
@@ -7256,6 +7256,7 @@ class e_admin_form_ui extends e_form
|
|||||||
*/
|
*/
|
||||||
public function getController()
|
public function getController()
|
||||||
{
|
{
|
||||||
|
|
||||||
return $this->_controller;
|
return $this->_controller;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -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'>";
|
$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'], ''));
|
$mode = preg_replace('/[^\w]/', '', vartrue($_GET['mode'], ''));
|
||||||
$from = intval(vartrue($_GET['from'],0));
|
$from = intval(vartrue($_GET['from'],0));
|
||||||
|
Reference in New Issue
Block a user