Skip to content

Commit 2837246

Browse files
committed
Add optional trash action
1 parent c829e26 commit 2837246

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

DashboardPanelCollection.module

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -406,6 +406,18 @@ class DashboardPanelCollection extends DashboardPanel
406406
'disabled' => !$page->viewable,
407407
];
408408
}
409+
if ($action === 'trash') {
410+
$links['trash'] = [
411+
'href' => '#',
412+
'label' => $this->_('Trash'),
413+
'icon' => 'trash-can',
414+
// 'disabled' => $page->isTrash() || !$page->trashable,
415+
'attributes' => [
416+
'data-action' => "[trash][{$page}]",
417+
'data-action-value' => "1",
418+
],
419+
];
420+
}
409421
}
410422

411423
return $links;

0 commit comments

Comments
 (0)