diff --git a/code/extensions/SiteTreeContentReview.php b/code/extensions/SiteTreeContentReview.php index 004e614..472b543 100644 --- a/code/extensions/SiteTreeContentReview.php +++ b/code/extensions/SiteTreeContentReview.php @@ -25,6 +25,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider "NextReviewDate" => "Date", "LastEditedByName" => "Varchar(255)", "OwnerNames" => "Varchar(255)", + "ReviewInfo" => "Text" ); /** @@ -126,13 +127,22 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider "" ); + if (strlen($this->owner->ReviewInfo) > 0) { + $reviewInfo = LiteralField::create( + "ReviewContentInfo", + "

" . $this->owner->ReviewInfo . "

" + ); + } else { + $reviewInfo = ''; + } + $ReviewNotes = LiteralField::create("ReviewNotes", ""); $quickReviewAction = FormAction::create("savereview", _t("ContentReview.MARKREVIEWED", "Mark as reviewed")) ->setAttribute("data-icon", "pencil") ->setAttribute("data-text-alternate", _t("ContentReview.MARKREVIEWED", "Mark as reviewed")); - $allFields = CompositeField::create($reviewTitle, $ReviewNotes, $quickReviewAction) + $allFields = CompositeField::create($reviewTitle, $reviewInfo, $ReviewNotes, $quickReviewAction) ->addExtraClass('review-notes field'); $reviewTab = Tab::create('ReviewContent', $allFields); @@ -383,6 +393,8 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider ->addExtraClass('custom-setting') ->setDescription(_t("ContentReview.REVIEWFREQUENCYDESCRIPTION", "The review date will be set to this far in the future whenever the page is published")); + $reviewInfoField = TextareaField::create("ReviewInfo", _t("ContentReview.REVIEWINFO", "Review information")); + $notesField = GridField::create("ReviewNotes", "Review Notes", $this->owner->ReviewLogs(), GridFieldConfig_RecordEditor::create()); $fields->addFieldsToTab("Root.ContentReview", array( @@ -395,6 +407,7 @@ class SiteTreeContentReview extends DataExtension implements PermissionProvider $reviewFrequency )->addExtraClass("review-settings"), ReadonlyField::create("ROContentOwners", _t("ContentReview.CONTENTOWNERS", "Content Owners"), $this->getOwnerNames()), + $reviewInfoField, $notesField, )); }