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 setSymbolIndex($symbol_index) { $this->symbolIndex = $symbol_index; 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 = '
'. implode('', $this->buttons). '
'; } $id = celerity_generate_unique_node_id(); if ($this->symbolIndex) { Javelin::initBehavior( 'repository-crossreference', array( 'container' => $id, ) + $this->symbolIndex); } $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, 'id' => $id, ), phutil_render_tag( 'a', array( 'name' => $changeset->getAnchorName(), ), ''). $buttons. '

'.phutil_escape_html($display_filename).'

'. '
'. $this->renderChildren()); return $output; } }