Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/view/DifferentialChangesetListView.php
| Show First 20 Lines • Show All 192 Lines • ▼ Show 20 Lines | foreach ($changesets as $key => $changeset) { | ||||
| $changeset); | $changeset); | ||||
| $detail->setChangeset($changeset); | $detail->setChangeset($changeset); | ||||
| $detail->addButton($view_options); | $detail->addButton($view_options); | ||||
| $detail->setSymbolIndex(idx($this->symbolIndexes, $key)); | $detail->setSymbolIndex(idx($this->symbolIndexes, $key)); | ||||
| $detail->setVsChangesetID(idx($this->vsMap, $changeset->getID())); | $detail->setVsChangesetID(idx($this->vsMap, $changeset->getID())); | ||||
| $detail->setEditable(true); | $detail->setEditable(true); | ||||
| $detail->setRenderingRef($ref); | $detail->setRenderingRef($ref); | ||||
| $detail->setBranch($this->getBranch()); | |||||
| $detail->setRenderURI($this->renderURI); | $detail->setRenderURI($this->renderURI); | ||||
| $parser = $this->getParser(); | $parser = $this->getParser(); | ||||
| if ($parser) { | if ($parser) { | ||||
| $response = $parser->newChangesetResponse(); | $response = $parser->newChangesetResponse(); | ||||
| $detail->setChangesetResponse($response); | $detail->setChangesetResponse($response); | ||||
| } else { | } else { | ||||
| ▲ Show 20 Lines • Show All 49 Lines • ▼ Show 20 Lines | $this->initBehavior( | ||||
| 'isStandalone' => $this->getIsStandalone(), | 'isStandalone' => $this->getIsStandalone(), | ||||
| 'pht' => array( | 'pht' => array( | ||||
| 'Open in Editor' => pht('Open in Editor'), | 'Open in Editor' => pht('Open in Editor'), | ||||
| 'Show All Context' => pht('Show All Context'), | 'Show All Context' => pht('Show All Context'), | ||||
| 'All Context Shown' => pht('All Context Shown'), | 'All Context Shown' => pht('All Context Shown'), | ||||
| "Can't Toggle Unloaded File" => pht("Can't Toggle Unloaded File"), | "Can't Toggle Unloaded File" => pht("Can't Toggle Unloaded File"), | ||||
| 'Expand File' => pht('Expand File'), | 'Expand File' => pht('Expand File'), | ||||
| 'Collapse File' => pht('Collapse File'), | 'Collapse File' => pht('Collapse File'), | ||||
| 'Browse in Diffusion' => pht('Browse in Diffusion'), | 'Show Path in Repository' => pht('Show Path in Repository'), | ||||
| 'Show Directory in Repository' => pht('Show Directory in Repository'), | |||||
| 'View Standalone' => pht('View Standalone'), | 'View Standalone' => pht('View Standalone'), | ||||
| 'Show Raw File (Left)' => pht('Show Raw File (Left)'), | 'Show Raw File (Left)' => pht('Show Raw File (Left)'), | ||||
| 'Show Raw File (Right)' => pht('Show Raw File (Right)'), | 'Show Raw File (Right)' => pht('Show Raw File (Right)'), | ||||
| 'Configure Editor' => pht('Configure Editor'), | 'Configure Editor' => pht('Configure Editor'), | ||||
| 'Load Changes' => pht('Load Changes'), | 'Load Changes' => pht('Load Changes'), | ||||
| 'View Side-by-Side' => pht('View Side-by-Side'), | 'View Side-by-Side Diff' => pht('View Side-by-Side Diff'), | ||||
| 'View Unified' => pht('View Unified'), | 'View Unified Diff' => pht('View Unified Diff'), | ||||
| 'Change Text Encoding...' => pht('Change Text Encoding...'), | 'Change Text Encoding...' => pht('Change Text Encoding...'), | ||||
| 'Highlight As...' => pht('Highlight As...'), | 'Highlight As...' => pht('Highlight As...'), | ||||
| 'View As...' => pht('View As...'), | 'View As Document Type...' => pht('View As Document Type...'), | ||||
| 'Loading...' => pht('Loading...'), | 'Loading...' => pht('Loading...'), | ||||
| 'Editing Comment' => pht('Editing Comment'), | 'Editing Comment' => pht('Editing Comment'), | ||||
| 'Jump to next change.' => pht('Jump to next change.'), | 'Jump to next change.' => pht('Jump to next change.'), | ||||
| 'Jump to previous change.' => pht('Jump to previous change.'), | 'Jump to previous change.' => pht('Jump to previous change.'), | ||||
| 'Jump to next file.' => pht('Jump to next file.'), | 'Jump to next file.' => pht('Jump to next file.'), | ||||
| ▲ Show 20 Lines • Show All 60 Lines • ▼ Show 20 Lines | $this->initBehavior( | ||||
| pht('Finish editing inline comments before changing display modes.'), | pht('Finish editing inline comments before changing display modes.'), | ||||
| 'Open file in external editor.' => | 'Open file in external editor.' => | ||||
| pht('Open file in external editor.'), | pht('Open file in external editor.'), | ||||
| 'You must select a file to edit.' => | 'You must select a file to edit.' => | ||||
| pht('You must select a file to edit.'), | pht('You must select a file to edit.'), | ||||
| 'You must select a file to open.' => | |||||
| pht('You must select a file to open.'), | |||||
| 'No external editor is configured.' => | 'No external editor is configured.' => | ||||
| pht('No external editor is configured.'), | pht('No external editor is configured.'), | ||||
| 'Hide or show the paths panel.' => | |||||
| pht('Hide or show the paths panel.'), | |||||
| 'Show path in repository.' => | |||||
| pht('Show path in repository.'), | |||||
| 'Show directory in repository.' => | |||||
| pht('Show directory in repository.'), | |||||
| ), | ), | ||||
| )); | )); | ||||
| if ($this->header) { | if ($this->header) { | ||||
| $header = $this->header; | $header = $this->header; | ||||
| } else { | } else { | ||||
| $header = id(new PHUIHeaderView()) | $header = id(new PHUIHeaderView()) | ||||
| ->setHeader($this->getTitle()); | ->setHeader($this->getTitle()); | ||||
| Show All 29 Lines | private function renderViewOptionsDropdown( | ||||
| ); | ); | ||||
| if ($this->standaloneURI) { | if ($this->standaloneURI) { | ||||
| $uri = new PhutilURI($this->standaloneURI); | $uri = new PhutilURI($this->standaloneURI); | ||||
| $uri = $this->appendDefaultQueryParams($uri, $qparams); | $uri = $this->appendDefaultQueryParams($uri, $qparams); | ||||
| $meta['standaloneURI'] = (string)$uri; | $meta['standaloneURI'] = (string)$uri; | ||||
| } | } | ||||
| $repository = $this->repository; | |||||
| if ($repository) { | |||||
| try { | |||||
| $meta['diffusionURI'] = | |||||
| (string)$repository->getDiffusionBrowseURIForPath( | |||||
| $viewer, | |||||
| $changeset->getAbsoluteRepositoryPath($repository, $this->diff), | |||||
| idx($changeset->getMetadata(), 'line:first'), | |||||
| $this->getBranch()); | |||||
| } catch (DiffusionSetupException $e) { | |||||
| // Ignore | |||||
| } | |||||
| } | |||||
| $change = $changeset->getChangeType(); | $change = $changeset->getChangeType(); | ||||
| if ($this->leftRawFileURI) { | if ($this->leftRawFileURI) { | ||||
| if ($change != DifferentialChangeType::TYPE_ADD) { | if ($change != DifferentialChangeType::TYPE_ADD) { | ||||
| $uri = new PhutilURI($this->leftRawFileURI); | $uri = new PhutilURI($this->leftRawFileURI); | ||||
| $uri = $this->appendDefaultQueryParams($uri, $qparams); | $uri = $this->appendDefaultQueryParams($uri, $qparams); | ||||
| $meta['leftURI'] = (string)$uri; | $meta['leftURI'] = (string)$uri; | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 44 Lines • Show Last 20 Lines | |||||