|
@@ 1255-1260 (lines=6) @@
|
| 1252 |
|
$actions = $record->getCMSActions(); |
| 1253 |
|
// add default actions if none are defined |
| 1254 |
|
if(!$actions || !$actions->Count()) { |
| 1255 |
|
if($record->hasMethod('canEdit') && $record->canEdit()) { |
| 1256 |
|
$actions->push( |
| 1257 |
|
FormAction::create('save',_t('CMSMain.SAVE','Save')) |
| 1258 |
|
->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept') |
| 1259 |
|
); |
| 1260 |
|
} |
| 1261 |
|
if($record->hasMethod('canDelete') && $record->canDelete()) { |
| 1262 |
|
$actions->push( |
| 1263 |
|
FormAction::create('delete',_t('ModelAdmin.DELETE','Delete')) |
|
@@ 1261-1266 (lines=6) @@
|
| 1258 |
|
->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept') |
| 1259 |
|
); |
| 1260 |
|
} |
| 1261 |
|
if($record->hasMethod('canDelete') && $record->canDelete()) { |
| 1262 |
|
$actions->push( |
| 1263 |
|
FormAction::create('delete',_t('ModelAdmin.DELETE','Delete')) |
| 1264 |
|
->addExtraClass('ss-ui-action-destructive') |
| 1265 |
|
); |
| 1266 |
|
} |
| 1267 |
|
} |
| 1268 |
|
} |
| 1269 |
|
|