diff --git a/src/applications/herald/controller/HeraldController.php b/src/applications/herald/controller/HeraldController.php --- a/src/applications/herald/controller/HeraldController.php +++ b/src/applications/herald/controller/HeraldController.php @@ -18,24 +18,19 @@ return $crumbs; } - 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('new', pht('Create Rule')); - } - id(new HeraldRuleSearchEngine()) - ->setViewer($user) + ->setViewer($viewer) ->addNavigationItems($nav->getMenu()); - $nav - ->addLabel(pht('Utilities')) - ->addFilter('test', pht('Test Console')) - ->addFilter('transcript', pht('Transcripts')); + $nav->addLabel(pht('Utilities')) + ->addFilter('test', pht('Test Console')) + ->addFilter('transcript', pht('Transcripts')); $nav->selectFilter(null); diff --git a/src/applications/herald/controller/HeraldNewController.php b/src/applications/herald/controller/HeraldNewController.php --- a/src/applications/herald/controller/HeraldNewController.php +++ b/src/applications/herald/controller/HeraldNewController.php @@ -206,13 +206,14 @@ ->buildApplicationCrumbs() ->addTextCrumb(pht('Create Rule')); - return $this->buildApplicationPage( - array( - $crumbs, - $form_box, - ), - array( - 'title' => pht('Create Herald Rule'), + $title = pht('Create Herald Rule'); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild( + array( + $form_box, )); } diff --git a/src/applications/herald/controller/HeraldRuleController.php b/src/applications/herald/controller/HeraldRuleController.php --- a/src/applications/herald/controller/HeraldRuleController.php +++ b/src/applications/herald/controller/HeraldRuleController.php @@ -247,13 +247,14 @@ ->buildApplicationCrumbs() ->addTextCrumb($title); - return $this->buildApplicationPage( - array( - $crumbs, - $form_box, - ), - array( - 'title' => pht('Edit Rule'), + $title = pht('Edit Rule'); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild( + array( + $form_box, )); } diff --git a/src/applications/herald/controller/HeraldRuleViewController.php b/src/applications/herald/controller/HeraldRuleViewController.php --- a/src/applications/herald/controller/HeraldRuleViewController.php +++ b/src/applications/herald/controller/HeraldRuleViewController.php @@ -49,14 +49,15 @@ new HeraldTransactionQuery()); $timeline->setShouldTerminate(true); - return $this->buildApplicationPage( - array( - $crumbs, - $object_box, - $timeline, - ), - array( - 'title' => $rule->getName(), + $title = $rule->getName(); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild( + array( + $object_box, + $timeline, )); } diff --git a/src/applications/herald/controller/HeraldTestConsoleController.php b/src/applications/herald/controller/HeraldTestConsoleController.php --- a/src/applications/herald/controller/HeraldTestConsoleController.php +++ b/src/applications/herald/controller/HeraldTestConsoleController.php @@ -102,19 +102,19 @@ ->setFormErrors($errors) ->setForm($form); - $nav = $this->buildSideNavView(); - $nav->selectFilter('test'); - $nav->appendChild($box); - $crumbs = id($this->buildApplicationCrumbs()) ->addTextCrumb(pht('Test Console')); - $nav->setCrumbs($crumbs); - return $this->buildApplicationPage( - $nav, - array( - 'title' => pht('Test Console'), + $title = pht('Test Console'); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild( + array( + $box, )); + } } diff --git a/src/applications/herald/controller/HeraldTranscriptController.php b/src/applications/herald/controller/HeraldTranscriptController.php --- a/src/applications/herald/controller/HeraldTranscriptController.php +++ b/src/applications/herald/controller/HeraldTranscriptController.php @@ -81,13 +81,14 @@ $this->getApplicationURI('/transcript/')) ->addTextCrumb($xscript->getID()); - return $this->buildApplicationPage( - array( - $crumbs, - $content, - ), - array( - 'title' => pht('Transcript'), + $title = pht('Transcript'); + + return $this->newPage() + ->setTitle($title) + ->setCrumbs($crumbs) + ->appendChild( + array( + $content, )); } diff --git a/src/applications/herald/controller/HeraldTranscriptListController.php b/src/applications/herald/controller/HeraldTranscriptListController.php --- a/src/applications/herald/controller/HeraldTranscriptListController.php +++ b/src/applications/herald/controller/HeraldTranscriptListController.php @@ -2,16 +2,12 @@ final class HeraldTranscriptListController extends HeraldController { - public function buildSideNavView($for_app = false) { + public function buildSideNavView() { $user = $this->getRequest()->getUser(); $nav = new AphrontSideNavFilterView(); $nav->setBaseURI(new PhutilURI($this->getApplicationURI())); - if ($for_app) { - $nav->addFilter('new', pht('Create Rule')); - } - id(new HeraldTranscriptSearchEngine()) ->setViewer($user) ->addNavigationItems($nav->getMenu()); @@ -31,14 +27,9 @@ } public function handleRequest(AphrontRequest $request) { - $querykey = $request->getURIData('queryKey'); - - $controller = id(new PhabricatorApplicationSearchController()) - ->setQueryKey($querykey) - ->setSearchEngine(new HeraldTranscriptSearchEngine()) - ->setNavigation($this->buildSideNavView()); - - return $this->delegateToController($controller); + return id(new HeraldTranscriptSearchEngine()) + ->setController($this) + ->buildResponse(); } } diff --git a/src/applications/herald/query/HeraldTranscriptSearchEngine.php b/src/applications/herald/query/HeraldTranscriptSearchEngine.php --- a/src/applications/herald/query/HeraldTranscriptSearchEngine.php +++ b/src/applications/herald/query/HeraldTranscriptSearchEngine.php @@ -76,7 +76,7 @@ protected function getBuiltinQueryNames() { return array( - 'all' => pht('All'), + 'all' => pht('All Transcripts'), ); }