2014-05-24 12:29:27 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
final class PhabricatorDashboardHistoryController
|
|
|
|
extends PhabricatorDashboardController {
|
|
|
|
|
2015-07-22 13:27:30 -07:00
|
|
|
public function handleRequest(AphrontRequest $request) {
|
|
|
|
$viewer = $request->getViewer();
|
|
|
|
$id = $request->getURIData('id');
|
2014-05-24 12:29:27 -07:00
|
|
|
|
|
|
|
$dashboard_view_uri = $this->getApplicationURI('view/'.$id.'/');
|
|
|
|
$dashboard_manage_uri = $this->getApplicationURI('manage/'.$id.'/');
|
|
|
|
|
|
|
|
$dashboard = id(new PhabricatorDashboardQuery())
|
|
|
|
->setViewer($viewer)
|
2015-07-22 13:27:30 -07:00
|
|
|
->withIDs(array($id))
|
2014-05-24 12:29:27 -07:00
|
|
|
->executeOne();
|
|
|
|
if (!$dashboard) {
|
|
|
|
return new Aphront404Response();
|
|
|
|
}
|
|
|
|
|
|
|
|
$title = $dashboard->getName();
|
|
|
|
|
|
|
|
$crumbs = $this->buildApplicationCrumbs();
|
2015-02-01 20:43:02 -08:00
|
|
|
$crumbs->setBorder(true);
|
2014-05-24 12:29:27 -07:00
|
|
|
$crumbs->addTextCrumb(
|
|
|
|
pht('Dashboard %d', $dashboard->getID()),
|
|
|
|
$dashboard_view_uri);
|
|
|
|
$crumbs->addTextCrumb(
|
|
|
|
pht('Manage'),
|
|
|
|
$dashboard_manage_uri);
|
|
|
|
$crumbs->addTextCrumb(pht('History'));
|
|
|
|
|
2014-12-03 13:16:15 -08:00
|
|
|
$timeline = $this->buildTransactionTimeline(
|
|
|
|
$dashboard,
|
|
|
|
new PhabricatorDashboardTransactionQuery());
|
|
|
|
$timeline->setShouldTerminate(true);
|
2014-05-24 12:29:27 -07:00
|
|
|
|
|
|
|
return $this->buildApplicationPage(
|
|
|
|
array(
|
|
|
|
$crumbs,
|
|
|
|
$timeline,
|
|
|
|
),
|
|
|
|
array(
|
|
|
|
'title' => $title,
|
|
|
|
));
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|