1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-29 02:02:41 +01:00
phorge-phorge/src/applications/dashboard/controller/PhabricatorDashboardHistoryController.php
Chad Little 0bbcd3888c Update Dashboard for handleRequest
Summary: Updates Dashboards

Test Plan: Bounced around lists, installed, history, create panel, create dashboard, etc.

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T8628

Differential Revision: https://secure.phabricator.com/D13680
2015-07-22 13:27:30 -07:00

48 lines
1.2 KiB
PHP

<?php
final class PhabricatorDashboardHistoryController
extends PhabricatorDashboardController {
public function handleRequest(AphrontRequest $request) {
$viewer = $request->getViewer();
$id = $request->getURIData('id');
$dashboard_view_uri = $this->getApplicationURI('view/'.$id.'/');
$dashboard_manage_uri = $this->getApplicationURI('manage/'.$id.'/');
$dashboard = id(new PhabricatorDashboardQuery())
->setViewer($viewer)
->withIDs(array($id))
->executeOne();
if (!$dashboard) {
return new Aphront404Response();
}
$title = $dashboard->getName();
$crumbs = $this->buildApplicationCrumbs();
$crumbs->setBorder(true);
$crumbs->addTextCrumb(
pht('Dashboard %d', $dashboard->getID()),
$dashboard_view_uri);
$crumbs->addTextCrumb(
pht('Manage'),
$dashboard_manage_uri);
$crumbs->addTextCrumb(pht('History'));
$timeline = $this->buildTransactionTimeline(
$dashboard,
new PhabricatorDashboardTransactionQuery());
$timeline->setShouldTerminate(true);
return $this->buildApplicationPage(
array(
$crumbs,
$timeline,
),
array(
'title' => $title,
));
}
}