mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-19 20:10:55 +01:00
Fix two issues with Remarkup in Pholio
Summary: Fixes T10865. - Mock descriptions did not markup. - Image descriptions did not get a proper container `<div />`. Test Plan: - Created a mock with remarkup in the mock description and in an image description. - Viewed mock detail. - Saw list styles render properly in both mock description and image description. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10865 Differential Revision: https://secure.phabricator.com/D15793
This commit is contained in:
parent
623ed1f434
commit
1c0980a26a
2 changed files with 14 additions and 3 deletions
|
@ -173,14 +173,15 @@ final class PholioMockViewController extends PholioController {
|
|||
}
|
||||
|
||||
private function buildDescriptionView(PholioMock $mock) {
|
||||
|
||||
$viewer = $this->getViewer();
|
||||
|
||||
$properties = id(new PHUIPropertyListView())
|
||||
->setUser($viewer);
|
||||
$description = $mock->getDescription();
|
||||
|
||||
if (strlen($description)) {
|
||||
$properties->addImageContent($description);
|
||||
$properties->addTextContent(
|
||||
new PHUIRemarkupView($viewer, $description));
|
||||
return id(new PHUIObjectBoxView())
|
||||
->setHeaderText(pht('Mock Description'))
|
||||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
|
|
|
@ -92,6 +92,16 @@ final class PholioMockImagesView extends AphrontView {
|
|||
$current_set++;
|
||||
}
|
||||
|
||||
$description = $engine->getOutput($image, 'default');
|
||||
if (strlen($description)) {
|
||||
$description = phutil_tag(
|
||||
'div',
|
||||
array(
|
||||
'class' => 'phabricator-remarkup',
|
||||
),
|
||||
$description);
|
||||
}
|
||||
|
||||
$history_uri = '/pholio/image/history/'.$image->getID().'/';
|
||||
$images[] = array(
|
||||
'id' => $image->getID(),
|
||||
|
@ -105,7 +115,7 @@ final class PholioMockImagesView extends AphrontView {
|
|||
'width' => $x,
|
||||
'height' => $y,
|
||||
'title' => $image->getName(),
|
||||
'descriptionMarkup' => $engine->getOutput($image, 'default'),
|
||||
'descriptionMarkup' => $description,
|
||||
'isObsolete' => (bool)$image->getIsObsolete(),
|
||||
'isImage' => $file->isViewableImage(),
|
||||
'isViewable' => $file->isViewableInBrowser(),
|
||||
|
|
Loading…
Reference in a new issue