mirror of
https://github.com/Combodo/iTop.git
synced 2026-07-21 22:26:54 +02:00
Objects list: Add tree group by option to DataTables UIBlock
This commit is contained in:
@@ -631,6 +631,14 @@ class DataTableUIBlockFactory extends AbstractUIBlockFactory
|
||||
$aExtraParams['table_id'] = $sTableId;
|
||||
$aExtraParams['list_id'] = $sListId;
|
||||
|
||||
// Tree grouping options
|
||||
if ($bIsTreeGroupingView) {
|
||||
$sFirstAlias = array_key_first($aAuthorizedClasses);
|
||||
$aOptions['sTreeGroupingAttr'] = $sTreeGroupingAttr;
|
||||
// The JS reads the parent ID from this data key in each row
|
||||
$aOptions['sTreeGroupingParentKey'] = $sFirstAlias.'/'.$sTreeGroupingAttr.'/raw';
|
||||
}
|
||||
|
||||
$oDataTable->SetOptions($aOptions);
|
||||
$oDataTable->SetAjaxUrl(utils::GetAbsoluteUrlAppRoot()."pages/ajax.render.php");
|
||||
$oDataTable->SetAjaxData([
|
||||
|
||||
Reference in New Issue
Block a user