Page MenuHomePhabricator

D8410.id19966.diff
No OneTemporary

D8410.id19966.diff

diff --git a/src/applications/diviner/controller/DivinerBookController.php b/src/applications/diviner/controller/DivinerBookController.php
--- a/src/applications/diviner/controller/DivinerBookController.php
+++ b/src/applications/diviner/controller/DivinerBookController.php
@@ -83,17 +83,26 @@
}
private function buildPropertyList(DivinerLiveBook $book) {
- $user = $this->getRequest()->getUser();
+ $viewer = $this->getRequest()->getUser();
$view = id(new PHUIPropertyListView())
- ->setUser($user);
+ ->setUser($viewer);
$policies = PhabricatorPolicyQuery::renderPolicyDescriptions(
- $user,
+ $viewer,
$book);
$view->addProperty(
pht('Updated'),
- phabricator_datetime($book->getDateModified(), $user));
+ phabricator_datetime($book->getDateModified(), $viewer));
+
+ $preface = $book->getPreface();
+ if (strlen($preface)) {
+ $view->addTextContent(
+ PhabricatorMarkupEngine::renderOneObject(
+ id(new PhabricatorMarkupOneOff())->setContent($preface),
+ 'default',
+ $viewer));
+ }
return $view;
}
diff --git a/src/applications/diviner/storage/DivinerLiveBook.php b/src/applications/diviner/storage/DivinerLiveBook.php
--- a/src/applications/diviner/storage/DivinerLiveBook.php
+++ b/src/applications/diviner/storage/DivinerLiveBook.php
@@ -38,6 +38,10 @@
return $this->getConfig('short', $this->getTitle());
}
+ public function getPreface() {
+ return $this->getConfig('preface');
+ }
+
public function getGroupName($group) {
$groups = $this->getConfig('groups');
$spec = idx($groups, $group, array());
diff --git a/src/applications/diviner/workflow/DivinerWorkflow.php b/src/applications/diviner/workflow/DivinerWorkflow.php
--- a/src/applications/diviner/workflow/DivinerWorkflow.php
+++ b/src/applications/diviner/workflow/DivinerWorkflow.php
@@ -37,6 +37,7 @@
'name' => 'string',
'title' => 'optional string',
'short' => 'optional string',
+ 'preface' => 'optional string',
'root' => 'optional string',
'uri.source' => 'optional string',
'rules' => 'optional map<regex, string>',
diff --git a/src/docs/book/phabricator.book b/src/docs/book/phabricator.book
--- a/src/docs/book/phabricator.book
+++ b/src/docs/book/phabricator.book
@@ -2,6 +2,7 @@
"name" : "phabdev",
"title" : "Phabricator Technical Documentation",
"short" : "Phabricator Tech Docs",
+ "preface" : "Technical documentation intended for Phabricator developers.",
"root" : "../../../",
"uri.source" :
"https://secure.phabricator.com/diffusion/P/browse/master/%f$%l",
diff --git a/src/docs/book/user.book b/src/docs/book/user.book
--- a/src/docs/book/user.book
+++ b/src/docs/book/user.book
@@ -2,6 +2,7 @@
"name" : "phabricator",
"title" : "Phabricator User Documentation",
"short" : "Phabricator User Docs",
+ "preface" : "Instructions for installing, configuring, and using Phabricator.",
"root" : "../../../",
"uri.source" :
"https://secure.phabricator.com/diffusion/P/browse/master/%f$%l",

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 31, 5:37 AM (20 h, 21 m)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6748025
Default Alt Text
D8410.id19966.diff (3 KB)

Event Timeline