mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
#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:
parent
633821efb4
commit
6d5a49e59e
@ -1062,15 +1062,19 @@ class SiteTree extends DataObject {
|
|||||||
$actions = array();
|
$actions = array();
|
||||||
|
|
||||||
if($this->isPublished() && $this->canPublish()) {
|
if($this->isPublished() && $this->canPublish()) {
|
||||||
$actions[] = FormAction::create('unpublish', 'Unpublish', 'delete')
|
$unpublish = FormAction::create('unpublish', 'Unpublish', 'delete');
|
||||||
->describe("Remove this page from the published site");
|
$unpublish->describe("Remove this page from the published site");
|
||||||
|
$unpublish->addExtraClass('delete');
|
||||||
|
$actions[] = $unpublish;
|
||||||
}
|
}
|
||||||
|
|
||||||
if($this->stagesDiffer('Stage', 'Live')) {
|
if($this->stagesDiffer('Stage', 'Live')) {
|
||||||
|
|
||||||
if($this->isPublished() && $this->canEdit()) {
|
if($this->isPublished() && $this->canEdit()) {
|
||||||
$actions[] = FormAction::create('rollback', 'Cancel draft changes', 'delete')
|
$rollback = FormAction::create('rollback', 'Cancel draft changes', 'delete');
|
||||||
->describe("Delete your draft and revert to the currently published page");
|
$rollback->describe("Delete your draft and revert to the currently published page");
|
||||||
|
$rollback->addExtraClass('delete');
|
||||||
|
$actions[] = $rollback;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user