Differential D17264 Diff 41540 src/applications/owners/controller/PhabricatorOwnersDetailController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/owners/controller/PhabricatorOwnersDetailController.php
| Show First 20 Lines • Show All 62 Lines • ▼ Show 20 Lines | $header = id(new PHUIHeaderView()) | ||||
| ->setPolicyObject($package) | ->setPolicyObject($package) | ||||
| ->setHeaderIcon('fa-gift'); | ->setHeaderIcon('fa-gift'); | ||||
| $commit_views = array(); | $commit_views = array(); | ||||
| $commit_uri = id(new PhutilURI('/diffusion/commit/')) | $commit_uri = id(new PhutilURI('/diffusion/commit/')) | ||||
| ->setQueryParams( | ->setQueryParams( | ||||
| array( | array( | ||||
| 'auditorPHIDs' => $package->getPHID(), | 'package' => $package->getPHID(), | ||||
| )); | )); | ||||
| $status_concern = PhabricatorAuditCommitStatusConstants::CONCERN_RAISED; | $status_concern = PhabricatorAuditCommitStatusConstants::CONCERN_RAISED; | ||||
| $attention_commits = id(new DiffusionCommitQuery()) | $attention_commits = id(new DiffusionCommitQuery()) | ||||
| ->setViewer($request->getUser()) | ->setViewer($request->getUser()) | ||||
| ->withAuditorPHIDs(array($package->getPHID())) | ->withPackagePHIDs(array($package->getPHID())) | ||||
| ->withStatuses( | ->withStatuses( | ||||
| array( | array( | ||||
| $status_concern, | $status_concern, | ||||
| )) | )) | ||||
| ->needCommitData(true) | ->needCommitData(true) | ||||
| ->needAuditRequests(true) | ->needAuditRequests(true) | ||||
| ->setLimit(10) | ->setLimit(10) | ||||
| ->execute(); | ->execute(); | ||||
| Show All 10 Lines | $commit_views[] = array( | ||||
| ->setTag('a') | ->setTag('a') | ||||
| ->setHref($commit_uri->alter('status', $status_concern)) | ->setHref($commit_uri->alter('status', $status_concern)) | ||||
| ->setIcon('fa-list-ul') | ->setIcon('fa-list-ul') | ||||
| ->setText(pht('View All')), | ->setText(pht('View All')), | ||||
| ); | ); | ||||
| $all_commits = id(new DiffusionCommitQuery()) | $all_commits = id(new DiffusionCommitQuery()) | ||||
| ->setViewer($request->getUser()) | ->setViewer($request->getUser()) | ||||
| ->withAuditorPHIDs(array($package->getPHID())) | ->withPackagePHIDs(array($package->getPHID())) | ||||
| ->needCommitData(true) | ->needCommitData(true) | ||||
| ->needAuditRequests(true) | ->needAuditRequests(true) | ||||
| ->setLimit(25) | ->setLimit(25) | ||||
| ->execute(); | ->execute(); | ||||
| $view = id(new PhabricatorAuditListView()) | $view = id(new PhabricatorAuditListView()) | ||||
| ->setUser($viewer) | ->setUser($viewer) | ||||
| ->setCommits($all_commits) | ->setCommits($all_commits) | ||||
| ▲ Show 20 Lines • Show All 229 Lines • Show Last 20 Lines | |||||