3 final class PhabricatorDashboardPanelListController
4 extends PhabricatorDashboardController
{
8 public function shouldAllowPublic() {
12 public function handleRequest(AphrontRequest
$request) {
13 $query_key = $request->getURIData('queryKey');
15 $controller = id(new PhabricatorApplicationSearchController())
16 ->setQueryKey($query_key)
17 ->setSearchEngine(new PhabricatorDashboardPanelSearchEngine())
18 ->setNavigation($this->buildSideNavView());
19 return $this->delegateToController($controller);
22 public function buildSideNavView() {
23 $user = $this->getRequest()->getUser();
25 $nav = new AphrontSideNavFilterView();
26 $nav->setBaseURI(new PhutilURI($this->getApplicationURI()));
28 id(new PhabricatorDashboardPanelSearchEngine())
30 ->addNavigationItems($nav->getMenu());
32 $nav->selectFilter(null);
37 protected function buildApplicationCrumbs() {
38 $crumbs = parent
::buildApplicationCrumbs();
40 $crumbs->addTextCrumb(pht('Panels'), $this->getApplicationURI().'panel/');
43 id(new PHUIListItemView())
44 ->setIcon('fa-plus-square')
45 ->setName(pht('Create Panel'))
46 ->setHref($this->getApplicationURI().'panel/edit/'));
51 protected function getNewUserBody() {
52 $create_button = id(new PHUIButtonView())
54 ->setText(pht('Create a Panel'))
55 ->setHref('/dashboard/panel/edit/')
56 ->setColor(PHUIButtonView
::GREEN
);
58 $icon = $this->getApplication()->getIcon();
59 $app_name = $this->getApplication()->getName();
60 $view = id(new PHUIBigInfoView())
62 ->setTitle(pht('Welcome to %s', $app_name))
64 pht('Build individual panels to display on your homepage dashboard.'))
65 ->addAction($create_button);