Code Duplication    Length = 6-6 lines in 2 locations

admin/code/LeftAndMain.php 2 locations

@@ 1577-1582 (lines=6) @@
1574
				$actions = $record->getCMSActions();
1575
				// add default actions if none are defined
1576
				if(!$actions || !$actions->count()) {
1577
					if($record->hasMethod('canEdit') && $record->canEdit()) {
1578
						$actions->push(
1579
							FormAction::create('save',_t('CMSMain.SAVE','Save'))
1580
								->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept')
1581
						);
1582
					}
1583
					if($record->hasMethod('canDelete') && $record->canDelete()) {
1584
						$actions->push(
1585
							FormAction::create('delete',_t('ModelAdmin.DELETE','Delete'))
@@ 1583-1588 (lines=6) @@
1580
								->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept')
1581
						);
1582
					}
1583
					if($record->hasMethod('canDelete') && $record->canDelete()) {
1584
						$actions->push(
1585
							FormAction::create('delete',_t('ModelAdmin.DELETE','Delete'))
1586
								->addExtraClass('ss-ui-action-destructive')
1587
						);
1588
					}
1589
				}
1590
			}
1591