Changeset View
Changeset View
Standalone View
Standalone View
src/applications/diffusion/view/DiffusionHistoryListView.php
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | foreach ($this->getHistory() as $history) { | ||||
'commit' => $history->getCommitIdentifier(), | 'commit' => $history->getCommitIdentifier(), | ||||
'branch' => $drequest->getBranch(), | 'branch' => $drequest->getBranch(), | ||||
'type' => $history->getFileType(), | 'type' => $history->getFileType(), | ||||
), | ), | ||||
true); | true); | ||||
$diff_tag = null; | $diff_tag = null; | ||||
if ($show_revisions && $commit) { | if ($show_revisions && $commit) { | ||||
$d_id = idx($this->getRevisions(), $commit->getPHID()); | $revisions = $this->getRevisionsForCommit($commit); | ||||
if ($d_id) { | if ($revisions) { | ||||
$revision = head($revisions); | |||||
$diff_tag = id(new PHUITagView()) | $diff_tag = id(new PHUITagView()) | ||||
->setName('D'.$d_id) | ->setName($revision->getMonogram()) | ||||
->setType(PHUITagView::TYPE_SHADE) | ->setType(PHUITagView::TYPE_SHADE) | ||||
->setColor(PHUITagView::COLOR_BLUE) | ->setColor(PHUITagView::COLOR_BLUE) | ||||
->setHref('/D'.$d_id) | ->setHref($revision->getURI()) | ||||
->setBorder(PHUITagView::BORDER_NONE) | ->setBorder(PHUITagView::BORDER_NONE) | ||||
->setSlimShady(true); | ->setSlimShady(true); | ||||
} | } | ||||
} | } | ||||
$build_view = null; | $build_view = null; | ||||
if ($show_builds) { | if ($show_builds) { | ||||
$buildable = idx($buildables, $commit->getPHID()); | $buildable = idx($buildables, $commit->getPHID()); | ||||
if ($buildable !== null) { | if ($buildable !== null) { | ||||
$build_view = $this->renderBuildable($buildable, 'button'); | $build_view = $this->renderBuildable($buildable, 'button'); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 47 Lines • Show Last 20 Lines |