Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/view/DiffusionTagListView.php
Show First 20 Lines • Show All 144 Lines • ▼ Show 20 Lines | final class DiffusionTagListView extends DiffusionView { | ||||
private function renderAuthor( | private function renderAuthor( | ||||
DiffusionRepositoryTag $tag, | DiffusionRepositoryTag $tag, | ||||
PhabricatorRepositoryCommit $commit) { | PhabricatorRepositoryCommit $commit) { | ||||
$viewer = $this->getViewer(); | $viewer = $this->getViewer(); | ||||
if ($commit->getAuthorPHID()) { | if ($commit->getAuthorPHID()) { | ||||
$author = $this->handles[$commit->getAuthorPHID()]->renderLink(); | $author = $this->handles[$commit->getAuthorPHID()]->renderLink(); | ||||
} else if ($commit->getCommitData()) { | } else if ($commit->getCommitData()) { | ||||
$author = self::renderName($commit->getCommitData()->getAuthorName()); | $author = self::renderName($commit->getCommitData()->getAuthorString()); | ||||
} else { | } else { | ||||
$author = self::renderName($tag->getAuthor()); | $author = self::renderName($tag->getAuthor()); | ||||
} | } | ||||
$committed = phabricator_datetime($commit->getEpoch(), $viewer); | $committed = phabricator_datetime($commit->getEpoch(), $viewer); | ||||
$author_name = phutil_tag( | $author_name = phutil_tag( | ||||
'strong', | 'strong', | ||||
array( | array( | ||||
'class' => 'diffusion-history-author-name', | 'class' => 'diffusion-history-author-name', | ||||
), | ), | ||||
$author); | $author); | ||||
return pht('%s on %s.', $author_name, $committed); | return pht('%s on %s.', $author_name, $committed); | ||||
} | } | ||||
} | } |