Changeset View
Changeset View
Standalone View
Standalone View
src/applications/pholio/controller/PholioMockViewController.php
Show All 31 Lines | if (!$mock) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
$phids = PhabricatorEdgeQuery::loadDestinationPHIDs( | $phids = PhabricatorEdgeQuery::loadDestinationPHIDs( | ||||
$mock->getPHID(), | $mock->getPHID(), | ||||
PholioMockHasTaskEdgeType::EDGECONST); | PholioMockHasTaskEdgeType::EDGECONST); | ||||
$this->setManiphestTaskPHIDs($phids); | $this->setManiphestTaskPHIDs($phids); | ||||
$engine = id(new PhabricatorMarkupEngine()) | |||||
->setViewer($viewer); | |||||
$engine->addObject($mock, PholioMock::MARKUP_FIELD_DESCRIPTION); | |||||
$title = $mock->getName(); | $title = $mock->getName(); | ||||
if ($mock->isClosed()) { | if ($mock->isClosed()) { | ||||
$header_icon = 'fa-ban'; | $header_icon = 'fa-ban'; | ||||
$header_name = pht('Closed'); | $header_name = pht('Closed'); | ||||
$header_color = 'dark'; | $header_color = 'dark'; | ||||
} else { | } else { | ||||
$header_icon = 'fa-square-o'; | $header_icon = 'fa-square-o'; | ||||
$header_name = pht('Open'); | $header_name = pht('Open'); | ||||
$header_color = 'bluegrey'; | $header_color = 'bluegrey'; | ||||
} | } | ||||
$header = id(new PHUIHeaderView()) | $header = id(new PHUIHeaderView()) | ||||
->setHeader($title) | ->setHeader($title) | ||||
->setUser($viewer) | ->setUser($viewer) | ||||
->setStatus($header_icon, $header_color, $header_name) | ->setStatus($header_icon, $header_color, $header_name) | ||||
->setPolicyObject($mock) | ->setPolicyObject($mock) | ||||
->setHeaderIcon('fa-camera-retro'); | ->setHeaderIcon('fa-camera-retro'); | ||||
$timeline = $this->buildTransactionTimeline( | $timeline = $this->buildTransactionTimeline( | ||||
$mock, | $mock, | ||||
new PholioTransactionQuery(), | new PholioTransactionQuery()); | ||||
$engine); | |||||
$timeline->setMock($mock); | $timeline->setMock($mock); | ||||
$curtain = $this->buildCurtainView($mock); | $curtain = $this->buildCurtainView($mock); | ||||
$details = $this->buildDescriptionView($mock); | $details = $this->buildDescriptionView($mock); | ||||
require_celerity_resource('pholio-css'); | require_celerity_resource('pholio-css'); | ||||
require_celerity_resource('pholio-inline-comments-css'); | require_celerity_resource('pholio-inline-comments-css'); | ||||
▲ Show 20 Lines • Show All 164 Lines • Show Last 20 Lines |