Differential D20422 Diff 48775 src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/management/DiffusionRepositoryBranchesManagementPanel.php
| Show All 30 Lines | public function getManagementPanelIcon() { | ||||
| } else { | } else { | ||||
| return 'fa-code-fork grey'; | return 'fa-code-fork grey'; | ||||
| } | } | ||||
| } | } | ||||
| protected function getEditEngineFieldKeys() { | protected function getEditEngineFieldKeys() { | ||||
| return array( | return array( | ||||
| 'defaultBranch', | 'defaultBranch', | ||||
| 'fetchRefs', | |||||
| 'trackOnly', | 'trackOnly', | ||||
| 'autocloseOnly', | 'autocloseOnly', | ||||
| ); | ); | ||||
| } | } | ||||
| public function buildManagementPanelCurtain() { | public function buildManagementPanelCurtain() { | ||||
| $repository = $this->getRepository(); | $repository = $this->getRepository(); | ||||
| $viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
| Show All 26 Lines | public function buildManagementPanelContent() { | ||||
| $view = id(new PHUIPropertyListView()) | $view = id(new PHUIPropertyListView()) | ||||
| ->setViewer($viewer); | ->setViewer($viewer); | ||||
| $default_branch = nonempty( | $default_branch = nonempty( | ||||
| $repository->getDetail('default-branch'), | $repository->getDetail('default-branch'), | ||||
| phutil_tag('em', array(), $repository->getDefaultBranch())); | phutil_tag('em', array(), $repository->getDefaultBranch())); | ||||
| $view->addProperty(pht('Default Branch'), $default_branch); | $view->addProperty(pht('Default Branch'), $default_branch); | ||||
| if ($repository->supportsFetchRules()) { | |||||
| $fetch_only = $repository->getFetchRules(); | |||||
| if ($fetch_only) { | |||||
| $fetch_display = implode(', ', $fetch_only); | |||||
| } else { | |||||
| $fetch_display = phutil_tag('em', array(), pht('Fetch All Refs')); | |||||
| } | |||||
| $view->addProperty(pht('Fetch Refs'), $fetch_display); | |||||
| } | |||||
| $track_only_rules = $repository->getTrackOnlyRules(); | $track_only_rules = $repository->getTrackOnlyRules(); | ||||
| $track_only_rules = implode(', ', $track_only_rules); | $track_only_rules = implode(', ', $track_only_rules); | ||||
| $track_only = nonempty( | $track_only = nonempty( | ||||
| $track_only_rules, | $track_only_rules, | ||||
| phutil_tag('em', array(), pht('Track All Branches'))); | phutil_tag('em', array(), pht('Track All Branches'))); | ||||
| $view->addProperty(pht('Track Only'), $track_only); | $view->addProperty(pht('Track Only'), $track_only); | ||||
| $autoclose_rules = $repository->getAutocloseOnlyRules(); | $autoclose_rules = $repository->getAutocloseOnlyRules(); | ||||
| ▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines | |||||