Show user profile images on User list
Summary: Ref T4400. Same deal as projects. Tweaked the CSS a touch to make it look better in these views. Test Plan: Viewed /people/. Reviewers: chad, btrahan Reviewed By: btrahan Subscribers: epriestley, chad Maniphest Tasks: T4400 Differential Revision: https://secure.phabricator.com/D8571
This commit is contained in:
@@ -7,7 +7,7 @@
|
|||||||
return array(
|
return array(
|
||||||
'names' =>
|
'names' =>
|
||||||
array(
|
array(
|
||||||
'core.pkg.css' => 'b548faff',
|
'core.pkg.css' => '4d72eb6e',
|
||||||
'core.pkg.js' => '264721e1',
|
'core.pkg.js' => '264721e1',
|
||||||
'darkconsole.pkg.js' => 'ca8671ce',
|
'darkconsole.pkg.js' => 'ca8671ce',
|
||||||
'differential.pkg.css' => 'cb97e095',
|
'differential.pkg.css' => 'cb97e095',
|
||||||
@@ -141,7 +141,7 @@ return array(
|
|||||||
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
|
'rsrc/css/phui/phui-info-panel.css' => '27ea50a1',
|
||||||
'rsrc/css/phui/phui-list.css' => '2edb76cf',
|
'rsrc/css/phui/phui-list.css' => '2edb76cf',
|
||||||
'rsrc/css/phui/phui-object-box.css' => 'ce92d8ec',
|
'rsrc/css/phui/phui-object-box.css' => 'ce92d8ec',
|
||||||
'rsrc/css/phui/phui-object-item-list-view.css' => 'a8131782',
|
'rsrc/css/phui/phui-object-item-list-view.css' => 'bde610d2',
|
||||||
'rsrc/css/phui/phui-pinboard-view.css' => '4b346c2a',
|
'rsrc/css/phui/phui-pinboard-view.css' => '4b346c2a',
|
||||||
'rsrc/css/phui/phui-property-list-view.css' => 'dbf53b12',
|
'rsrc/css/phui/phui-property-list-view.css' => 'dbf53b12',
|
||||||
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
|
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
|
||||||
@@ -758,7 +758,7 @@ return array(
|
|||||||
'phui-info-panel-css' => '27ea50a1',
|
'phui-info-panel-css' => '27ea50a1',
|
||||||
'phui-list-view-css' => '2edb76cf',
|
'phui-list-view-css' => '2edb76cf',
|
||||||
'phui-object-box-css' => 'ce92d8ec',
|
'phui-object-box-css' => 'ce92d8ec',
|
||||||
'phui-object-item-list-view-css' => 'a8131782',
|
'phui-object-item-list-view-css' => 'bde610d2',
|
||||||
'phui-pinboard-view-css' => '4b346c2a',
|
'phui-pinboard-view-css' => '4b346c2a',
|
||||||
'phui-property-list-view-css' => 'dbf53b12',
|
'phui-property-list-view-css' => 'dbf53b12',
|
||||||
'phui-remarkup-preview-css' => '19ad512b',
|
'phui-remarkup-preview-css' => '19ad512b',
|
||||||
|
|||||||
@@ -53,16 +53,14 @@ final class PhabricatorPeopleListController extends PhabricatorPeopleController
|
|||||||
$email = pht('Unverified');
|
$email = pht('Unverified');
|
||||||
}
|
}
|
||||||
|
|
||||||
$user_handle = new PhabricatorObjectHandle();
|
|
||||||
$user_handle->setImageURI($user->loadProfileImageURI());
|
|
||||||
|
|
||||||
$item = new PHUIObjectItemView();
|
$item = new PHUIObjectItemView();
|
||||||
$item->setHeader($user->getFullName())
|
$item->setHeader($user->getFullName())
|
||||||
->setHref('/p/'.$user->getUsername().'/')
|
->setHref('/p/'.$user->getUsername().'/')
|
||||||
->addAttribute(hsprintf('%s %s',
|
->addAttribute(hsprintf('%s %s',
|
||||||
phabricator_date($user->getDateCreated(), $viewer),
|
phabricator_date($user->getDateCreated(), $viewer),
|
||||||
phabricator_time($user->getDateCreated(), $viewer)))
|
phabricator_time($user->getDateCreated(), $viewer)))
|
||||||
->addAttribute($email);
|
->addAttribute($email)
|
||||||
|
->setImageURI($user->getProfileImageURI());
|
||||||
|
|
||||||
if ($user->getIsDisabled()) {
|
if ($user->getIsDisabled()) {
|
||||||
$item->addIcon('disable', pht('Disabled'));
|
$item->addIcon('disable', pht('Disabled'));
|
||||||
|
|||||||
@@ -26,7 +26,8 @@ final class PhabricatorPeopleSearchEngine
|
|||||||
|
|
||||||
public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) {
|
public function buildQueryFromSavedQuery(PhabricatorSavedQuery $saved) {
|
||||||
$query = id(new PhabricatorPeopleQuery())
|
$query = id(new PhabricatorPeopleQuery())
|
||||||
->needPrimaryEmail(true);
|
->needPrimaryEmail(true)
|
||||||
|
->needProfileImage(true);
|
||||||
|
|
||||||
$usernames = $saved->getParameter('usernames', array());
|
$usernames = $saved->getParameter('usernames', array());
|
||||||
if ($usernames) {
|
if ($usernames) {
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ final class PhabricatorUser
|
|||||||
protected $isEmailVerified = 0;
|
protected $isEmailVerified = 0;
|
||||||
protected $isApproved = 0;
|
protected $isApproved = 0;
|
||||||
|
|
||||||
private $profileImage = null;
|
private $profileImage = self::ATTACHABLE;
|
||||||
private $profile = null;
|
private $profile = null;
|
||||||
private $status = self::ATTACHABLE;
|
private $status = self::ATTACHABLE;
|
||||||
private $preferences = null;
|
private $preferences = null;
|
||||||
@@ -647,8 +647,12 @@ EOBODY;
|
|||||||
return $this;
|
return $this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getProfileImageURI() {
|
||||||
|
return $this->assertAttached($this->profileImage);
|
||||||
|
}
|
||||||
|
|
||||||
public function loadProfileImageURI() {
|
public function loadProfileImageURI() {
|
||||||
if ($this->profileImage) {
|
if ($this->profileImage && $this->profileImage !== self::ATTACHABLE) {
|
||||||
return $this->profileImage;
|
return $this->profileImage;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -572,7 +572,7 @@
|
|||||||
.phui-object-item-image {
|
.phui-object-item-image {
|
||||||
width: 50px;
|
width: 50px;
|
||||||
height: 50px;
|
height: 50px;
|
||||||
margin: 4px 4px 4px 8px;
|
margin: 4px 4px 4px 4px;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
background-color: {$lightbluebackground};
|
background-color: {$lightbluebackground};
|
||||||
}
|
}
|
||||||
@@ -582,5 +582,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.phui-object-item-with-image .phui-object-item-content-box {
|
.phui-object-item-with-image .phui-object-item-content-box {
|
||||||
margin-left: 58px;
|
margin-left: 54px;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user