From ec9b58aea802754b48a427bcc30f00999987e847 Mon Sep 17 00:00:00 2001 From: Stig Lindqvist Date: Tue, 25 Feb 2014 20:37:59 +1300 Subject: [PATCH] code style guidelines --- code/extensions/SiteTreeContentReview.php | 27 ++++++++++++----------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/code/extensions/SiteTreeContentReview.php b/code/extensions/SiteTreeContentReview.php index f6550dc..114f285 100644 --- a/code/extensions/SiteTreeContentReview.php +++ b/code/extensions/SiteTreeContentReview.php @@ -60,6 +60,19 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider return self::$schedule; } + /** + * + * @param \FieldList $actions + */ + public function updateCMSActions(\FieldList $actions) { + if($this->canBeReviewedBy(Member::currentUser())) { + $reviewAction = FormAction::create('reviewed', _t('ContentReview.BUTTONREVIEWED', 'Content reviewed')) + ->setAttribute('data-icon', 'pencil') + ->setAttribute('data-text-alternate', _t('ContentReview.BUTTONREVIEWED', 'Content reviewed')); + $actions->push($reviewAction); + } + } + /** * * @param SiteTree $page @@ -235,6 +248,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider $optionsFrom = ReadonlyField::create('ROType', _t('ContentReview.SETTINGSFROM', "Options are"), $this->owner->ContentReviewType); + $fields->addFieldsToTab("Root.ContentReview", array( $contentOwners, $nextReviewAt->performReadonlyTransformation(), @@ -327,19 +341,6 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider return (bool)$nextDate; } - /** - * - * @param \FieldList $actions - */ - public function updateCMSActions(\FieldList $actions) { - if($this->canBeReviewedBy(Member::currentUser())) { - $reviewAction = FormAction::create('reviewed', _t('ContentReview.BUTTONREVIEWED', 'Content reviewed')) - ->setAttribute('data-icon', 'pencil') - ->setAttribute('data-text-alternate', _t('ContentReview.BUTTONREVIEWED', 'Content reviewed')); - $actions->push($reviewAction); - } - } - /** * Check if a review is due by a member for this owner *