1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-23 15:22:41 +01:00

Show "no badges" text in people profiles with archived badges only

Summary: Fixes T10670, for users with exclusively archived badges, user profile should show "no badges" message instead of blank box

Test Plan: Award badge to user with no badges, archive badge, user profile should show "no badges" message under badges.

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: Korvin

Maniphest Tasks: T10670

Differential Revision: https://secure.phabricator.com/D15538
This commit is contained in:
lkassianik 2016-03-28 11:10:27 -07:00
parent bf3879b1c7
commit 878b941309

View file

@ -188,7 +188,11 @@ final class PhabricatorPeopleProfileViewController
->withPHIDs($badge_phids)
->withStatuses(array(PhabricatorBadgesBadge::STATUS_ACTIVE))
->execute();
} else {
$badges = array();
}
if (count($badges)) {
$flex = new PHUIBadgeBoxView();
foreach ($badges as $badge) {
$item = id(new PHUIBadgeView())
@ -198,7 +202,6 @@ final class PhabricatorPeopleProfileViewController
->setQuality($badge->getQuality());
$flex->addItem($item);
}
} else {
$error = id(new PHUIBoxView())
->addClass('mlb')