@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator

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

+17 -4
+15 -3
src/applications/badges/icon/PhabricatorBadgesIconSet.php
··· 15 15 'fa-user' => pht('Average Person'), 16 16 'fa-bug' => pht('Ladybug'), 17 17 'fa-users' => pht('Triplets'), 18 - 19 18 'fa-book' => pht('Nominomicon'), 19 + 20 20 'fa-rocket' => pht('Escape Route'), 21 21 'fa-life-ring' => pht('Foam Circle'), 22 22 'fa-birthday-cake' => pht('Cake Day'), 23 - 24 23 'fa-camera-retro' => pht('Leica Enthusiast'), 25 24 'fa-beer' => pht('Liquid Lunch'), 25 + 26 26 'fa-gift' => pht('Free Stuff'), 27 27 'fa-eye' => pht('Eye See You'), 28 - 29 28 'fa-heart' => pht('Love is Love'), 30 29 'fa-trophy' => pht('Winner at Things'), 31 30 'fa-umbrella' => pht('Rain Defender'), 31 + 32 32 '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 + 33 45 ); 34 46 35 47 $icons = array();
+2 -1
src/applications/files/controller/PhabricatorFileIconSetSelectController.php
··· 31 31 32 32 $ii = 0; 33 33 $buttons = array(); 34 + $breakpoint = ceil(sqrt(count($set->getIcons()))); 34 35 foreach ($set->getIcons() as $icon) { 35 36 $label = $icon->getLabel(); 36 37 ··· 75 76 $view, 76 77 )); 77 78 78 - if ((++$ii % 4) == 0) { 79 + if ((++$ii % $breakpoint) == 0) { 79 80 $buttons[] = phutil_tag('br'); 80 81 } 81 82 }