revision = $revision; return $this; } public function setProperties(array $properties) { $this->properties = $properties; return $this; } public function setActions(array $actions) { $this->actions = $actions; return $this; } public function setUser($user) { $this->user = $user; return $this; } public function render() { require_celerity_resource('differential-core-view-css'); require_celerity_resource('differential-revision-detail-css'); $revision = $this->revision; $rows = array(); foreach ($this->properties as $key => $field) { $rows[] = ''. ''.phutil_escape_html($key).':'. ''.$field.''. ''; } $properties = ''. implode("\n", $rows). '
'; $actions = array(); foreach ($this->actions as $action) { $obj = new AphrontHeadsupActionView(); $obj->setName($action['name']); $obj->setURI(idx($action, 'href')); $obj->setWorkflow(idx($action, 'sigil') == 'workflow'); $obj->setClass(idx($action, 'class')); $obj->setInstant(idx($action, 'instant')); $obj->setUser($this->user); $actions[] = $obj; } $action_list = new AphrontHeadsupActionListView(); $action_list->setActions($actions); return '
'. $action_list->render(). '
'. id(new AphrontKeyboardShortcutsAvailableView())->render(). '
'. '
'. '

'. ''. phutil_escape_html('D'.$revision->getID()). ''. ' '. phutil_escape_html($revision->getTitle()).'

'. $properties. '
'. '
'. '
'; } }