Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phriction/controller/PhrictionEditController.php
Show First 20 Lines • Show All 310 Lines • ▼ Show 20 Lines | public function handleRequest(AphrontRequest $request) { | ||||
} | } | ||||
$form_box = id(new PHUIObjectBoxView()) | $form_box = id(new PHUIObjectBoxView()) | ||||
->setHeaderText($page_title) | ->setHeaderText($page_title) | ||||
->setValidationException($validation_exception) | ->setValidationException($validation_exception) | ||||
->setBackground(PHUIObjectBoxView::WHITE_CONFIG) | ->setBackground(PHUIObjectBoxView::WHITE_CONFIG) | ||||
->setForm($form); | ->setForm($form); | ||||
$preview_uri = '/phriction/preview/'; | |||||
$preview_uri = new PhutilURI( | |||||
$preview_uri, | |||||
array( | |||||
'slug' => $document->getSlug(), | |||||
)); | |||||
$preview_uri = phutil_string_cast($preview_uri); | |||||
$preview = id(new PHUIRemarkupPreviewPanel()) | $preview = id(new PHUIRemarkupPreviewPanel()) | ||||
->setHeader($content->getTitle()) | ->setHeader($content->getTitle()) | ||||
->setPreviewURI('/phriction/preview/'.$document->getSlug()) | ->setPreviewURI($preview_uri) | ||||
->setControlID('document-textarea') | ->setControlID('document-textarea') | ||||
->setPreviewType(PHUIRemarkupPreviewPanel::DOCUMENT); | ->setPreviewType(PHUIRemarkupPreviewPanel::DOCUMENT); | ||||
$crumbs = $this->buildApplicationCrumbs(); | $crumbs = $this->buildApplicationCrumbs(); | ||||
if ($document->getID()) { | if ($document->getID()) { | ||||
$crumbs->addTextCrumb( | $crumbs->addTextCrumb( | ||||
$content->getTitle(), | $content->getTitle(), | ||||
PhrictionDocument::getSlugURI($document->getSlug())); | PhrictionDocument::getSlugURI($document->getSlug())); | ||||
Show All 20 Lines |