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'; } $buttons = null; if ($this->buttons) { $buttons = '
'; } $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(), ), ''). $buttons. '