mirror of
https://github.com/silverstripe/silverstripe-contentreview
synced 2024-10-22 17:05:47 +02:00
code style guidelines
This commit is contained in:
parent
3b752be238
commit
ec9b58aea8
@ -60,6 +60,19 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
|||||||
return self::$schedule;
|
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
|
* @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);
|
$optionsFrom = ReadonlyField::create('ROType', _t('ContentReview.SETTINGSFROM', "Options are"), $this->owner->ContentReviewType);
|
||||||
|
|
||||||
$fields->addFieldsToTab("Root.ContentReview", array(
|
$fields->addFieldsToTab("Root.ContentReview", array(
|
||||||
$contentOwners,
|
$contentOwners,
|
||||||
$nextReviewAt->performReadonlyTransformation(),
|
$nextReviewAt->performReadonlyTransformation(),
|
||||||
@ -327,19 +341,6 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider
|
|||||||
return (bool)$nextDate;
|
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
|
* Check if a review is due by a member for this owner
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user