mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-10 00:42: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:
parent
bf3879b1c7
commit
878b941309
1 changed files with 4 additions and 1 deletions
|
@ -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')
|
||||
|
|
Loading…
Reference in a new issue