diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 92a49e6ebe..3b15ec78a0 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -123,7 +123,7 @@ return array( 'rsrc/css/phui/phui-action-list.css' => 'c5eba19d', 'rsrc/css/phui/phui-action-panel.css' => '91c7b835', 'rsrc/css/phui/phui-badge.css' => 'f25c3476', - 'rsrc/css/phui/phui-big-info-view.css' => '86cf0dd3', + 'rsrc/css/phui/phui-big-info-view.css' => 'bd903741', 'rsrc/css/phui/phui-box.css' => 'a5bb366d', 'rsrc/css/phui/phui-button.css' => '16020a60', 'rsrc/css/phui/phui-crumbs-view.css' => '414406b5', @@ -792,7 +792,7 @@ return array( 'phriction-document-css' => 'd1861e06', 'phui-action-panel-css' => '91c7b835', 'phui-badge-view-css' => 'f25c3476', - 'phui-big-info-view-css' => '86cf0dd3', + 'phui-big-info-view-css' => 'bd903741', 'phui-box-css' => 'a5bb366d', 'phui-button-css' => '16020a60', 'phui-calendar-css' => 'ccabe893', diff --git a/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php b/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php index e612c26d2a..4136cad358 100644 --- a/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php +++ b/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php @@ -48,4 +48,23 @@ final class PhabricatorDashboardPanelListController return $crumbs; } + protected function getNewUserBody() { + $create_button = id(new PHUIButtonView()) + ->setTag('a') + ->setText(pht('Create a Panel')) + ->setHref('/dashboard/panel/create/') + ->setColor(PHUIButtonView::GREEN); + + $icon = $this->getApplication()->getFontIcon(); + $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/PhabricatorDashboardSearchEngine.php b/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php index e9e5b29772..83557b141a 100644 --- a/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php +++ b/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php @@ -174,4 +174,24 @@ final class PhabricatorDashboardSearchEngine return $result; } + protected function getNewUserBody() { + $create_button = id(new PHUIButtonView()) + ->setTag('a') + ->setText(pht('Create a Dashboard')) + ->setHref('/dashboard/create/') + ->setColor(PHUIButtonView::GREEN); + + $icon = $this->getApplication()->getFontIcon(); + $app_name = $this->getApplication()->getName(); + $view = id(new PHUIBigInfoView()) + ->setIcon($icon) + ->setTitle(pht('Welcome to %s', $app_name)) + ->setDescription( + pht('Customize your homepage with different panels and '. + 'search queries.')) + ->addAction($create_button); + + return $view; + } + } diff --git a/src/applications/herald/application/PhabricatorHeraldApplication.php b/src/applications/herald/application/PhabricatorHeraldApplication.php index bef94b6ac4..d6f0fd47b6 100644 --- a/src/applications/herald/application/PhabricatorHeraldApplication.php +++ b/src/applications/herald/application/PhabricatorHeraldApplication.php @@ -51,6 +51,7 @@ final class PhabricatorHeraldApplication extends PhabricatorApplication { '/herald/' => array( '(?:query/(?P[^/]+)/)?' => 'HeraldRuleListController', 'new/' => 'HeraldNewController', + 'create/' => 'HeraldNewController', 'edit/(?:(?P[1-9]\d*)/)?' => 'HeraldRuleController', 'disable/(?P[1-9]\d*)/(?P\w+)/' => 'HeraldDisableController', diff --git a/src/applications/herald/controller/HeraldController.php b/src/applications/herald/controller/HeraldController.php index 2151c62aa9..355d3b90f9 100644 --- a/src/applications/herald/controller/HeraldController.php +++ b/src/applications/herald/controller/HeraldController.php @@ -12,7 +12,7 @@ abstract class HeraldController extends PhabricatorController { $crumbs->addAction( id(new PHUIListItemView()) ->setName(pht('Create Herald Rule')) - ->setHref($this->getApplicationURI('new/')) + ->setHref($this->getApplicationURI('create/')) ->setIcon('fa-plus-square')); return $crumbs; diff --git a/src/applications/herald/query/HeraldRuleSearchEngine.php b/src/applications/herald/query/HeraldRuleSearchEngine.php index ad4c9a7ad2..b71f8e6278 100644 --- a/src/applications/herald/query/HeraldRuleSearchEngine.php +++ b/src/applications/herald/query/HeraldRuleSearchEngine.php @@ -211,4 +211,24 @@ final class HeraldRuleSearchEngine extends PhabricatorApplicationSearchEngine { } + protected function getNewUserBody() { + $create_button = id(new PHUIButtonView()) + ->setTag('a') + ->setText(pht('Create Herald Rule')) + ->setHref('/herald/create/') + ->setColor(PHUIButtonView::GREEN); + + $icon = $this->getApplication()->getFontIcon(); + $app_name = $this->getApplication()->getName(); + $view = id(new PHUIBigInfoView()) + ->setIcon($icon) + ->setTitle(pht('Welcome to %s', $app_name)) + ->setDescription( + pht('A flexible rules engine that can notify and act on '. + 'other actions such as tasks, diffs, and commits.')) + ->addAction($create_button); + + return $view; + } + } diff --git a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php index 8355e8947e..8e2f295f1a 100644 --- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php +++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php @@ -385,4 +385,24 @@ final class ManiphestTaskSearchEngine $saved->setParameter('projectPHIDs', $project_phids); } + protected function getNewUserBody() { + $create_button = id(new PHUIButtonView()) + ->setTag('a') + ->setText(pht('Create a Task')) + ->setHref('/maniphest/task/edit/') + ->setColor(PHUIButtonView::GREEN); + + $icon = $this->getApplication()->getFontIcon(); + $app_name = $this->getApplication()->getName(); + $view = id(new PHUIBigInfoView()) + ->setIcon($icon) + ->setTitle(pht('Welcome to %s', $app_name)) + ->setDescription( + pht('Use Maniphest to track bugs, features, todos, or anything else '. + 'you need to get done. Tasks assigned to you will appear here.')) + ->addAction($create_button); + + return $view; + } + } diff --git a/src/applications/project/query/PhabricatorProjectSearchEngine.php b/src/applications/project/query/PhabricatorProjectSearchEngine.php index 89cbb9163e..f68d4e67f8 100644 --- a/src/applications/project/query/PhabricatorProjectSearchEngine.php +++ b/src/applications/project/query/PhabricatorProjectSearchEngine.php @@ -202,4 +202,24 @@ protected function buildQueryFromParameters(array $map) { } + protected function getNewUserBody() { + $create_button = id(new PHUIButtonView()) + ->setTag('a') + ->setText(pht('Create a Project')) + ->setHref('/project/create/') + ->setColor(PHUIButtonView::GREEN); + + $icon = $this->getApplication()->getFontIcon(); + $app_name = $this->getApplication()->getName(); + $view = id(new PHUIBigInfoView()) + ->setIcon($icon) + ->setTitle(pht('Welcome to %s', $app_name)) + ->setDescription( + pht('Projects are flexible storage containers used as '. + 'tags, teams, projects, or anything you need to group.')) + ->addAction($create_button); + + return $view; + } + } diff --git a/src/applications/repository/query/PhabricatorRepositorySearchEngine.php b/src/applications/repository/query/PhabricatorRepositorySearchEngine.php index 23b1aa003e..04333384f9 100644 --- a/src/applications/repository/query/PhabricatorRepositorySearchEngine.php +++ b/src/applications/repository/query/PhabricatorRepositorySearchEngine.php @@ -233,4 +233,31 @@ final class PhabricatorRepositorySearchEngine $saved->setParameter('projectPHIDs', $project_phids); } + protected function getNewUserBody() { + + $import_button = id(new PHUIButtonView()) + ->setTag('a') + ->setText(pht('Import Repository')) + ->setHref('/diffusion/import/') + ->setColor(PHUIButtonView::GREEN); + + $create_button = id(new PHUIButtonView()) + ->setTag('a') + ->setText(pht('Create Repository')) + ->setHref('/diffusion/create/') + ->setColor(PHUIButtonView::GREEN); + + $icon = $this->getApplication()->getFontIcon(); + $app_name = $this->getApplication()->getName(); + $view = id(new PHUIBigInfoView()) + ->setIcon($icon) + ->setTitle(pht('Welcome to %s', $app_name)) + ->setDescription( + pht('Import, create, or just browse repositories in Diffusion.')) + ->addAction($import_button) + ->addAction($create_button); + + return $view; + } + } diff --git a/webroot/rsrc/css/phui/phui-big-info-view.css b/webroot/rsrc/css/phui/phui-big-info-view.css index 7d25515061..3c92025d79 100644 --- a/webroot/rsrc/css/phui/phui-big-info-view.css +++ b/webroot/rsrc/css/phui/phui-big-info-view.css @@ -27,3 +27,11 @@ .phui-big-info-actions { padding: 24px 0 0; } + +.phui-big-info-button { + display: inline-block; +} + +.phui-big-info-button + .phui-big-info-button { + margin-left: 12px; +}