diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php index 49e7f29bff..d7db7f6548 100644 --- a/src/applications/phriction/controller/PhrictionDocumentController.php +++ b/src/applications/phriction/controller/PhrictionDocumentController.php @@ -38,20 +38,33 @@ final class PhrictionDocumentController $document = PhrictionDocument::initializeNewDocument($viewer, $slug); + if ($slug == '/') { + $title = pht('Welcome to Phriction'); + $subtitle = pht('Phriction is a simple and easy to use wiki for '. + 'keeping track of documents and their changes.'); + $page_title = pht('Welcome'); + $create_text = pht('Edit this Document'); + + } else { + $title = pht('No Document Here'); + $subtitle = pht('There is no document here, but you may create it.'); + $page_title = pht('Page Not Found'); + $create_text = pht('Create this Document'); + } + $create_uri = '/phriction/edit/?slug='.$slug; + $create_button = id(new PHUIButtonView()) + ->setTag('a') + ->setText($create_text) + ->setHref($create_uri) + ->setColor(PHUIButtonView::GREEN); - $notice = new PHUIInfoView(); - $notice->setSeverity(PHUIInfoView::SEVERITY_WARNING); - $notice->setTitle(pht('No content here!')); - $notice->appendChild( - pht( - 'No document found at %s. You can '. - 'create a new document here.', - phutil_tag('tt', array(), $slug), - $create_uri)); - $core_content = $notice; + $core_content = id(new PHUIBigInfoView()) + ->setIcon('fa-book') + ->setTitle($title) + ->setDescription($subtitle) + ->addAction($create_button); - $page_title = pht('Page Not Found'); } else { $version = $request->getInt('v');