Skip to content
Browse files

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

…Also added delete class to the unpublish button.
  • Loading branch information...
1 parent b9c23e6 commit 760875ae0f684eabc9eb8458938ee8c282722d5d @codivist committed Feb 6, 2012
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);

0 comments on commit 760875a

Please sign in to comment.
Something went wrong with that request. Please try again.