Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/view/DifferentialChangesetListView.php
| <?php | <?php | ||||
| final class DifferentialChangesetListView extends AphrontView { | final class DifferentialChangesetListView extends AphrontView { | ||||
| private $changesets = array(); | private $changesets = array(); | ||||
| private $visibleChangesets = array(); | private $visibleChangesets = array(); | ||||
| private $references = array(); | private $references = array(); | ||||
| private $inlineURI; | private $inlineURI; | ||||
| private $renderURI = '/differential/changeset/'; | private $renderURI = '/differential/changeset/'; | ||||
| private $whitespace; | private $whitespace; | ||||
| private $background; | private $background; | ||||
| private $header; | |||||
| private $standaloneURI; | private $standaloneURI; | ||||
| private $leftRawFileURI; | private $leftRawFileURI; | ||||
| private $rightRawFileURI; | private $rightRawFileURI; | ||||
| private $symbolIndexes = array(); | private $symbolIndexes = array(); | ||||
| private $repository; | private $repository; | ||||
| private $branch; | private $branch; | ||||
| ▲ Show 20 Lines • Show All 93 Lines • ▼ Show 20 Lines | public function setRawFileURIs($l, $r) { | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setBackground($background) { | public function setBackground($background) { | ||||
| $this->background = $background; | $this->background = $background; | ||||
| return $this; | return $this; | ||||
| } | } | ||||
| public function setHeader($header) { | |||||
| $this->header = $header; | |||||
| return $this; | |||||
| } | |||||
| public function render() { | public function render() { | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| $this->requireResource('differential-changeset-view-css'); | $this->requireResource('differential-changeset-view-css'); | ||||
| $changesets = $this->changesets; | $changesets = $this->changesets; | ||||
| Javelin::initBehavior('differential-toggle-files', array( | Javelin::initBehavior('differential-toggle-files', array( | ||||
| ▲ Show 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | public function render() { | ||||
| if ($this->inlineURI) { | if ($this->inlineURI) { | ||||
| Javelin::initBehavior('differential-edit-inline-comments', array( | Javelin::initBehavior('differential-edit-inline-comments', array( | ||||
| 'uri' => $this->inlineURI, | 'uri' => $this->inlineURI, | ||||
| 'stage' => 'differential-review-stage', | 'stage' => 'differential-review-stage', | ||||
| 'revealIcon' => hsprintf('%s', new PHUIDiffRevealIconView()), | 'revealIcon' => hsprintf('%s', new PHUIDiffRevealIconView()), | ||||
| )); | )); | ||||
| } | } | ||||
| if ($this->header) { | |||||
| $header = $this->header; | |||||
| } else { | |||||
| $header = id(new PHUIHeaderView()) | $header = id(new PHUIHeaderView()) | ||||
| ->setHeader($this->getTitle()); | ->setHeader($this->getTitle()); | ||||
| } | |||||
| $content = phutil_tag( | $content = phutil_tag( | ||||
| 'div', | 'div', | ||||
| array( | array( | ||||
| 'class' => 'differential-review-stage', | 'class' => 'differential-review-stage', | ||||
| 'id' => 'differential-review-stage', | 'id' => 'differential-review-stage', | ||||
| ), | ), | ||||
| $output); | $output); | ||||
| $object_box = id(new PHUIObjectBoxView()) | $object_box = id(new PHUIObjectBoxView()) | ||||
| ->setHeader($header) | ->setHeader($header) | ||||
| ->setCollapsed(true) | |||||
| ->setBackground($this->background) | ->setBackground($this->background) | ||||
| ->setCollapsed(true) | |||||
| ->appendChild($content); | ->appendChild($content); | ||||
| return $object_box; | return $object_box; | ||||
| } | } | ||||
| private function renderViewOptionsDropdown( | private function renderViewOptionsDropdown( | ||||
| DifferentialChangesetDetailView $detail, | DifferentialChangesetDetailView $detail, | ||||
| $ref, | $ref, | ||||
| ▲ Show 20 Lines • Show All 78 Lines • Show Last 20 Lines | |||||