1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-09-20 01:08:50 +02:00

Clean up user profile commit list view

Summary: Porting over a fix that we could miss the tail end of commits. Also use the new tag borderless option.

Test Plan: Review various commit pages in profile.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D18086
This commit is contained in:
Chad Little 2017-06-06 11:00:47 -07:00
parent ece651255c
commit b7f147ea0f

View file

@ -94,18 +94,10 @@ final class DiffusionCommitListView extends AphrontView {
$handles = $viewer->loadHandles($phids);
$cur_date = 0;
$list = null;
$header = null;
$view = array();
foreach ($this->commits as $commit) {
$new_date = date('Ymd', $commit->getEpoch());
if ($cur_date != $new_date) {
if ($list) {
$view[] = id(new PHUIObjectBoxView())
->setHeader($header)
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setObjectList($list);
}
$new_date = phabricator_date($commit->getEpoch(), $viewer);
if ($cur_date !== $new_date) {
$date = ucfirst(
phabricator_relative_date($commit->getEpoch(), $viewer));
$header = id(new PHUIHeaderView())
@ -113,6 +105,11 @@ final class DiffusionCommitListView extends AphrontView {
$list = id(new PHUIObjectItemListView())
->setFlush(true)
->addClass('diffusion-history-list');
$view[] = id(new PHUIObjectBoxView())
->setHeader($header)
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
->setObjectList($list);
}
$commit_phid = $commit->getPHID();
@ -146,6 +143,7 @@ final class DiffusionCommitListView extends AphrontView {
->setName($commit_name)
->setType(PHUITagView::TYPE_SHADE)
->setColor(PHUITagView::COLOR_INDIGO)
->setBorder(PHUITagView::BORDER_NONE)
->setSlimShady(true);
$item = id(new PHUIObjectItemView())