Remove product literal strings in "pht()", part 6
[phabricator.git] / src / applications / drydock / controller / DrydockRepositoryOperationStatusController.php
blob5f35c91bb39fdad232bf058625bf1542be981740
1 <?php
3 final class DrydockRepositoryOperationStatusController
4 extends DrydockRepositoryOperationController {
6 public function shouldAllowPublic() {
7 return true;
10 public function handleRequest(AphrontRequest $request) {
11 $viewer = $request->getViewer();
12 $id = $request->getURIData('id');
14 $operation = id(new DrydockRepositoryOperationQuery())
15 ->setViewer($viewer)
16 ->withIDs(array($id))
17 ->executeOne();
18 if (!$operation) {
19 return new Aphront404Response();
22 $id = $operation->getID();
24 $status_view = id(new DrydockRepositoryOperationStatusView())
25 ->setUser($viewer)
26 ->setOperation($operation);
28 if ($request->isAjax()) {
29 $payload = array(
30 'markup' => $status_view->renderUnderwayState(),
31 'isUnderway' => $operation->isUnderway(),
34 return id(new AphrontAjaxResponse())
35 ->setContent($payload);
38 $title = pht('Repository Operation %d', $id);
40 $crumbs = $this->buildApplicationCrumbs();
41 $crumbs->addTextCrumb(
42 pht('Operations'),
43 $this->getApplicationURI('operation/'));
44 $crumbs->addTextCrumb($title);
46 return $this->newPage()
47 ->setTitle(pht('Status'))
48 ->setCrumbs($crumbs)
49 ->appendChild($status_view);