mirror of
https://github.com/a2nt/silverstripe-webpack.git
synced 2024-10-22 17:05:31 +02:00
IMPROVEMETS: Enabled grid summary
This commit is contained in:
parent
3c19cd7741
commit
0a3675b460
@ -65,11 +65,14 @@ class WidgetAreaField extends GridField
|
||||
$config->getComponentByType(GridFieldDataColumns::class)->setDisplayFields([
|
||||
'Icon' => '',
|
||||
'Title' => 'Title',
|
||||
'LastEdited' => 'Changed',
|
||||
'Enabled' => 'Enabled',
|
||||
])->setFieldFormatting([
|
||||
'Icon' => static function($v, Widget $item) {
|
||||
return '<span style="font-size:2rem">'.$item::config()->get('icon').'</span>';
|
||||
}
|
||||
},
|
||||
'Enabled' => static function($v, Widget $item) {
|
||||
return $item->getField('Enabled') ? 'Yes' : 'No';
|
||||
},
|
||||
]);
|
||||
|
||||
$config->addComponent(new GridFieldEditButton());
|
||||
|
Loading…
Reference in New Issue
Block a user