changeset = $changeset; return $this; } public function addButton($button) { $this->buttons[] = $button; return $this; } public function setRevisionID($revision_id) { $this->revisionID = $revision_id; return $this; } public function render() { require_celerity_resource('differential-changeset-view-css'); require_celerity_resource('syntax-highlighting-css'); if ($this->revisionID) { $edit = true; } else { $edit = false; } $changeset = $this->changeset; $class = 'differential-changeset'; if (!$edit) { $class .= ' differential-changeset-immutable'; } $display_filename = $changeset->getDisplayFilename(); $output = javelin_render_tag( 'div', array( 'sigil' => 'differential-changeset', 'meta' => array( 'left' => $this->changeset->getID(), 'right' => $this->changeset->getID(), ), 'class' => $class, ), phutil_render_tag( 'a', array( 'name' => $changeset->getAnchorName(), ), ''). implode('', $this->buttons). '

'.phutil_escape_html($display_filename).'

'. '
'. $this->renderChildren()); if ($edit) { Javelin::initBehavior( 'differential-edit-inline-comments', array( 'uri' => '/differential/comment/inline/edit/'.$this->revisionID.'/', )); } return $output; } }