diff --git a/src/applications/maniphest/controller/ManiphestController.php b/src/applications/maniphest/controller/ManiphestController.php index 87eaf69706..b65811128d 100644 --- a/src/applications/maniphest/controller/ManiphestController.php +++ b/src/applications/maniphest/controller/ManiphestController.php @@ -6,21 +6,17 @@ abstract class ManiphestController extends PhabricatorController { return $this->buildSideNavView(true)->getMenu(); } - public function buildSideNavView($for_app = false) { - $user = $this->getRequest()->getUser(); + public function buildSideNavView() { + $viewer = $this->getViewer(); $nav = new AphrontSideNavFilterView(); $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); - if ($for_app) { - $nav->addFilter('task/create/', pht('Create Task')); - } - id(new ManiphestTaskSearchEngine()) - ->setViewer($user) + ->setViewer($viewer) ->addNavigationItems($nav->getMenu()); - if ($user->isLoggedIn()) { + if ($viewer->isLoggedIn()) { // For now, don't give logged-out users access to reports. $nav->addLabel(pht('Reports')); $nav->addFilter('report', pht('Reports')); diff --git a/src/applications/maniphest/controller/ManiphestTaskDetailController.php b/src/applications/maniphest/controller/ManiphestTaskDetailController.php index 090bdb9bb7..d5fab7f9f5 100644 --- a/src/applications/maniphest/controller/ManiphestTaskDetailController.php +++ b/src/applications/maniphest/controller/ManiphestTaskDetailController.php @@ -349,19 +349,23 @@ final class ManiphestTaskDetailController extends ManiphestController { $object_box->addPropertyList($description); } - return $this->buildApplicationPage( - array( - $crumbs, - $info_view, - $object_box, - $timeline, - $comment_box, - $preview_panel, - ), - array( - 'title' => 'T'.$task->getID().' '.$task->getTitle(), - 'pageObjects' => array($task->getPHID()), - )); + $title = 'T'.$task->getID().' '.$task->getTitle(); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->setPageObjectPHIDs( + array( + $task->getPHID(), + )) + ->appendChild( + array( + $info_view, + $object_box, + $timeline, + $comment_box, + $preview_panel, + )); } private function buildHeaderView(ManiphestTask $task) { diff --git a/src/applications/maniphest/controller/ManiphestTaskEditController.php b/src/applications/maniphest/controller/ManiphestTaskEditController.php index 5c4a3b4862..e9ce5a567a 100644 --- a/src/applications/maniphest/controller/ManiphestTaskEditController.php +++ b/src/applications/maniphest/controller/ManiphestTaskEditController.php @@ -741,16 +741,17 @@ final class ManiphestTaskEditController extends ManiphestController { $crumbs->addTextCrumb($header_name); - return $this->buildApplicationPage( - array( - $crumbs, - $form_box, - $preview, - ), - array( - 'title' => $header_name, - 'pageObjects' => $page_objects, - )); + $title = $header_name; + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->setPageObjectPHIDs($page_objects) + ->appendChild( + array( + $form_box, + $preview, + )); } }