Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

reordered cms actions so the buttons are logically grouped together. …

…Also added delete class to the unpublish button.
  • Loading branch information...
commit 760875ae0f684eabc9eb8458938ee8c282722d5d 1 parent b9c23e6
@codivist codivist authored
Showing with 10 additions and 9 deletions.
  1. +10 −9 code/DataObjects/DataObjectAsPage.php
View
19 code/DataObjects/DataObjectAsPage.php
@@ -100,18 +100,19 @@ public function getCMSActions()
$PublishAction = FormAction::create('doPublish', 'Save & Publish');
$PublishAction->describe("Publish this item");
$Actions->insertFirst($PublishAction);
-
- if($this->Status != 'Draft')
- {
- //Create the Unpublish action
- $unPublishAction = FormAction::create('doUnpublish', 'Unpublish');
- $unPublishAction->describe("Unpublish this item");
- $Actions->insertFirst($unPublishAction);
- }
-
+
//Create the Duplicate action
$DuplicateAction = FormAction::create('duplicate', 'Duplicate Object');
$DuplicateAction->describe("Duplicate this item");
+
+ if($this->Status != 'Draft')
+ {
+ //Create the Unpublish action
+ $unPublishAction = FormAction::create('doUnpublish', 'Unpublish');
+ $unPublishAction->describe("Unpublish this item");
+ $unPublishAction->addExtraClass('delete');
+ $Actions->insertFirst($unPublishAction);
+ }
//add it to the existing actions
$Actions->insertFirst($DuplicateAction);
Please sign in to comment.
Something went wrong with that request. Please try again.