/** * @return FieldSet */ public function getWorkflowCMSFields() { $fields = new FieldSet(); $diffLinkTitle = _t('SiteTreeCMSWorkflow.DIFFERENCESLINK', 'Show differences to live'); // list all closed requests $fields->push(new HeaderField('WorkflowClosedRequestsHeader', _t('SiteTreeCMSWorkflow.CLOSEDREQUESTSHEADER', 'Closed Requests'))); $closedRequests = $this->ClosedWorkflowRequests(); // $_REQUEST['showqueries']=1; $closedRequestsTF = new ComplexTableField($this, 'ClosedWorkflowRequests', 'WorkflowRequest', array('Created' => singleton('WorkflowRequest')->fieldLabel('Created'), 'StatusDescription' => singleton('WorkflowRequest')->fieldLabel('Status'), 'Author.Title' => singleton('WorkflowRequest')->fieldLabel('Author'), 'DiffLinkToLastPublished' => _t('SiteTreeCMSWorkflow.DIFFERENCESCOLUMN', 'Differences'))); $closedRequestsTF->setPermissions(array('show')); $closedRequestsTF->setFieldFormatting(array("DiffLinkToLastPublished" => '<a href=\\"$value\\" target=\\"_blank\\" class=\\"externallink\\">' . $diffLinkTitle . '</a>')); $closedRequestsTF->setFieldCasting(array('Created' => 'SS_Datetime->Full')); $closedRequestsTF->setCustomSourceItems($closedRequests); $fields->push($closedRequestsTF); return $fields; }