Use ApplicationSearch in projects

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
This commit is contained in:
epriestley
2013-07-22 08:34:35 -07:00
parent 7cbe82d777
commit b574b3ff8e
6 changed files with 161 additions and 150 deletions

View File

@@ -2,23 +2,22 @@
abstract class PhabricatorProjectController extends PhabricatorController {
public function buildSideNavView($filter = null, $for_app = false) {
public function buildSideNavView($for_app = false) {
$user = $this->getRequest()->getUser();
$nav = new AphrontSideNavFilterView();
$nav
->setBaseURI(new PhutilURI('/project/filter/'))
->addLabel(pht('User'))
->addFilter('active', pht('Active'))
->addLabel(pht('All'))
->addFilter('all', pht('All Projects'))
->addFilter('allactive', pht('Active Projects'))
->selectFilter($filter, 'active');
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
if ($for_app) {
$nav->addFilter('create/', pht('Create Project'));
$nav->addFilter('create', pht('Create Project'));
}
id(new PhabricatorProjectSearchEngine())
->setViewer($user)
->addNavigationItems($nav->getMenu());
$nav->selectFilter(null);
return $nav;
}