ENHANCEMENT 6631 Visual grouping of FormAction

This commit is contained in:
Wolf Vollprecht 2012-01-18 03:18:11 +01:00
parent a570e2f2a0
commit f8f5a36640

View File

@ -2057,6 +2057,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$unpublish->describe(_t('SiteTree.BUTTONUNPUBLISHDESC', 'Remove this page from the published site'));
$unpublish->addExtraClass('unpublish');
$unpublish->addExtraClass('ss-ui-action-destructive');
$unpublish->setAttribute('buttonset', 'minoractions');
$actions->push($unpublish);
}
@ -2066,6 +2067,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$rollback = FormAction::create('rollback', _t('SiteTree.BUTTONCANCELDRAFT', 'Cancel draft changes'), 'delete');
$rollback->describe(_t('SiteTree.BUTTONCANCELDRAFTDESC', 'Delete your draft and revert to the currently published page'));
$rollback->addExtraClass('delete');
$rollback->setAttribute('buttonset', 'minoractions');
$actions->push($rollback);
}
}
@ -2079,6 +2081,7 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
// "delete from live"
$actions->push($deleteFromLiveAction = new FormAction('deletefromlive',_t('CMSMain.DELETEFP','Delete')));
$deleteFromLiveAction->addExtraClass('ss-ui-action-destructive');
$deleteFromLiveAction->setAttribute('buttonset', 'minoractions');
}
} else {
// "restore"
@ -2090,11 +2093,13 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid
$actions->push($deleteAction = new FormAction('delete',_t('CMSMain.DELETE','Delete draft')));
$deleteAction->addExtraClass('delete');
$deleteAction->addExtraClass('ss-ui-action-destructive');
$deleteAction->setAttribute('buttonset', 'minoractions');
}
// "save"
$actions->push($saveDraftAction = new FormAction('save',_t('CMSMain.SAVEDRAFT','Save Draft')));
$saveDraftAction->addExtraClass('save-draft');
$saveDraftAction->setAttribute('buttonset', 'minoractions');
}
}