2013-08-22 16:45:14 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorApplicationTransactionDetailController
|
|
|
|
extends PhabricatorApplicationTransactionController {
|
|
|
|
|
|
|
|
private $phid;
|
|
|
|
|
2014-10-30 08:36:35 -07:00
|
|
|
public function shouldAllowPublic() {
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2013-08-22 16:45:14 -07:00
|
|
|
public function willProcessRequest(array $data) {
|
|
|
|
$this->phid = $data['phid'];
|
|
|
|
}
|
|
|
|
|
|
|
|
public function processRequest() {
|
|
|
|
$request = $this->getRequest();
|
2014-02-13 19:37:31 -08:00
|
|
|
$viewer = $request->getUser();
|
2013-08-22 16:45:14 -07:00
|
|
|
|
|
|
|
$xaction = id(new PhabricatorObjectQuery())
|
|
|
|
->withPHIDs(array($this->phid))
|
2014-02-13 19:37:31 -08:00
|
|
|
->setViewer($viewer)
|
2013-08-22 16:45:14 -07:00
|
|
|
->executeOne();
|
|
|
|
if (!$xaction) {
|
|
|
|
return new Aphront404Response();
|
|
|
|
}
|
|
|
|
|
2014-02-13 19:37:31 -08:00
|
|
|
$details = $xaction->renderChangeDetails($viewer);
|
|
|
|
|
2014-04-29 09:42:54 -07:00
|
|
|
$cancel_uri = $this->guessCancelURI($viewer, $xaction);
|
2014-02-13 19:37:31 -08:00
|
|
|
$dialog = id(new AphrontDialogView())
|
|
|
|
->setUser($viewer)
|
|
|
|
->setTitle(pht('Change Details'))
|
|
|
|
->setWidth(AphrontDialogView::WIDTH_FULL)
|
2014-08-08 10:21:13 -07:00
|
|
|
->setFlush(true)
|
2014-02-13 19:37:31 -08:00
|
|
|
->appendChild($details)
|
|
|
|
->addCancelButton($cancel_uri);
|
|
|
|
|
|
|
|
return id(new AphrontDialogResponse())->setDialog($dialog);
|
2013-08-22 16:45:14 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
}
|