Changeset View
Changeset View
Standalone View
Standalone View
src/applications/audit/view/PhabricatorAuditListView.php
Show First 20 Lines • Show All 133 Lines • ▼ Show 20 Lines | foreach ($this->commits as $commit) { | ||||
$author_name = $handles[$author_phid]->renderLink(); | $author_name = $handles[$author_phid]->renderLink(); | ||||
} else { | } else { | ||||
$author_name = $commit->getCommitData()->getAuthorName(); | $author_name = $commit->getCommitData()->getAuthorName(); | ||||
} | } | ||||
$item = id(new PHUIObjectItemView()) | $item = id(new PHUIObjectItemView()) | ||||
->setObjectName($commit_name) | ->setObjectName($commit_name) | ||||
->setHeader($commit_desc) | ->setHeader($commit_desc) | ||||
->setHref($commit_link); | ->setHref($commit_link) | ||||
->addByline(pht('Author: %s', $author_name)) | |||||
->addIcon('none', $committed); | |||||
if ($show_drafts) { | if ($show_drafts) { | ||||
if ($commit->getHasDraft($viewer)) { | if ($commit->getHasDraft($viewer)) { | ||||
$item->addAttribute($draft_icon); | $item->addAttribute($draft_icon); | ||||
} | } | ||||
} | } | ||||
$item | |||||
->addAttribute(pht('Author: %s', $author_name)) | |||||
->addIcon('none', $committed); | |||||
$audits = $commit->getAudits(); | $audits = $commit->getAudits(); | ||||
$auditor_phids = mpull($audits, 'getAuditorPHID'); | $auditor_phids = mpull($audits, 'getAuditorPHID'); | ||||
if ($auditor_phids) { | if ($auditor_phids) { | ||||
$item->addByLine( | $auditor_list = $handles->newSublist($auditor_phids) | ||||
array( | ->renderList() | ||||
pht('Auditors:'), | ->setAsInline(true); | ||||
' ', | } else { | ||||
$handles->newSublist($auditor_phids)->renderList(), | $auditor_list = phutil_tag('em', array(), pht('None')); | ||||
)); | |||||
} | } | ||||
$item->addAttribute(pht('Auditors: %s', $auditor_list)); | |||||
if ($status_color) { | if ($status_color) { | ||||
$item->setStatusIcon($status_icon.' '.$status_color, $status_text); | $item->setStatusIcon($status_icon.' '.$status_color, $status_text); | ||||
} | } | ||||
$list->addItem($item); | $list->addItem($item); | ||||
} | } | ||||
Show All 12 Lines |