Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

basic button re-ordering #3

Merged
merged 2 commits into from

2 participants

Dave Berry Aram Balakjian
Dave Berry

Nothing major here just reordered cms actions so the buttons are logically grouped together.
Also added delete class to the unpublish button.

Makes a little more sense to the end user having delete and unpublish next to each other.

Aram Balakjian arambalakjian merged commit b92aab7 into from
Aram Balakjian

Great, thanks Codivist!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 7, 2012
  1. Dave Berry

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

    codivist authored
    …Also added delete class to the unpublish button.
  2. Dave Berry
This page is out of date. Refresh to see the latest.
Showing with 13 additions and 11 deletions.
  1. +13 −11 code/DataObjects/DataObjectAsPage.php
24 code/DataObjects/DataObjectAsPage.php
View
@@ -100,21 +100,23 @@ 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");
+ //add it to the existing actions
+ $Actions->insertFirst($DuplicateAction);
+
+ 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);
+
return $Actions;
}
Something went wrong with that request. Please try again.