mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 02:02:41 +01:00
00604dff45
Summary: Runs through Releeph to move to new UI and `newPage` Test Plan: Ran through product, release, branch, everything seems to work. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D15623
37 lines
922 B
PHP
37 lines
922 B
PHP
<?php
|
|
|
|
abstract class ReleephController 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('project/create/', pht('Create Product'));
|
|
}
|
|
|
|
id(new ReleephProductSearchEngine())
|
|
->setViewer($user)
|
|
->addNavigationItems($nav->getMenu());
|
|
|
|
$nav->selectFilter(null);
|
|
|
|
return $nav;
|
|
}
|
|
|
|
public function buildApplicationMenu() {
|
|
return $this->buildSideNavView(true)->getMenu();
|
|
}
|
|
|
|
|
|
protected function getProductViewURI(ReleephProject $product) {
|
|
return $this->getApplicationURI('project/'.$product->getID().'/');
|
|
}
|
|
|
|
protected function getBranchViewURI(ReleephBranch $branch) {
|
|
return $this->getApplicationURI('branch/'.$branch->getID().'/');
|
|
}
|
|
|
|
}
|