Allow Diviner books to have a "preface" section
Summary: Ref T988. This is primarily intended to let us add the "HEY! THIS ISN'T USER DOCUMENTATION" notices to the arcanist and libphutil technical docs. Test Plan: Added some prefaces, generated docs, looked at them. Reviewers: chad, btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T988 Differential Revision: https://secure.phabricator.com/D8410
This commit is contained in:
@@ -83,17 +83,26 @@ final class DivinerBookController extends DivinerController {
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user