mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 04:50:55 +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',
|
||||
'edit/(?:(?P<id>[1-9]\d*)/)?'
|
||||
=> 'PhabricatorCountdownEditController',
|
||||
'create/'
|
||||
=> 'PhabricatorCountdownEditController',
|
||||
'delete/(?P<id>[1-9]\d*)/'
|
||||
=> 'PhabricatorCountdownDeleteController',
|
||||
),
|
||||
|
|
|
@ -13,7 +13,7 @@ abstract class PhabricatorCountdownController extends PhabricatorController {
|
|||
$crumbs->addAction(
|
||||
id(new PHUIListItemView())
|
||||
->setName(pht('Create Countdown'))
|
||||
->setHref($this->getApplicationURI('edit/'))
|
||||
->setHref($this->getApplicationURI('create/'))
|
||||
->setIcon('fa-plus-square'));
|
||||
|
||||
return $crumbs;
|
||||
|
|
|
@ -145,4 +145,24 @@ final class PhabricatorCountdownSearchEngine
|
|||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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(
|
||||
'(?:query/(?P<queryKey>[^/]+)/)?' => 'PholioMockListController',
|
||||
'new/' => 'PholioMockEditController',
|
||||
'create/' => 'PholioMockEditController',
|
||||
'edit/(?P<id>\d+)/' => 'PholioMockEditController',
|
||||
'archive/(?P<id>\d+)/' => 'PholioMockArchiveController',
|
||||
'comment/(?P<id>\d+)/' => 'PholioMockCommentController',
|
||||
|
@ -64,7 +65,7 @@ final class PhabricatorPholioApplication extends PhabricatorApplication {
|
|||
$item = id(new PHUIListItemView())
|
||||
->setName(pht('Pholio Mock'))
|
||||
->setIcon('fa-picture-o')
|
||||
->setHref($this->getBaseURI().'new/');
|
||||
->setHref($this->getBaseURI().'create/');
|
||||
$items[] = $item;
|
||||
|
||||
return $items;
|
||||
|
|
|
@ -13,7 +13,7 @@ abstract class PholioController extends PhabricatorController {
|
|||
$crumbs->addAction(
|
||||
id(new PHUIListItemView())
|
||||
->setName(pht('Create Mock'))
|
||||
->setHref($this->getApplicationURI('new/'))
|
||||
->setHref($this->getApplicationURI('create/'))
|
||||
->setIcon('fa-plus-square'));
|
||||
|
||||
return $crumbs;
|
||||
|
|
|
@ -130,4 +130,24 @@ final class PholioMockSearchEngine extends PhabricatorApplicationSearchEngine {
|
|||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
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