mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-19 19:21:10 +01:00
Fixing UI Example that use badge qualities
Summary: Fixes T10706 Test Plan: Open UI Example of badges. Shouldn't be broken Reviewers: epriestley, #blessed_reviewers, chad Reviewed By: #blessed_reviewers, chad Subscribers: Korvin Maniphest Tasks: T10706 Differential Revision: https://secure.phabricator.com/D15723
This commit is contained in:
parent
cd8491ae93
commit
7b27653f57
3 changed files with 13 additions and 14 deletions
|
@ -54,7 +54,7 @@ final class PHUIBadgeExample extends PhabricatorUIExample {
|
||||||
->setIcon('fa-user')
|
->setIcon('fa-user')
|
||||||
->setHeader(pht('Phabricator User'))
|
->setHeader(pht('Phabricator User'))
|
||||||
->setSubhead(pht('Confirmed your account.'))
|
->setSubhead(pht('Confirmed your account.'))
|
||||||
->setQuality(PHUIBadgeView::POOR)
|
->setQuality(PhabricatorBadgesQuality::POOR)
|
||||||
->setSource(pht('People (automatic)'))
|
->setSource(pht('People (automatic)'))
|
||||||
->addByline(pht('Dec 31, 1969'))
|
->addByline(pht('Dec 31, 1969'))
|
||||||
->addByline('212 Issued (100%)');
|
->addByline('212 Issued (100%)');
|
||||||
|
@ -63,7 +63,7 @@ final class PHUIBadgeExample extends PhabricatorUIExample {
|
||||||
->setIcon('fa-code')
|
->setIcon('fa-code')
|
||||||
->setHeader(pht('Code Contributor'))
|
->setHeader(pht('Code Contributor'))
|
||||||
->setSubhead(pht('Wrote code that was acceptable'))
|
->setSubhead(pht('Wrote code that was acceptable'))
|
||||||
->setQuality(PHUIBadgeView::COMMON)
|
->setQuality(PhabricatorBadgesQuality::COMMON)
|
||||||
->setSource('Diffusion (automatic)')
|
->setSource('Diffusion (automatic)')
|
||||||
->addByline(pht('Dec 31, 1969'))
|
->addByline(pht('Dec 31, 1969'))
|
||||||
->addByline('200 Awarded (98%)');
|
->addByline('200 Awarded (98%)');
|
||||||
|
@ -72,7 +72,7 @@ final class PHUIBadgeExample extends PhabricatorUIExample {
|
||||||
->setIcon('fa-bug')
|
->setIcon('fa-bug')
|
||||||
->setHeader(pht('Task Master'))
|
->setHeader(pht('Task Master'))
|
||||||
->setSubhead(pht('Closed over 100 tasks'))
|
->setSubhead(pht('Closed over 100 tasks'))
|
||||||
->setQuality(PHUIBadgeView::UNCOMMON)
|
->setQuality(PhabricatorBadgesQuality::UNCOMMON)
|
||||||
->setSource('Maniphest (automatic)')
|
->setSource('Maniphest (automatic)')
|
||||||
->addByline(pht('Dec 31, 1969'))
|
->addByline(pht('Dec 31, 1969'))
|
||||||
->addByline('56 Awarded (43%)');
|
->addByline('56 Awarded (43%)');
|
||||||
|
@ -81,7 +81,7 @@ final class PHUIBadgeExample extends PhabricatorUIExample {
|
||||||
->setIcon('fa-star')
|
->setIcon('fa-star')
|
||||||
->setHeader(pht('Code Weaver'))
|
->setHeader(pht('Code Weaver'))
|
||||||
->setSubhead(pht('Landed 1,000 Commits'))
|
->setSubhead(pht('Landed 1,000 Commits'))
|
||||||
->setQuality(PHUIBadgeView::RARE)
|
->setQuality(PhabricatorBadgesQuality::RARE)
|
||||||
->setSource('Diffusion (automatic)')
|
->setSource('Diffusion (automatic)')
|
||||||
->addByline(pht('Dec 31, 1969'))
|
->addByline(pht('Dec 31, 1969'))
|
||||||
->addByline('42 Awarded (20%)');
|
->addByline('42 Awarded (20%)');
|
||||||
|
@ -90,7 +90,7 @@ final class PHUIBadgeExample extends PhabricatorUIExample {
|
||||||
->setIcon('fa-users')
|
->setIcon('fa-users')
|
||||||
->setHeader(pht('Security Team'))
|
->setHeader(pht('Security Team'))
|
||||||
->setSubhead(pht('<script>alert(1);</script>'))
|
->setSubhead(pht('<script>alert(1);</script>'))
|
||||||
->setQuality(PHUIBadgeView::EPIC)
|
->setQuality(PhabricatorBadgesQuality::EPIC)
|
||||||
->setSource('Projects (automatic)')
|
->setSource('Projects (automatic)')
|
||||||
->addByline(pht('Dec 31, 1969'))
|
->addByline(pht('Dec 31, 1969'))
|
||||||
->addByline('21 Awarded (10%)');
|
->addByline('21 Awarded (10%)');
|
||||||
|
@ -99,7 +99,7 @@ final class PHUIBadgeExample extends PhabricatorUIExample {
|
||||||
->setIcon('fa-user')
|
->setIcon('fa-user')
|
||||||
->setHeader(pht('Adminstrator'))
|
->setHeader(pht('Adminstrator'))
|
||||||
->setSubhead(pht('Drew the short stick'))
|
->setSubhead(pht('Drew the short stick'))
|
||||||
->setQuality(PHUIBadgeView::LEGENDARY)
|
->setQuality(PhabricatorBadgesQuality::LEGENDARY)
|
||||||
->setSource(pht('People (automatic)'))
|
->setSource(pht('People (automatic)'))
|
||||||
->addByline(pht('Dec 31, 1969'))
|
->addByline(pht('Dec 31, 1969'))
|
||||||
->addByline('3 Awarded (1.4%)');
|
->addByline('3 Awarded (1.4%)');
|
||||||
|
@ -108,7 +108,7 @@ final class PHUIBadgeExample extends PhabricatorUIExample {
|
||||||
->setIcon('fa-compass')
|
->setIcon('fa-compass')
|
||||||
->setHeader(pht('Lead Developer'))
|
->setHeader(pht('Lead Developer'))
|
||||||
->setSubhead(pht('Lead Developer of Phabricator'))
|
->setSubhead(pht('Lead Developer of Phabricator'))
|
||||||
->setQuality(PHUIBadgeView::HEIRLOOM)
|
->setQuality(PhabricatorBadgesQuality::HEIRLOOM)
|
||||||
->setSource(pht('Direct Award (epriestley)'))
|
->setSource(pht('Direct Award (epriestley)'))
|
||||||
->addByline(pht('Dec 31, 1969'))
|
->addByline(pht('Dec 31, 1969'))
|
||||||
->addByline('1 Awarded (0.4%)');
|
->addByline('1 Awarded (0.4%)');
|
||||||
|
@ -129,17 +129,17 @@ final class PHUIBadgeExample extends PhabricatorUIExample {
|
||||||
$badges3[] = id(new PHUIBadgeMiniView())
|
$badges3[] = id(new PHUIBadgeMiniView())
|
||||||
->setIcon('fa-heart')
|
->setIcon('fa-heart')
|
||||||
->setHeader(pht('Funder'))
|
->setHeader(pht('Funder'))
|
||||||
->setQuality(PHUIBadgeView::UNCOMMON);
|
->setQuality(PhabricatorBadgesQuality::UNCOMMON);
|
||||||
|
|
||||||
$badges3[] = id(new PHUIBadgeMiniView())
|
$badges3[] = id(new PHUIBadgeMiniView())
|
||||||
->setIcon('fa-user')
|
->setIcon('fa-user')
|
||||||
->setHeader(pht('Administrator'))
|
->setHeader(pht('Administrator'))
|
||||||
->setQuality(PHUIBadgeView::RARE);
|
->setQuality(PhabricatorBadgesQuality::RARE);
|
||||||
|
|
||||||
$badges3[] = id(new PHUIBadgeMiniView())
|
$badges3[] = id(new PHUIBadgeMiniView())
|
||||||
->setIcon('fa-camera-retro')
|
->setIcon('fa-camera-retro')
|
||||||
->setHeader(pht('Designer'))
|
->setHeader(pht('Designer'))
|
||||||
->setQuality(PHUIBadgeView::EPIC);
|
->setQuality(PhabricatorBadgesQuality::EPIC);
|
||||||
|
|
||||||
$flex1 = new PHUIBadgeBoxView();
|
$flex1 = new PHUIBadgeBoxView();
|
||||||
$flex1->addItems($badges1);
|
$flex1->addItems($badges1);
|
||||||
|
|
|
@ -75,7 +75,7 @@ final class PHUIBoxExample extends PhabricatorUIExample {
|
||||||
$badge2 = id(new PHUIBadgeMiniView())
|
$badge2 = id(new PHUIBadgeMiniView())
|
||||||
->setIcon('fa-heart')
|
->setIcon('fa-heart')
|
||||||
->setHeader(pht('Funder'))
|
->setHeader(pht('Funder'))
|
||||||
->setQuality(PHUIBadgeView::UNCOMMON);
|
->setQuality(PhabricatorBadgesQuality::UNCOMMON);
|
||||||
|
|
||||||
$header = id(new PHUIHeaderView())
|
$header = id(new PHUIHeaderView())
|
||||||
->setHeader(pht('Fancy Box'))
|
->setHeader(pht('Fancy Box'))
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
final class PHUITimelineExample extends PhabricatorUIExample {
|
final class PHUITimelineExample extends PhabricatorUIExample {
|
||||||
|
|
||||||
public function getName() {
|
public function getName() {
|
||||||
|
@ -24,12 +23,12 @@ final class PHUITimelineExample extends PhabricatorUIExample {
|
||||||
$designer = id(new PHUIBadgeMiniView())
|
$designer = id(new PHUIBadgeMiniView())
|
||||||
->setIcon('fa-camera-retro')
|
->setIcon('fa-camera-retro')
|
||||||
->setHeader(pht('Designer'))
|
->setHeader(pht('Designer'))
|
||||||
->setQuality(PHUIBadgeView::EPIC);
|
->setQuality(PhabricatorBadgesQuality::EPIC);
|
||||||
|
|
||||||
$admin = id(new PHUIBadgeMiniView())
|
$admin = id(new PHUIBadgeMiniView())
|
||||||
->setIcon('fa-user')
|
->setIcon('fa-user')
|
||||||
->setHeader(pht('Administrator'))
|
->setHeader(pht('Administrator'))
|
||||||
->setQuality(PHUIBadgeView::RARE);
|
->setQuality(PhabricatorBadgesQuality::RARE);
|
||||||
|
|
||||||
$events = array();
|
$events = array();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue