13287-Remove columns Options and Checkbox in Events for users without EW. Fix no_sorteable_columns in Events

This commit is contained in:
Pablo Aragon 2024-04-23 08:29:08 +02:00
parent 2aff3b5d96
commit 9a4f2aa7c9
1 changed files with 17 additions and 15 deletions

View File

@ -2666,20 +2666,22 @@ try {
// Always add options column. // Always add options column.
$fields = array_merge( if ((bool) check_acl($config['id_user'], 0, 'EW') === true) {
$fields, $fields = array_merge(
[ $fields,
[ [
'text' => 'options', [
'class' => 'table_action_buttons mw100px', 'text' => 'options',
], 'class' => 'table_action_buttons mw100px',
[ ],
'text' => 'm', [
'extra' => $checkbox_all, 'text' => 'm',
'class' => 'w20px no-text-imp', 'extra' => $checkbox_all,
], 'class' => 'w20px no-text-imp',
] ],
); ]
);
}
// Get column names. // Get column names.
$column_names = events_get_column_names($fields, true); $column_names = events_get_column_names($fields, true);
@ -2890,8 +2892,8 @@ try {
'column_names' => $column_names, 'column_names' => $column_names,
'columns' => $fields, 'columns' => $fields,
'no_sortable_columns' => [ 'no_sortable_columns' => [
-1, 'options',
-2, 'm',
'column-instructions', 'column-instructions',
'user_comment', 'user_comment',
], ],