Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/engine/DifferentialFileTreeEngine.php
| Show All 37 Lines | public function getChangesets() { | ||||
| return $this->changesets; | return $this->changesets; | ||||
| } | } | ||||
| public function newView($content) { | public function newView($content) { | ||||
| if ($this->getDisabled()) { | if ($this->getDisabled()) { | ||||
| return $content; | return $content; | ||||
| } | } | ||||
| require_celerity_resource('diff-tree-view-css'); | |||||
| $width = $this->getWidth(); | $width = $this->getWidth(); | ||||
| $is_visible = $this->getIsVisible(); | $is_visible = $this->getIsVisible(); | ||||
| $formation_view = new PHUIFormationView(); | $formation_view = new PHUIFormationView(); | ||||
| $flank_view = $formation_view->newFlankColumn() | $flank_view = $formation_view->newFlankColumn() | ||||
| ->setHeaderText(pht('Affected Paths')) | ->setHeaderText(pht('Paths')) | ||||
| ->setIsResizable(true) | ->setIsResizable(true) | ||||
| ->setIsFixed(true) | ->setIsFixed(true) | ||||
| ->setIsVisible($is_visible) | ->setIsVisible($is_visible) | ||||
| ->setWidth($width) | ->setWidth($width) | ||||
| ->setMinimumWidth($this->getMinimumWidth()) | ->setMinimumWidth($this->getMinimumWidth()) | ||||
| ->setMaximumWidth($this->getMaximumWidth()); | ->setMaximumWidth($this->getMaximumWidth()); | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| if ($viewer->isLoggedIn()) { | if ($viewer->isLoggedIn()) { | ||||
| $flank_view | $flank_view | ||||
| ->setExpanderTooltip(pht('Show Paths Panel')) | |||||
| ->setVisibleSettingKey($this->getVisibleSettingKey()) | ->setVisibleSettingKey($this->getVisibleSettingKey()) | ||||
| ->setWidthSettingKey($this->getWidthSettingKey()); | ->setWidthSettingKey($this->getWidthSettingKey()); | ||||
| } | } | ||||
| $flank_view->setHead( | $head_view = id(new PHUIListView()) | ||||
| array( | ->addMenuItem( | ||||
| phutil_tag('div', array(), | id(new PHUIListItemView()) | ||||
| array( | ->setIcon('fa-list') | ||||
| id(new PHUIIconView())->setIcon('fa-list'), | ->setName(pht('Table of Contents')) | ||||
| pht('Table of Contents'), | ->setKeyCommand('t') | ||||
| '[t]', | ->setHref('#')); | ||||
| )), | $flank_view->setHead($head_view); | ||||
| )); | |||||
| $tail_view = id(new PHUIListView()) | |||||
| $flank_view->setBody( | ->addMenuItem( | ||||
| phutil_tag( | id(new PHUIListItemView()) | ||||
| 'div', | ->setIcon('fa-chevron-left') | ||||
| array( | ->setName(pht('Hide Panel')) | ||||
| 'class' => 'phui-flank-loading', | ->setKeyCommand('f') | ||||
| ), | ->setHref('#')) | ||||
| pht('Loading...'))); | ->addMenuItem( | ||||
| id(new PHUIListItemView()) | |||||
| $flank_view->setTail( | ->setIcon('fa-keyboard-o') | ||||
| array( | ->setName(pht('Keyboard Reference')) | ||||
| phutil_tag('div', array(), | ->setKeyCommand('?') | ||||
| array( | ->setHref('#')); | ||||
| id(new PHUIIconView())->setIcon('fa-chevron-left'), | $flank_view->setTail($tail_view); | ||||
| pht('Hide Panel'), | |||||
| '[f]', | |||||
| )), | |||||
| phutil_tag( | |||||
| 'div', | |||||
| array(), | |||||
| array( | |||||
| id(new PHUIIconView())->setIcon('fa-keyboard-o'), | |||||
| pht('Keyboard Reference'), | |||||
| '[?]', | |||||
| )), | |||||
| )); | |||||
| $main_column = $formation_view->newContentColumn() | $main_column = $formation_view->newContentColumn() | ||||
| ->appendChild($content); | ->appendChild($content); | ||||
| return $formation_view; | return $formation_view; | ||||
| } | } | ||||
| private function getVisibleSettingKey() { | private function getVisibleSettingKey() { | ||||
| ▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines | |||||