Code Duplication    Length = 6-6 lines in 2 locations

admin/code/LeftAndMain.php 2 locations

@@ 1515-1520 (lines=6) @@
1512
				$actions = $record->getCMSActions();
1513
				// add default actions if none are defined
1514
				if(!$actions || !$actions->count()) {
1515
					if($record->hasMethod('canEdit') && $record->canEdit()) {
1516
						$actions->push(
1517
							FormAction::create('save',_t('CMSMain.SAVE','Save'))
1518
								->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept')
1519
						);
1520
					}
1521
					if($record->hasMethod('canDelete') && $record->canDelete()) {
1522
						$actions->push(
1523
							FormAction::create('delete',_t('ModelAdmin.DELETE','Delete'))
@@ 1521-1526 (lines=6) @@
1518
								->addExtraClass('ss-ui-action-constructive')->setAttribute('data-icon', 'accept')
1519
						);
1520
					}
1521
					if($record->hasMethod('canDelete') && $record->canDelete()) {
1522
						$actions->push(
1523
							FormAction::create('delete',_t('ModelAdmin.DELETE','Delete'))
1524
								->addExtraClass('ss-ui-action-destructive')
1525
						);
1526
					}
1527
				}
1528
			}
1529