Activate the new Repository creation workflow
Summary: Ref T2231. This: - Activates the new multi-step workflow, and exposes it in the UI. - Adds "can create", "default view" and "default edit" capabilities. - Provides a default value for `repository.default-local-path` and forces repositories into it by default. It's still editable, but Phabricator gets it correct (for some definition of correct) by default now. Test Plan: Created some new repositories with the new workflow. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T1286, T2231 Differential Revision: https://secure.phabricator.com/D7413
This commit is contained in:
@@ -90,7 +90,6 @@ final class DiffusionRepositoryListController extends DiffusionController
|
||||
$nav = new AphrontSideNavFilterView();
|
||||
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
||||
|
||||
|
||||
id(new PhabricatorRepositorySearchEngine())
|
||||
->setViewer($viewer)
|
||||
->addNavigationItems($nav->getMenu());
|
||||
@@ -100,6 +99,22 @@ final class DiffusionRepositoryListController extends DiffusionController
|
||||
return $nav;
|
||||
}
|
||||
|
||||
public function buildApplicationCrumbs() {
|
||||
$crumbs = parent::buildApplicationCrumbs();
|
||||
|
||||
$can_create = $this->hasApplicationCapability(
|
||||
DiffusionCapabilityCreateRepositories::CAPABILITY);
|
||||
|
||||
$crumbs->addAction(
|
||||
id(new PHUIListItemView())
|
||||
->setName(pht('Import Repository'))
|
||||
->setHref($this->getApplicationURI('/create/'))
|
||||
->setDisabled(!$can_create)
|
||||
->setIcon('create'));
|
||||
|
||||
return $crumbs;
|
||||
}
|
||||
|
||||
private function buildShortcuts() {
|
||||
$shortcuts = id(new PhabricatorRepositoryShortcut())->loadAll();
|
||||
if ($shortcuts) {
|
||||
|
||||
Reference in New Issue
Block a user