mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-01 11:12:42 +01:00
b574b3ff8e
Summary: Ref T2715. I stripped a bunch of stuff from the list since it was buggy, slow, or both. Some day, we'll rebuild it. Test Plan: {F51128} Reviewers: btrahan, chad Reviewed By: btrahan CC: aran Maniphest Tasks: T2715 Differential Revision: https://secure.phabricator.com/D6525
36 lines
850 B
PHP
36 lines
850 B
PHP
<?php
|
|
|
|
abstract class PhabricatorProjectController extends PhabricatorController {
|
|
|
|
public function buildSideNavView($for_app = false) {
|
|
$user = $this->getRequest()->getUser();
|
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
|
|
|
if ($for_app) {
|
|
$nav->addFilter('create', pht('Create Project'));
|
|
}
|
|
|
|
id(new PhabricatorProjectSearchEngine())
|
|
->setViewer($user)
|
|
->addNavigationItems($nav->getMenu());
|
|
|
|
$nav->selectFilter(null);
|
|
|
|
return $nav;
|
|
}
|
|
|
|
public function buildApplicationCrumbs() {
|
|
$crumbs = parent::buildApplicationCrumbs();
|
|
|
|
$crumbs->addAction(
|
|
id(new PHUIListItemView())
|
|
->setName(pht('Create Project'))
|
|
->setHref($this->getApplicationURI('create/'))
|
|
->setIcon('create'));
|
|
|
|
return $crumbs;
|
|
}
|
|
|
|
}
|