Page MenuHomePhabricator

D14854.diff
No OneTemporary

D14854.diff

diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php
--- a/src/applications/phriction/controller/PhrictionDocumentController.php
+++ b/src/applications/phriction/controller/PhrictionDocumentController.php
@@ -38,20 +38,33 @@
$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);
+
+ $core_content = id(new PHUIBigInfoView())
+ ->setIcon('fa-book')
+ ->setTitle($title)
+ ->setDescription($subtitle)
+ ->addAction($create_button);
- $notice = new PHUIInfoView();
- $notice->setSeverity(PHUIInfoView::SEVERITY_WARNING);
- $notice->setTitle(pht('No content here!'));
- $notice->appendChild(
- pht(
- 'No document found at %s. You can <strong>'.
- '<a href="%s">create a new document here</a></strong>.',
- phutil_tag('tt', array(), $slug),
- $create_uri));
- $core_content = $notice;
-
- $page_title = pht('Page Not Found');
} else {
$version = $request->getInt('v');

File Metadata

Mime Type
text/plain
Expires
Mar 21 2025, 12:23 PM (4 w, 4 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7686541
Default Alt Text
D14854.diff (1 KB)

Event Timeline