Changeset View
Changeset View
Standalone View
Standalone View
src/applications/paste/query/PhabricatorPasteSearchEngine.php
| Show First 20 Lines • Show All 198 Lines • ▼ Show 20 Lines | protected function renderResultList( | ||||
| $result = new PhabricatorApplicationSearchResultView(); | $result = new PhabricatorApplicationSearchResultView(); | ||||
| $result->setObjectList($list); | $result->setObjectList($list); | ||||
| $result->setNoDataString(pht('No pastes found.')); | $result->setNoDataString(pht('No pastes found.')); | ||||
| return $result; | return $result; | ||||
| } | } | ||||
| protected function getNewUserBody() { | protected function getNewUserBody() { | ||||
| $create_button = id(new PHUIButtonView()) | $viewer = $this->requireViewer(); | ||||
| ->setTag('a') | |||||
| ->setText(pht('Create a Paste')) | $create_button = id(new PhabricatorPasteEditEngine()) | ||||
| ->setHref('/paste/create/') | ->setViewer($viewer) | ||||
| ->setColor(PHUIButtonView::GREEN); | ->newNUXButton(pht('Create a Paste')); | ||||
| $icon = $this->getApplication()->getIcon(); | $icon = $this->getApplication()->getIcon(); | ||||
| $app_name = $this->getApplication()->getName(); | $app_name = $this->getApplication()->getName(); | ||||
| $view = id(new PHUIBigInfoView()) | $view = id(new PHUIBigInfoView()) | ||||
| ->setIcon($icon) | ->setIcon($icon) | ||||
| ->setTitle(pht('Welcome to %s', $app_name)) | ->setTitle(pht('Welcome to %s', $app_name)) | ||||
| ->setDescription( | ->setDescription( | ||||
| pht('Store, share, and embed snippets of code.')) | pht('Store, share, and embed snippets of code.')) | ||||
| ->addAction($create_button); | ->addAction($create_button); | ||||
| return $view; | return $view; | ||||
| } | } | ||||
| } | } | ||||