mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-18 19:40:55 +01:00
Add a basic first feed story on /home/
Summary: Ref T11132. Adds a text panel to feed if no stories are present and the user is an admin. Seems ok-ish for 15 minutes. Happy to take content suggestions. Test Plan: Make a new install, see panel. Log in as new user, don't see panel. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T11132 Differential Revision: https://secure.phabricator.com/D16479
This commit is contained in:
parent
b5c9c64b0f
commit
4dacf4d3ad
2 changed files with 30 additions and 1 deletions
|
@ -317,7 +317,7 @@ final class PhabricatorConfigWelcomeController
|
|||
$pholio_all_uri));
|
||||
|
||||
|
||||
$diffusion_uri = PhabricatorEnv::getURI('/diffusion/');
|
||||
$diffusion_uri = PhabricatorEnv::getURI('/diffusion/edit/');
|
||||
$diffusion_create_uri = PhabricatorEnv::getURI('/diffusion/create/');
|
||||
$diffusion_all_uri = PhabricatorEnv::getURI('/diffusion/query/all/');
|
||||
|
||||
|
|
|
@ -202,6 +202,35 @@ final class PhabricatorHomeMainController extends PhabricatorHomeController {
|
|||
$pager->setPageSize(40);
|
||||
$results = $engine->executeQuery($query, $pager);
|
||||
$view = $engine->renderResults($results, $saved);
|
||||
// Low tech NUX.
|
||||
if (!$results && ($viewer->getIsAdmin() == 1)) {
|
||||
$instance = PhabricatorEnv::getEnvConfig('cluster.instance');
|
||||
if (!$instance) {
|
||||
$content = pht(<<<EOT
|
||||
Welcome to Phabricator, here are some links to get you started:
|
||||
- [[ /config/ | Configure Phabricator ]]
|
||||
- [[ /config/welcome/ | Quick Start Guide ]]
|
||||
- [[ /diffusion/ | Create a Repository ]]
|
||||
- [[ /people/invite/send/ | Invite People ]]
|
||||
- [[ https://twitter.com/phabricator/ | Follow us on Twitter ]]
|
||||
EOT
|
||||
);
|
||||
} else {
|
||||
$content = pht(<<<EOT
|
||||
Welcome to Phabricator, here are some links to get you started:
|
||||
- [[ /config/welcome/ | Quick Start Guide ]]
|
||||
- [[ /diffusion/ | Create a Repository ]]
|
||||
- [[ https://twitter.com/phabricator/ | Follow us on Twitter ]]
|
||||
EOT
|
||||
);
|
||||
}
|
||||
$welcome = new PHUIRemarkupView($viewer, $content);
|
||||
|
||||
$list = new PHUIObjectItemListView();
|
||||
$view = new PhabricatorApplicationSearchResultView();
|
||||
$view->setObjectList($list);
|
||||
$view->setNoDataString($welcome);
|
||||
}
|
||||
|
||||
$title = pht('Recent Activity');
|
||||
$href = '/feed/';
|
||||
|
|
Loading…
Reference in a new issue