Differential D21769 Diff 51905 src/applications/diffusion/management/DiffusionRepositoryURIsManagementPanel.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/management/DiffusionRepositoryURIsManagementPanel.php
Show First 20 Lines • Show All 124 Lines • ▼ Show 20 Lines | $table = id(new AphrontTableView($rows)) | ||||
null, | null, | ||||
)); | )); | ||||
$is_new = $repository->isNewlyInitialized(); | $is_new = $repository->isNewlyInitialized(); | ||||
$messages = array(); | $messages = array(); | ||||
if ($repository->isHosted()) { | if ($repository->isHosted()) { | ||||
if ($is_new) { | if ($is_new) { | ||||
$host_message = pht('Phabricator will host this repository.'); | $host_message = pht('This repository will be hosted.'); | ||||
} else { | } else { | ||||
$host_message = pht('Phabricator is hosting this repository.'); | $host_message = pht('This repository is observed.'); | ||||
} | } | ||||
$messages[] = $host_message; | $messages[] = $host_message; | ||||
} else { | } else { | ||||
if ($is_new) { | if ($is_new) { | ||||
$observe_message = pht( | $observe_message = pht( | ||||
'Phabricator will observe a remote repository.'); | 'This repository will be observed.'); | ||||
} else { | } else { | ||||
$observe_message = pht( | $observe_message = pht( | ||||
'This repository is hosted remotely. Phabricator is observing it.'); | 'This remote repository is being observed.'); | ||||
} | } | ||||
$messages[] = $observe_message; | $messages[] = $observe_message; | ||||
} | } | ||||
$info_view = id(new PHUIInfoView()) | $info_view = id(new PHUIInfoView()) | ||||
->setSeverity(PHUIInfoView::SEVERITY_NOTICE) | ->setSeverity(PHUIInfoView::SEVERITY_NOTICE) | ||||
->setErrors($messages); | ->setErrors($messages); | ||||
$box = $this->newBox(pht('Repository URIs'), $table); | $box = $this->newBox(pht('Repository URIs'), $table); | ||||
return array($info_view, $box); | return array($info_view, $box); | ||||
} | } | ||||
} | } |