Issue Feature Closed

#97822Option to confiigure primary / secondary actions in list view

Christoph Runkel 06/29/22, 10:28 updated 09/29/26, 19:03

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:

<?php

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]);
}
?>
@

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 1