Feature #97822
openOption to confiigure primary / secondary actions in list view
0%
Description
Many of my users complain that some of the actions in the list view are hidden by default. Good because the backend gets a bit more cleaned up, better if we could configure it.
That's how it could work:
USER TSCONFIG:
options.record_list.actionsPrimary =edit,hide,delete,moveUp,moveDown,divider,copy,cut,pasteAfter,pasteInto
options.record_list.actionsSecondary =view,viewBig,history,stat,perms,new,move,moveLeft, moveRight,version
Then in:
typo3/sysext/recordlist/Classes/RecordList/DatabaseRecordList.php line 2226
@
// CHANGE IN CORE:
public function addActionToCellGroup(&$cells, $action, $actionKey)
{$cellsMap = [
'primary' => [
'edit', 'hide', 'delete', 'moveUp', 'moveDown','divider','copy', 'cut', 'pasteAfter', 'pasteInto',
],
'secondary' => [
'view', 'viewBig', 'history', 'stat', 'perms', 'new', 'move', 'moveLeft', 'moveRight', 'version',
],
];
//ADDED TO BE ABLE TO CONFIGURE BUTTONS IN LIST VIEW VIA TSCONFIG
if($userTsConfig['options.']['record_list.']['actionsPrimary'])
{
$actionsPrimary =explode(",", $userTsConfig['options.']['record_list.']['actionsPrimary']) ;
$actionsPrimary = array_map('trim', $actionsPrimary);
$cellsMap[primary] = array($actionsPrimary);
}
if($userTsConfig['options.']['record_list.']['actionsSecondary'])
{
$actionsPrimary =explode(",", $userTsConfig['options.']['record_list.']['actionsSecondary']) ;
$actionsPrimary = array_map('trim', $actionsSecondary);
$cellsMap[primary] = array($actionsSeconary);
}
// END OF CHANGE
$classification = in_array($actionKey, $cellsMap['primary']) ? 'primary' : 'secondary';
$cells[$classification][$actionKey] = $action;
unset($cells[$actionKey]);
}
?>
@
No data to display