mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-23 12:09:12 +01:00
Summary: Ref T7584. In Conpherence main view, this adds a "search" link right in the "Rooms" header. This piece addresses an outstanding item on T7584. This diff also adds a search button in the durable column that takes you to the application search. This kind of a big product bet that rooms are going to be dominating things and its most useful to find another room quickly from this view. That said, I think the application search should get massaged slightly to allow searching threads and this won't be much of a trade off at all. Test Plan: verified new search links took me to correct place and displayed reasonably. Reviewers: chad, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7584 Differential Revision: https://secure.phabricator.com/D12215
45 lines
1.2 KiB
PHP
45 lines
1.2 KiB
PHP
<?php
|
|
|
|
final class ConpherenceRoomListController extends ConpherenceController {
|
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
$user = $request->getUser();
|
|
|
|
$controller = id(new PhabricatorApplicationSearchController())
|
|
->setQueryKey($request->getURIData('queryKey'))
|
|
->setSearchEngine(
|
|
new ConpherenceThreadSearchEngine())
|
|
->setNavigation($this->buildRoomsSideNavView());
|
|
|
|
return $this->delegateToController($controller);
|
|
}
|
|
|
|
protected function buildApplicationCrumbs() {
|
|
return $this->buildConpherenceApplicationCrumbs($is_rooms = true);
|
|
}
|
|
|
|
public function buildApplicationMenu() {
|
|
return $this->buildRoomsSideNavView(true)->getMenu();
|
|
}
|
|
|
|
private function buildRoomsSideNavView($for_app = false) {
|
|
$user = $this->getRequest()->getUser();
|
|
|
|
$nav = new AphrontSideNavFilterView();
|
|
$nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
|
|
|
|
if ($for_app) {
|
|
$nav->addFilter('room/new/', pht('Create Room'));
|
|
}
|
|
|
|
id(new ConpherenceThreadSearchEngine())
|
|
->setViewer($user)
|
|
->addNavigationItems($nav->getMenu());
|
|
|
|
$nav->selectFilter(null);
|
|
|
|
return $nav;
|
|
}
|
|
|
|
|
|
}
|