Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

basic button re-ordering #3

Merged
merged 2 commits into from

2 participants

@codivist

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.

@arambalakjian arambalakjian merged commit b92aab7 into arambalakjian:master
@arambalakjian

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. @codivist

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

    codivist authored
    …Also added delete class to the unpublish button.
  2. @codivist
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
View
24 code/DataObjects/DataObjectAsPage.php
@@ -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.