Changeset View
Changeset View
Standalone View
Standalone View
src/applications/differential/view/DifferentialRevisionListView.php
Show First 20 Lines • Show All 47 Lines • ▼ Show 20 Lines | public function setBackground($background) { | ||||
return $this; | return $this; | ||||
} | } | ||||
public function getRequiredHandlePHIDs() { | public function getRequiredHandlePHIDs() { | ||||
$phids = array(); | $phids = array(); | ||||
foreach ($this->revisions as $revision) { | foreach ($this->revisions as $revision) { | ||||
$phids[] = array($revision->getAuthorPHID()); | $phids[] = array($revision->getAuthorPHID()); | ||||
$phids[] = $revision->getReviewerPHIDs(); | $phids[] = $revision->getReviewerPHIDs(); | ||||
$repo_phid = $revision->getRepositoryPHID(); | |||||
if ($repo_phid) { | |||||
$phids[] = array($revision->getRepositoryPHID()); | |||||
} | |||||
} | } | ||||
return array_mergev($phids); | return array_mergev($phids); | ||||
} | } | ||||
public function setHandles(array $handles) { | public function setHandles(array $handles) { | ||||
assert_instances_of($handles, 'PhabricatorObjectHandle'); | assert_instances_of($handles, 'PhabricatorObjectHandle'); | ||||
$this->handles = $handles; | $this->handles = $handles; | ||||
return $this; | return $this; | ||||
Show All 20 Lines | foreach ($this->revisions as $revision) { | ||||
$icons['flag'] = phutil_tag( | $icons['flag'] = phutil_tag( | ||||
'div', | 'div', | ||||
array( | array( | ||||
'class' => 'phabricator-flag-icon '.$flag_class, | 'class' => 'phabricator-flag-icon '.$flag_class, | ||||
), | ), | ||||
''); | ''); | ||||
} | } | ||||
$repo_phid = $revision->getRepositoryPHID(); | |||||
if ($repo_phid) { | |||||
$repo = $this->handles[$repo_phid]->renderLink(); | |||||
$item->addAttribute(pht('Repository: %s', $repo)); | |||||
} | |||||
if ($revision->getHasDraft($viewer)) { | if ($revision->getHasDraft($viewer)) { | ||||
$icons['draft'] = true; | $icons['draft'] = true; | ||||
} | } | ||||
$modified = $revision->getDateModified(); | $modified = $revision->getDateModified(); | ||||
if (isset($icons['flag'])) { | if (isset($icons['flag'])) { | ||||
$item->addHeadIcon($icons['flag']); | $item->addHeadIcon($icons['flag']); | ||||
▲ Show 20 Lines • Show All 80 Lines • Show Last 20 Lines |