Page MenuHomestyx hydra

No OneTemporary

diff --git a/src/applications/badges/icon/PhabricatorBadgesIconSet.php b/src/applications/badges/icon/PhabricatorBadgesIconSet.php
index 2c6742a135..cde9c12b4d 100644
--- a/src/applications/badges/icon/PhabricatorBadgesIconSet.php
+++ b/src/applications/badges/icon/PhabricatorBadgesIconSet.php
@@ -1,45 +1,57 @@
<?php
final class PhabricatorBadgesIconSet
extends PhabricatorIconSet {
const ICONSETKEY = 'badges';
public function getSelectIconTitleText() {
return pht('Choose Badge Icon');
}
protected function newIcons() {
$map = array(
'fa-star' => pht('Superstar'),
'fa-user' => pht('Average Person'),
'fa-bug' => pht('Ladybug'),
'fa-users' => pht('Triplets'),
-
'fa-book' => pht('Nominomicon'),
+
'fa-rocket' => pht('Escape Route'),
'fa-life-ring' => pht('Foam Circle'),
'fa-birthday-cake' => pht('Cake Day'),
-
'fa-camera-retro' => pht('Leica Enthusiast'),
'fa-beer' => pht('Liquid Lunch'),
+
'fa-gift' => pht('Free Stuff'),
'fa-eye' => pht('Eye See You'),
-
'fa-heart' => pht('Love is Love'),
'fa-trophy' => pht('Winner at Things'),
'fa-umbrella' => pht('Rain Defender'),
+
'fa-graduation-cap' => pht('In Debt'),
+ 'fa-empire' => pht('The Empire'),
+ 'fa-first-order' => pht('First Order'),
+ 'fa-rebel' => pht('Rebel'),
+ 'fa-space-shuttle' => pht('Star Ship'),
+
+ 'fa-anchor' => pht('Anchors Away'),
+ 'fa-code' => pht('Coder'),
+ 'fa-briefcase' => pht('Serious Business'),
+ 'fa-globe' => pht('International'),
+ 'fa-desktop' => pht('Glowing Rectangle'),
+
+
);
$icons = array();
foreach ($map as $key => $label) {
$icons[] = id(new PhabricatorIconSetIcon())
->setKey($key)
->setLabel($label);
}
return $icons;
}
}
diff --git a/src/applications/files/controller/PhabricatorFileIconSetSelectController.php b/src/applications/files/controller/PhabricatorFileIconSetSelectController.php
index 1bd14d29d0..379f9fa86e 100644
--- a/src/applications/files/controller/PhabricatorFileIconSetSelectController.php
+++ b/src/applications/files/controller/PhabricatorFileIconSetSelectController.php
@@ -1,98 +1,99 @@
<?php
final class PhabricatorFileIconSetSelectController
extends PhabricatorFileController {
public function handleRequest(AphrontRequest $request) {
$key = $request->getURIData('key');
$set = PhabricatorIconSet::getIconSetByKey($key);
if (!$set) {
return new Aphront404Response();
}
$v_icon = $request->getStr('icon');
if ($request->isFormPost()) {
$icon = $set->getIcon($v_icon);
if ($icon) {
$payload = array(
'value' => $icon->getKey(),
'display' => $set->renderIconForControl($icon),
);
return id(new AphrontAjaxResponse())
->setContent($payload);
}
}
require_celerity_resource('phui-icon-set-selector-css');
Javelin::initBehavior('phabricator-tooltips');
$ii = 0;
$buttons = array();
+ $breakpoint = ceil(sqrt(count($set->getIcons())));
foreach ($set->getIcons() as $icon) {
$label = $icon->getLabel();
$view = id(new PHUIIconView())
->setIcon($icon->getIcon());
$classes = array();
$classes[] = 'icon-button';
$is_selected = ($icon->getKey() == $v_icon);
if ($is_selected) {
$classes[] = 'selected';
}
$is_disabled = $icon->getIsDisabled();
if ($is_disabled && !$is_selected) {
continue;
}
$aural = javelin_tag(
'span',
array(
'aural' => true,
),
pht('Choose "%s" Icon', $label));
$buttons[] = javelin_tag(
'button',
array(
'class' => implode(' ', $classes),
'name' => 'icon',
'value' => $icon->getKey(),
'type' => 'submit',
'sigil' => 'has-tooltip',
'meta' => array(
'tip' => $label,
),
),
array(
$aural,
$view,
));
- if ((++$ii % 4) == 0) {
+ if ((++$ii % $breakpoint) == 0) {
$buttons[] = phutil_tag('br');
}
}
$buttons = phutil_tag(
'div',
array(
'class' => 'icon-grid',
),
$buttons);
$dialog_title = $set->getSelectIconTitleText();
return $this->newDialog()
->setTitle($dialog_title)
->appendChild($buttons)
->addCancelButton('/');
}
}

File Metadata

Mime Type
text/x-diff
Expires
Fri, Mar 14, 1:46 PM (1 d, 7 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
71912
Default Alt Text
(4 KB)

Event Timeline