diff --git a/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelListController.php b/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelListController.php --- a/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelListController.php +++ b/src/applications/dashboard/controller/panel/PhabricatorDashboardPanelListController.php @@ -48,23 +48,4 @@ return $crumbs; } - protected function getNewUserBody() { - $create_button = id(new PHUIButtonView()) - ->setTag('a') - ->setText(pht('Create a Panel')) - ->setHref('/dashboard/panel/edit/') - ->setColor(PHUIButtonView::GREEN); - - $icon = $this->getApplication()->getIcon(); - $app_name = $this->getApplication()->getName(); - $view = id(new PHUIBigInfoView()) - ->setIcon($icon) - ->setTitle(pht('Welcome to %s', $app_name)) - ->setDescription( - pht('Build individual panels to display on your homepage dashboard.')) - ->addAction($create_button); - - return $view; - } - } diff --git a/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php b/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php --- a/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php +++ b/src/applications/dashboard/query/PhabricatorDashboardPanelSearchEngine.php @@ -147,4 +147,22 @@ return $result; } + protected function getNewUserBody() { + $create_button = id(new PHUIButtonView()) + ->setTag('a') + ->setText(pht('Create a Panel')) + ->setHref('/dashboard/panel/edit/') + ->setColor(PHUIButtonView::GREEN); + + $app_name = pht('Panels'); + $view = id(new PHUIBigInfoView()) + ->setIcon('fa-line-chart') + ->setTitle(pht('Welcome to %s', $app_name)) + ->setDescription( + pht('Build individual panels to display on your homepage dashboard.')) + ->addAction($create_button); + + return $view; + } + } diff --git a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php --- a/src/applications/search/engine/PhabricatorApplicationSearchEngine.php +++ b/src/applications/search/engine/PhabricatorApplicationSearchEngine.php @@ -1454,6 +1454,12 @@ return $attachments; } + /** + * Render a content body (if available) to onboard new users. + * This body is usually visible when you have no elements in a list, + * or when you force the rendering on a list with the `?nux=1` URL. + * @return wild|PhutilSafeHTML|null + */ final public function renderNewUserView() { $body = $this->getNewUserBody(); @@ -1464,6 +1470,12 @@ return $body; } + /** + * Get a content body to onboard new users. + * Traditionally this content is shown from an empty list, to explain + * what a certain entity does, and how to create a new one. + * @return wild|PhutilSafeHTML|null + */ protected function getNewUserHeader() { return null; }