mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-15 03:12:41 +01:00
352d9f6b06
Summary: Ref T4986. Getting closer. Nothing out of the ordinary in this group. Test Plan: For each application: - Viewed the normal search results. - Created a panel version and viewed it. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T4986 Differential Revision: https://secure.phabricator.com/D9024
49 lines
1.2 KiB
PHP
49 lines
1.2 KiB
PHP
<?php
|
|
|
|
final class HeraldTranscriptListController extends HeraldController {
|
|
|
|
private $queryKey;
|
|
|
|
public function buildSideNavView($for_app = false) {
|
|
$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());
|
|
|
|
$nav->selectFilter(null);
|
|
|
|
return $nav;
|
|
}
|
|
|
|
public function buildApplicationCrumbs() {
|
|
$crumbs = parent::buildApplicationCrumbs();
|
|
|
|
$crumbs->addTextCrumb(
|
|
pht('Transcripts'),
|
|
$this->getApplicationURI('transcript/'));
|
|
return $crumbs;
|
|
}
|
|
|
|
public function willProcessRequest(array $data) {
|
|
$this->queryKey = idx($data, 'queryKey');
|
|
}
|
|
|
|
public function processRequest() {
|
|
$request = $this->getRequest();
|
|
$controller = id(new PhabricatorApplicationSearchController($request))
|
|
->setQueryKey($this->queryKey)
|
|
->setSearchEngine(new HeraldTranscriptSearchEngine())
|
|
->setNavigation($this->buildSideNavView());
|
|
|
|
return $this->delegateToController($controller);
|
|
}
|
|
|
|
}
|