Code Duplication    Length = 6-6 lines in 2 locations

admin/code/LeftAndMain.php 2 locations

@@ 1528-1533 (lines=6) @@
1525
				$actions = $record->getCMSActions();
1526
				// add default actions if none are defined
1527
				if(!$actions || !$actions->count()) {
1528
					if($record->hasMethod('canEdit') && $record->canEdit()) {
1529
						$actions->push(
1530
							FormAction::create('save',_t('CMSMain.SAVE','Save'))
1531
								->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept')
1532
						);
1533
					}
1534
					if($record->hasMethod('canDelete') && $record->canDelete()) {
1535
						$actions->push(
1536
							FormAction::create('delete',_t('ModelAdmin.DELETE','Delete'))
@@ 1534-1539 (lines=6) @@
1531
								->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept')
1532
						);
1533
					}
1534
					if($record->hasMethod('canDelete') && $record->canDelete()) {
1535
						$actions->push(
1536
							FormAction::create('delete',_t('ModelAdmin.DELETE','Delete'))
1537
								->addExtraClass('ss-ui-action-destructive')
1538
						);
1539
					}
1540
				}
1541
			}
1542