Provide more UI guidance when creating repositories

Summary: Ref T10923. Walk users through the "create, configure, activate" workflow a little better and set expectations more clearly.

Test Plan:
  - Created a new repository, saw new UI help.
  - Activated repository, saw onboarding help disappear.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10923

Differential Revision: https://secure.phabricator.com/D15875
This commit is contained in:
epriestley
2016-05-10 05:54:16 -07:00
parent 0b5ab2330d
commit f05fce44aa
6 changed files with 83 additions and 5 deletions

View File

@@ -47,7 +47,24 @@ final class DiffusionRepositoryEditActivateController
$submit = pht('Deactivate Repository');
} else {
$title = pht('Activate Repository');
$body = pht('Activate this repository?');
$is_new = $repository->isNewlyInitialized();
if ($is_new) {
if ($repository->isHosted()) {
$body = pht(
'This repository will become a new hosted repository. '.
'It will begin serving read and write traffic.');
} else {
$body = pht(
'This repository will observe an existing remote repository. '.
'It will begin fetching changes from the remote.');
}
} else {
$body = pht(
'This repository will resume updates, observation, mirroring, '.
'and serving any configured read and write traffic.');
}
$submit = pht('Activate Repository');
}