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) {
$obj = new AphrontHeadsupActionView();
$obj->setName($action['name']);
$obj->setURI(idx($action, 'href'));
$obj->setWorkflow(idx($action, 'sigil') == 'workflow');
$obj->setClass(idx($action, 'class'));
$actions[] = $obj;
}
$action_list = new AphrontHeadsupActionListView();
$action_list->setActions($actions);
return
''.
$action_list->render().
'
'.
'
'.phutil_escape_html($revision->getTitle()).'
'.
$properties.
''.
'
'.
'
';
}
}