1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 00:10:57 +01:00

Add more NUX states

Summary: Adds basic NUX to Dashboards, Herald, Repositories, Maniphest. Note Herald and Dashboard Panels don't fine the nux for some reason, assume they will when modernized?

Test Plan: Read text, click buttons.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14844
This commit is contained in:
Chad Little 2015-12-21 11:15:44 -08:00
parent bde9ac43e7
commit 675be8efc5
10 changed files with 138 additions and 3 deletions

View file

@ -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',

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -51,6 +51,7 @@ final class PhabricatorHeraldApplication extends PhabricatorApplication {
'/herald/' => array(
'(?:query/(?P<queryKey>[^/]+)/)?' => 'HeraldRuleListController',
'new/' => 'HeraldNewController',
'create/' => 'HeraldNewController',
'edit/(?:(?P<id>[1-9]\d*)/)?' => 'HeraldRuleController',
'disable/(?P<id>[1-9]\d*)/(?P<action>\w+)/'
=> 'HeraldDisableController',

View file

@ -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;

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}
}

View file

@ -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;
}