Differential D15183 Diff 36655 src/applications/project/controller/PhabricatorProjectColumnDetailController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/project/controller/PhabricatorProjectColumnDetailController.php
Show All 16 Lines | $project = id(new PhabricatorProjectQuery()) | ||||
->withIDs(array($project_id)) | ->withIDs(array($project_id)) | ||||
->needImages(true) | ->needImages(true) | ||||
->executeOne(); | ->executeOne(); | ||||
if (!$project) { | if (!$project) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
$this->setProject($project); | $this->setProject($project); | ||||
$project_id = $project->getID(); | |||||
$column = id(new PhabricatorProjectColumnQuery()) | $column = id(new PhabricatorProjectColumnQuery()) | ||||
->setViewer($viewer) | ->setViewer($viewer) | ||||
->withIDs(array($id)) | ->withIDs(array($id)) | ||||
->requireCapabilities( | ->requireCapabilities( | ||||
array( | array( | ||||
PhabricatorPolicyCapability::CAN_VIEW, | PhabricatorPolicyCapability::CAN_VIEW, | ||||
)) | )) | ||||
->executeOne(); | ->executeOne(); | ||||
if (!$column) { | if (!$column) { | ||||
return new Aphront404Response(); | return new Aphront404Response(); | ||||
} | } | ||||
$timeline = $this->buildTransactionTimeline( | $timeline = $this->buildTransactionTimeline( | ||||
$column, | $column, | ||||
new PhabricatorProjectColumnTransactionQuery()); | new PhabricatorProjectColumnTransactionQuery()); | ||||
$timeline->setShouldTerminate(true); | $timeline->setShouldTerminate(true); | ||||
$title = $column->getDisplayName(); | $title = $column->getDisplayName(); | ||||
$header = $this->buildHeaderView($column); | $header = $this->buildHeaderView($column); | ||||
$actions = $this->buildActionView($column); | $actions = $this->buildActionView($column); | ||||
$properties = $this->buildPropertyView($column, $actions); | $properties = $this->buildPropertyView($column, $actions); | ||||
$crumbs = $this->buildApplicationCrumbs(); | |||||
$crumbs->addTextCrumb(pht('Workboard'), "/project/board/{$project_id}/"); | |||||
$crumbs->addTextCrumb(pht('Column: %s', $title)); | |||||
$box = id(new PHUIObjectBoxView()) | $box = id(new PHUIObjectBoxView()) | ||||
->setHeader($header) | ->setHeader($header) | ||||
->addPropertyList($properties); | ->addPropertyList($properties); | ||||
$nav = $this->getProfileMenu(); | $nav = $this->getProfileMenu(); | ||||
return $this->newPage() | return $this->newPage() | ||||
->setTitle($title) | ->setTitle($title) | ||||
->setNavigation($nav) | ->setNavigation($nav) | ||||
->setCrumbs($crumbs) | |||||
->appendChild( | ->appendChild( | ||||
array( | array( | ||||
$box, | $box, | ||||
$timeline, | $timeline, | ||||
)); | )); | ||||
} | } | ||||
private function buildHeaderView(PhabricatorProjectColumn $column) { | private function buildHeaderView(PhabricatorProjectColumn $column) { | ||||
▲ Show 20 Lines • Show All 59 Lines • Show Last 20 Lines |