mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 13:00:56 +01:00
Add various NUX states
Summary: Adds basic NUX UI to Countdown, Paste, Phurl, Ponder, Slowvote, Macro, and Pholio. Test Plan: Review each with ?nux=true. Click on Create Button. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D14840
This commit is contained in:
parent
9f8808011c
commit
bde9ac43e7
11 changed files with 141 additions and 3 deletions
|
@ -48,6 +48,8 @@ final class PhabricatorCountdownApplication extends PhabricatorApplication {
|
||||||
=> 'PhabricatorCountdownCommentController',
|
=> 'PhabricatorCountdownCommentController',
|
||||||
'edit/(?:(?P<id>[1-9]\d*)/)?'
|
'edit/(?:(?P<id>[1-9]\d*)/)?'
|
||||||
=> 'PhabricatorCountdownEditController',
|
=> 'PhabricatorCountdownEditController',
|
||||||
|
'create/'
|
||||||
|
=> 'PhabricatorCountdownEditController',
|
||||||
'delete/(?P<id>[1-9]\d*)/'
|
'delete/(?P<id>[1-9]\d*)/'
|
||||||
=> 'PhabricatorCountdownDeleteController',
|
=> 'PhabricatorCountdownDeleteController',
|
||||||
),
|
),
|
||||||
|
|
|
@ -13,7 +13,7 @@ abstract class PhabricatorCountdownController extends PhabricatorController {
|
||||||
$crumbs->addAction(
|
$crumbs->addAction(
|
||||||
id(new PHUIListItemView())
|
id(new PHUIListItemView())
|
||||||
->setName(pht('Create Countdown'))
|
->setName(pht('Create Countdown'))
|
||||||
->setHref($this->getApplicationURI('edit/'))
|
->setHref($this->getApplicationURI('create/'))
|
||||||
->setIcon('fa-plus-square'));
|
->setIcon('fa-plus-square'));
|
||||||
|
|
||||||
return $crumbs;
|
return $crumbs;
|
||||||
|
|
|
@ -145,4 +145,24 @@ final class PhabricatorCountdownSearchEngine
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getNewUserBody() {
|
||||||
|
$create_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Create a Countdown'))
|
||||||
|
->setHref('/countdown/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('Keep track of upcoming launch dates with '.
|
||||||
|
'embeddable counters.'))
|
||||||
|
->addAction($create_button);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,4 +189,23 @@ final class PhabricatorMacroSearchEngine
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getNewUserBody() {
|
||||||
|
$create_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Create a Macro'))
|
||||||
|
->setHref('/macro/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('Create easy to remember shortcuts to images and memes.'))
|
||||||
|
->addAction($create_button);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -202,4 +202,23 @@ final class PhabricatorPasteSearchEngine
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getNewUserBody() {
|
||||||
|
$create_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Create a Paste'))
|
||||||
|
->setHref('/paste/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('Store, share, and embed snippets of code.'))
|
||||||
|
->addAction($create_button);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,7 @@ final class PhabricatorPholioApplication extends PhabricatorApplication {
|
||||||
'/pholio/' => array(
|
'/pholio/' => array(
|
||||||
'(?:query/(?P<queryKey>[^/]+)/)?' => 'PholioMockListController',
|
'(?:query/(?P<queryKey>[^/]+)/)?' => 'PholioMockListController',
|
||||||
'new/' => 'PholioMockEditController',
|
'new/' => 'PholioMockEditController',
|
||||||
|
'create/' => 'PholioMockEditController',
|
||||||
'edit/(?P<id>\d+)/' => 'PholioMockEditController',
|
'edit/(?P<id>\d+)/' => 'PholioMockEditController',
|
||||||
'archive/(?P<id>\d+)/' => 'PholioMockArchiveController',
|
'archive/(?P<id>\d+)/' => 'PholioMockArchiveController',
|
||||||
'comment/(?P<id>\d+)/' => 'PholioMockCommentController',
|
'comment/(?P<id>\d+)/' => 'PholioMockCommentController',
|
||||||
|
@ -64,7 +65,7 @@ final class PhabricatorPholioApplication extends PhabricatorApplication {
|
||||||
$item = id(new PHUIListItemView())
|
$item = id(new PHUIListItemView())
|
||||||
->setName(pht('Pholio Mock'))
|
->setName(pht('Pholio Mock'))
|
||||||
->setIcon('fa-picture-o')
|
->setIcon('fa-picture-o')
|
||||||
->setHref($this->getBaseURI().'new/');
|
->setHref($this->getBaseURI().'create/');
|
||||||
$items[] = $item;
|
$items[] = $item;
|
||||||
|
|
||||||
return $items;
|
return $items;
|
||||||
|
|
|
@ -13,7 +13,7 @@ abstract class PholioController extends PhabricatorController {
|
||||||
$crumbs->addAction(
|
$crumbs->addAction(
|
||||||
id(new PHUIListItemView())
|
id(new PHUIListItemView())
|
||||||
->setName(pht('Create Mock'))
|
->setName(pht('Create Mock'))
|
||||||
->setHref($this->getApplicationURI('new/'))
|
->setHref($this->getApplicationURI('create/'))
|
||||||
->setIcon('fa-plus-square'));
|
->setIcon('fa-plus-square'));
|
||||||
|
|
||||||
return $crumbs;
|
return $crumbs;
|
||||||
|
|
|
@ -130,4 +130,24 @@ final class PholioMockSearchEngine extends PhabricatorApplicationSearchEngine {
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getNewUserBody() {
|
||||||
|
$create_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Create a Mock'))
|
||||||
|
->setHref('/pholio/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('Upload sets of images for review with revision history and '.
|
||||||
|
'inline comments.'))
|
||||||
|
->addAction($create_button);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -91,4 +91,23 @@ final class PhabricatorPhurlURLSearchEngine
|
||||||
|
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getNewUserBody() {
|
||||||
|
$create_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Shorten a URL'))
|
||||||
|
->setHref('/phurl/url/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('Create reusable, memorable, shorter URLs for easy accessibility.'))
|
||||||
|
->addAction($create_button);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -180,4 +180,23 @@ final class PonderQuestionSearchEngine
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getNewUserBody() {
|
||||||
|
$create_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Ask a Question'))
|
||||||
|
->setHref('/ponder/question/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 simple questions and answers application for your teams.'))
|
||||||
|
->addAction($create_button);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -163,4 +163,23 @@ final class PhabricatorSlowvoteSearchEngine
|
||||||
return $result;
|
return $result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected function getNewUserBody() {
|
||||||
|
$create_button = id(new PHUIButtonView())
|
||||||
|
->setTag('a')
|
||||||
|
->setText(pht('Create a Poll'))
|
||||||
|
->setHref('/vote/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('Poll other users to help facilitate decision making.'))
|
||||||
|
->addAction($create_button);
|
||||||
|
|
||||||
|
return $view;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue