Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F18914361
D19863.id47428.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
2 KB
Referenced Files
None
Subscribers
None
D19863.id47428.diff
View Options
diff --git a/src/applications/phriction/controller/PhrictionController.php b/src/applications/phriction/controller/PhrictionController.php
--- a/src/applications/phriction/controller/PhrictionController.php
+++ b/src/applications/phriction/controller/PhrictionController.php
@@ -2,6 +2,14 @@
abstract class PhrictionController extends PhabricatorController {
+ private $showWelcomeDocument = false;
+
+ public function setShowWelcomeDocument($show_welcome) {
+ $this->showWelcomeDocument = $show_welcome;
+ return $this;
+
+ }
+
public function buildSideNavView($for_app = false) {
$user = $this->getRequest()->getUser();
@@ -37,12 +45,14 @@
->setIcon('fa-home'));
}
- $crumbs->addAction(
- id(new PHUIListItemView())
- ->setName(pht('New Document'))
- ->setHref('/phriction/new/?slug='.$this->getDocumentSlug())
- ->setWorkflow(true)
- ->setIcon('fa-plus-square'));
+ if (!$this->showWelcomeDocument) {
+ $crumbs->addAction(
+ id(new PHUIListItemView())
+ ->setName(pht('New Document'))
+ ->setHref('/phriction/new/?slug='.$this->getDocumentSlug())
+ ->setWorkflow(true)
+ ->setIcon('fa-plus-square'));
+ }
return $crumbs;
}
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
@@ -9,6 +9,7 @@
return true;
}
+
public function handleRequest(AphrontRequest $request) {
$viewer = $request->getViewer();
$this->slug = $request->getURIData('slug');
@@ -35,7 +36,6 @@
->needContent(true)
->executeOne();
if (!$document) {
-
$document = PhrictionDocument::initializeNewDocument($viewer, $slug);
if ($slug == '/') {
@@ -44,6 +44,7 @@
'keeping track of documents and their changes.');
$page_title = pht('Welcome');
$create_text = pht('Edit this Document');
+ $this->setShowWelcomeDocument(true);
} else {
$title = pht('No Document Here');
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Nov 10 2025, 6:50 AM (9 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
12907251
Default Alt Text
D19863.id47428.diff (2 KB)
Attached To
Mode
D19863: Make it less confusing to create root-level Phriction doc
Attached
Detach File
Event Timeline
Log In to Comment