#9946 Fix delete and copy

This commit is contained in:
miguel angel rasteu 2023-09-04 11:09:58 +02:00
parent 81610046e3
commit dc520df039
2 changed files with 11 additions and 2 deletions

View File

@ -32,6 +32,7 @@ global $config;
$method = get_parameter('method', null);
$filter = get_parameter('filter', '');
$urlDashboard = get_parameter('urlDashboard', '');
$manageDashboards = get_parameter('manageDashboards', 1);
if ($method === 'draw') {
// Datatables offset, limit and order.

View File

@ -91,6 +91,13 @@ if (empty($dashboards) === true) {
__('Favorite'),
__('Full screen'),
];
if ($manageDashboards === 1) {
$columns[] = 'copy';
$columns[] = 'delete';
$column_names[] = __('Copy');
$column_names[] = __('Delete');
}
ui_print_datatable(
[
'id' => $id_table,
@ -100,8 +107,9 @@ if (empty($dashboards) === true) {
'column_names' => $column_names,
'ajax_url' => 'include/ajax/dashboard.ajax',
'ajax_data' => [
'method' => 'draw',
'urlDashboard' => $urlDashboard,
'method' => 'draw',
'urlDashboard' => $urlDashboard,
'manageDashboards' => $manageDashboards,
],
'default_pagination' => $config['block_size'],
'no_sortable_columns' => [],