mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 13:30:55 +01:00
Always give users "fa-user" icons in tokenizers
Summary: Fixes T10247. The flavor icons are unhelpful/confusing in these contexts; show a boringer icon instead. Test Plan: Used tokenizer to select user with custom profile icon. Reloaded page. Saw boringer icon in both cases. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10247 Differential Revision: https://secure.phabricator.com/D15154
This commit is contained in:
parent
08e7b6f79f
commit
18f34fab73
3 changed files with 19 additions and 3 deletions
|
@ -54,8 +54,10 @@ final class PhabricatorPeopleUserPHIDType extends PhabricatorPHIDType {
|
||||||
$icon_icon = PhabricatorPeopleIconSet::getIconIcon($icon_key);
|
$icon_icon = PhabricatorPeopleIconSet::getIconIcon($icon_key);
|
||||||
$subtitle = $profile->getDisplayTitle();
|
$subtitle = $profile->getDisplayTitle();
|
||||||
|
|
||||||
$handle->setIcon($icon_icon);
|
$handle
|
||||||
$handle->setSubtitle($subtitle);
|
->setIcon($icon_icon)
|
||||||
|
->setSubtitle($subtitle)
|
||||||
|
->setTokenIcon('fa-user');
|
||||||
}
|
}
|
||||||
|
|
||||||
$availability = null;
|
$availability = null;
|
||||||
|
|
|
@ -28,6 +28,7 @@ final class PhabricatorObjectHandle
|
||||||
private $objectName;
|
private $objectName;
|
||||||
private $policyFiltered;
|
private $policyFiltered;
|
||||||
private $subtitle;
|
private $subtitle;
|
||||||
|
private $tokenIcon;
|
||||||
|
|
||||||
public function setIcon($icon) {
|
public function setIcon($icon) {
|
||||||
$this->icon = $icon;
|
$this->icon = $icon;
|
||||||
|
@ -86,6 +87,19 @@ final class PhabricatorObjectHandle
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setTokenIcon($icon) {
|
||||||
|
$this->tokenIcon = $icon;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getTokenIcon() {
|
||||||
|
if ($this->tokenIcon !== null) {
|
||||||
|
return $this->tokenIcon;
|
||||||
|
}
|
||||||
|
|
||||||
|
return $this->getIcon();
|
||||||
|
}
|
||||||
|
|
||||||
public function getTypeIcon() {
|
public function getTypeIcon() {
|
||||||
if ($this->getPHIDType()) {
|
if ($this->getPHIDType()) {
|
||||||
return $this->getPHIDType()->getTypeIcon();
|
return $this->getPHIDType()->getTypeIcon();
|
||||||
|
|
|
@ -32,7 +32,7 @@ final class PhabricatorTypeaheadTokenView
|
||||||
$token = id(new PhabricatorTypeaheadTokenView())
|
$token = id(new PhabricatorTypeaheadTokenView())
|
||||||
->setKey($handle->getPHID())
|
->setKey($handle->getPHID())
|
||||||
->setValue($handle->getFullName())
|
->setValue($handle->getFullName())
|
||||||
->setIcon($handle->getIcon());
|
->setIcon($handle->getTokenIcon());
|
||||||
|
|
||||||
if ($handle->isDisabled() ||
|
if ($handle->isDisabled() ||
|
||||||
$handle->getStatus() == PhabricatorObjectHandle::STATUS_CLOSED) {
|
$handle->getStatus() == PhabricatorObjectHandle::STATUS_CLOSED) {
|
||||||
|
|
Loading…
Reference in a new issue