diff --git a/resources/celerity/map.php b/resources/celerity/map.php --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -123,7 +123,7 @@ '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 @@ '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 --- a/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php +++ b/src/applications/dashboard/controller/PhabricatorDashboardPanelListController.php @@ -48,4 +48,23 @@ 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 --- a/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php +++ b/src/applications/dashboard/query/PhabricatorDashboardSearchEngine.php @@ -174,4 +174,24 @@ 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 --- a/src/applications/herald/application/PhabricatorHeraldApplication.php +++ b/src/applications/herald/application/PhabricatorHeraldApplication.php @@ -51,6 +51,7 @@ '/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 --- a/src/applications/herald/controller/HeraldController.php +++ b/src/applications/herald/controller/HeraldController.php @@ -12,7 +12,7 @@ $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 --- a/src/applications/herald/query/HeraldRuleSearchEngine.php +++ b/src/applications/herald/query/HeraldRuleSearchEngine.php @@ -211,4 +211,24 @@ } + 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 --- a/src/applications/maniphest/query/ManiphestTaskSearchEngine.php +++ b/src/applications/maniphest/query/ManiphestTaskSearchEngine.php @@ -385,4 +385,24 @@ $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 --- a/src/applications/project/query/PhabricatorProjectSearchEngine.php +++ b/src/applications/project/query/PhabricatorProjectSearchEngine.php @@ -202,4 +202,24 @@ } + 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 --- a/src/applications/repository/query/PhabricatorRepositorySearchEngine.php +++ b/src/applications/repository/query/PhabricatorRepositorySearchEngine.php @@ -233,4 +233,31 @@ $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 --- 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; +}