@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Basic NUX states for Phriction

Summary: Adds a basic nux for `/` and not found documents. Ref T10023

Test Plan: Visit a clean install, see Welcome page. Visit a non built page, see not found UX

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10023

Differential Revision: https://secure.phabricator.com/D14854

+24 -11
+24 -11
src/applications/phriction/controller/PhrictionDocumentController.php
··· 38 38 39 39 $document = PhrictionDocument::initializeNewDocument($viewer, $slug); 40 40 41 + if ($slug == '/') { 42 + $title = pht('Welcome to Phriction'); 43 + $subtitle = pht('Phriction is a simple and easy to use wiki for '. 44 + 'keeping track of documents and their changes.'); 45 + $page_title = pht('Welcome'); 46 + $create_text = pht('Edit this Document'); 47 + 48 + } else { 49 + $title = pht('No Document Here'); 50 + $subtitle = pht('There is no document here, but you may create it.'); 51 + $page_title = pht('Page Not Found'); 52 + $create_text = pht('Create this Document'); 53 + } 54 + 41 55 $create_uri = '/phriction/edit/?slug='.$slug; 56 + $create_button = id(new PHUIButtonView()) 57 + ->setTag('a') 58 + ->setText($create_text) 59 + ->setHref($create_uri) 60 + ->setColor(PHUIButtonView::GREEN); 42 61 43 - $notice = new PHUIInfoView(); 44 - $notice->setSeverity(PHUIInfoView::SEVERITY_WARNING); 45 - $notice->setTitle(pht('No content here!')); 46 - $notice->appendChild( 47 - pht( 48 - 'No document found at %s. You can <strong>'. 49 - '<a href="%s">create a new document here</a></strong>.', 50 - phutil_tag('tt', array(), $slug), 51 - $create_uri)); 52 - $core_content = $notice; 62 + $core_content = id(new PHUIBigInfoView()) 63 + ->setIcon('fa-book') 64 + ->setTitle($title) 65 + ->setDescription($subtitle) 66 + ->addAction($create_button); 53 67 54 - $page_title = pht('Page Not Found'); 55 68 } else { 56 69 $version = $request->getInt('v'); 57 70