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 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) { if (empty($action['href'])) { $tag = 'span'; } else { $tag = 'a'; } $name = $action['name']; unset($action['name']); $actions[] = javelin_render_tag( $tag, $action, phutil_escape_html($name)); } $actions = implode("\n", $actions); return '
'. '
'. $actions. '
'. '
'. '

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

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