Summary: Ref T7584. This hits all the major bullets there. Next step on T7584 is figuring out how it integrates into the full UI and column UI. That said, this is a bit buggy feeling right now since Conpherence as is assumes you are a participant all over the place and rooms make no such assumption. I'll probably this bit up next. Test Plan: viewed /conpherence/room/ and saw stuff. viewed the "participant" query as two different users and saw different correct result sets. made a room via the button and it worked. tried to view a room I wasn't a participant in and it failed horribly, which is something to fix in a future diff created a thread via "send message" on a user profile and it worked Reviewers: chad, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7584 Differential Revision: https://secure.phabricator.com/D12113
47 lines
1.2 KiB
PHP
47 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(
|
|
id(new ConpherenceThreadSearchEngine())
|
|
->setIsRooms(true))
|
|
->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;
|
|
}
|
|
|
|
|
|
}
|