Remove product literal strings in "pht()", part 6
[phabricator.git] / src / applications / harbormaster / controller / HarbormasterBuildLogViewController.php
blob0128dad0b602f0f8ca93922f33a7785b196f28be
1 <?php
3 final class HarbormasterBuildLogViewController
4 extends HarbormasterController {
6 public function shouldAllowPublic() {
7 return true;
10 public function handleRequest(AphrontRequest $request) {
11 $viewer = $this->getViewer();
13 $id = $request->getURIData('id');
15 $log = id(new HarbormasterBuildLogQuery())
16 ->setViewer($viewer)
17 ->withIDs(array($id))
18 ->executeOne();
19 if (!$log) {
20 return new Aphront404Response();
23 $target = $log->getBuildTarget();
24 $build = $target->getBuild();
26 $page_title = pht('Build Log %d', $log->getID());
28 $log_view = id(new HarbormasterBuildLogView())
29 ->setViewer($viewer)
30 ->setBuildLog($log)
31 ->setHighlightedLineRange($request->getURIData('lines'))
32 ->setEnableHighlighter(true);
34 $crumbs = $this->buildApplicationCrumbs()
35 ->addTextCrumb(pht('Build Logs'))
36 ->addTextCrumb(
37 pht('Build %d', $build->getID()),
38 $build->getURI())
39 ->addTextCrumb($page_title)
40 ->setBorder(true);
42 $page_header = id(new PHUIHeaderView())
43 ->setHeader($page_title);
45 $page_view = id(new PHUITwoColumnView())
46 ->setHeader($page_header)
47 ->setFooter($log_view);
49 return $this->newPage()
50 ->setTitle($page_title)
51 ->setCrumbs($crumbs)
52 ->appendChild($page_view);