Skip to content

Commit 1460f2b

Browse files
author
Chad Little
committedMar 3, 2017
Add more icon choices to Badges
Summary: Ref T9010. This adds more icons and lets the IconChooser handle more icons more easier. Test Plan: Test Project Icons, Badges Icons Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T9006, T9010 Differential Revision: https://secure.phabricator.com/D17456
1 parent 5ed90b2 commit 1460f2b

File tree

2 files changed

+17
-4
lines changed

2 files changed

+17
-4
lines changed
 

‎src/applications/badges/icon/PhabricatorBadgesIconSet.php

+15-3
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,33 @@ protected function newIcons() {
1515
'fa-user' => pht('Average Person'),
1616
'fa-bug' => pht('Ladybug'),
1717
'fa-users' => pht('Triplets'),
18-
1918
'fa-book' => pht('Nominomicon'),
19+
2020
'fa-rocket' => pht('Escape Route'),
2121
'fa-life-ring' => pht('Foam Circle'),
2222
'fa-birthday-cake' => pht('Cake Day'),
23-
2423
'fa-camera-retro' => pht('Leica Enthusiast'),
2524
'fa-beer' => pht('Liquid Lunch'),
25+
2626
'fa-gift' => pht('Free Stuff'),
2727
'fa-eye' => pht('Eye See You'),
28-
2928
'fa-heart' => pht('Love is Love'),
3029
'fa-trophy' => pht('Winner at Things'),
3130
'fa-umbrella' => pht('Rain Defender'),
31+
3232
'fa-graduation-cap' => pht('In Debt'),
33+
'fa-empire' => pht('The Empire'),
34+
'fa-first-order' => pht('First Order'),
35+
'fa-rebel' => pht('Rebel'),
36+
'fa-space-shuttle' => pht('Star Ship'),
37+
38+
'fa-anchor' => pht('Anchors Away'),
39+
'fa-code' => pht('Coder'),
40+
'fa-briefcase' => pht('Serious Business'),
41+
'fa-globe' => pht('International'),
42+
'fa-desktop' => pht('Glowing Rectangle'),
43+
44+
3345
);
3446

3547
$icons = array();

‎src/applications/files/controller/PhabricatorFileIconSetSelectController.php

+2-1
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ public function handleRequest(AphrontRequest $request) {
3131

3232
$ii = 0;
3333
$buttons = array();
34+
$breakpoint = ceil(sqrt(count($set->getIcons())));
3435
foreach ($set->getIcons() as $icon) {
3536
$label = $icon->getLabel();
3637

@@ -75,7 +76,7 @@ public function handleRequest(AphrontRequest $request) {
7576
$view,
7677
));
7778

78-
if ((++$ii % 4) == 0) {
79+
if ((++$ii % $breakpoint) == 0) {
7980
$buttons[] = phutil_tag('br');
8081
}
8182
}

0 commit comments

Comments
 (0)
Failed to load comments.