#105 - FormAction $extraClass usage

git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@43606 467b73ca-7a2a-4603-9d3b-597d59a354a9
This commit is contained in:
Andrew O'Neil 2007-10-19 01:42:14 +00:00
parent 633821efb4
commit 6d5a49e59e

View File

@ -1062,15 +1062,19 @@ class SiteTree extends DataObject {
$actions = array();
if($this->isPublished() && $this->canPublish()) {
$actions[] = FormAction::create('unpublish', 'Unpublish', 'delete')
->describe("Remove this page from the published site");
$unpublish = FormAction::create('unpublish', 'Unpublish', 'delete');
$unpublish->describe("Remove this page from the published site");
$unpublish->addExtraClass('delete');
$actions[] = $unpublish;
}
if($this->stagesDiffer('Stage', 'Live')) {
if($this->isPublished() && $this->canEdit()) {
$actions[] = FormAction::create('rollback', 'Cancel draft changes', 'delete')
->describe("Delete your draft and revert to the currently published page");
$rollback = FormAction::create('rollback', 'Cancel draft changes', 'delete');
$rollback->describe("Delete your draft and revert to the currently published page");
$rollback->addExtraClass('delete');
$actions[] = $rollback;
}
}