Move Dashboard and Panel edit history out of the way

Summary: Fixes T5170, Create new page for dashboard history

Test Plan: Open dashboard, manage dashboard, click on "View History". Dashboard history should appear. Panel history should appear on panel view page under panel.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Maniphest Tasks: T5170

Differential Revision: https://secure.phabricator.com/D9280
This commit is contained in:
lkassianik
2014-05-24 12:29:27 -07:00
committed by epriestley
parent eace05e4a5
commit 7de4e80907
5 changed files with 80 additions and 23 deletions

View File

@@ -35,7 +35,6 @@ final class PhabricatorDashboardManageController
$header = $this->buildHeaderView($dashboard);
$actions = $this->buildActionView($dashboard);
$properties = $this->buildPropertyView($dashboard);
$timeline = $this->buildTransactions($dashboard);
$properties->setActionList($actions);
$box = id(new PHUIObjectBoxView())
@@ -52,7 +51,6 @@ final class PhabricatorDashboardManageController
array(
$crumbs,
$box,
$timeline,
$rendered_dashboard,
),
array(
@@ -111,6 +109,12 @@ final class PhabricatorDashboardManageController
->setHref($this->getApplicationURI($href_install))
->setWorkflow(true));
$actions->addAction(
id(new PhabricatorActionView())
->setName(pht('View History'))
->setIcon('fa-history')
->setHref($this->getApplicationURI("history/{$id}/")));
return $actions;
}
@@ -138,24 +142,4 @@ final class PhabricatorDashboardManageController
return $properties;
}
private function buildTransactions(PhabricatorDashboard $dashboard) {
$viewer = $this->getRequest()->getUser();
$xactions = id(new PhabricatorDashboardTransactionQuery())
->setViewer($viewer)
->withObjectPHIDs(array($dashboard->getPHID()))
->execute();
$engine = id(new PhabricatorMarkupEngine())
->setViewer($viewer);
$timeline = id(new PhabricatorApplicationTransactionView())
->setUser($viewer)
->setObjectPHID($dashboard->getPHID())
->setTransactions($xactions);
return $timeline;
}
}