#9946 Fix delete and copy
This commit is contained in:
parent
81610046e3
commit
dc520df039
|
@ -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.
|
||||
|
|
|
@ -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' => [],
|
||||
|
|
Loading…
Reference in New Issue