diff --git a/lib/profilelist.php b/lib/profilelist.php index 2aa4772749..d44efe164f 100644 --- a/lib/profilelist.php +++ b/lib/profilelist.php @@ -157,6 +157,10 @@ class ProfileListItem extends Widget $this->out->elementEnd('a'); Event::handle('EndProfileListItemAvatar', array($this)); } + if (Event::handle('StartProfileListItemNickname', array($this))) { + $this->showNickname(); + Event::handle('EndProfileListItemNickname', array($this)); + } if (Event::handle('StartProfileListItemFullName', array($this))) { $this->showFullName(); Event::handle('EndProfileListItemFullName', array($this)); @@ -187,23 +191,24 @@ class ProfileListItem extends Widget $this->out->elementStart('div', 'entity_profile h-card'); } + function showNickname() + { + $this->out->element('a', array('href'=>$this->profile->getUrl(), + 'class'=>'p-nickname'), + $this->profile->getNickname()); + } + function showFullName() { if (!empty($this->profile->fullname)) { - $this->out->text(' '); - $this->out->elementStart('span', 'p-name'); - $this->out->raw($this->highlight($this->profile->fullname)); - $this->out->elementEnd('span'); + $this->out->element('span', 'p-name', $this->profile->fullname); } } function showLocation() { if (!empty($this->profile->location)) { - $this->out->text(' '); - $this->out->elementStart('span', 'label'); - $this->out->raw($this->highlight($this->profile->location)); - $this->out->elementEnd('span'); + $this->out->element('span', 'label p-location', $this->profile->location); } } diff --git a/lib/subscriptionlist.php b/lib/subscriptionlist.php index 09a660052c..a038d06980 100644 --- a/lib/subscriptionlist.php +++ b/lib/subscriptionlist.php @@ -77,6 +77,7 @@ class SubscriptionListItem extends ProfileListItem { $this->startProfile(); $this->showAvatar($this->profile); + $this->showNickname(); $this->showFullName(); $this->showLocation(); $this->showHomepage(); diff --git a/plugins/Directory/lib/sortablesubscriptionlist.php b/plugins/Directory/lib/sortablesubscriptionlist.php index 8cc2657b5c..4a9d50110b 100644 --- a/plugins/Directory/lib/sortablesubscriptionlist.php +++ b/plugins/Directory/lib/sortablesubscriptionlist.php @@ -191,7 +191,7 @@ class SortableSubscriptionListItem extends SubscriptionListItem function startProfile() { - $this->out->elementStart('td', 'entity_profile h-card e-content'); + $this->out->elementStart('td', 'entity_profile h-card'); } function endProfile() diff --git a/theme/base/css/display.css b/theme/base/css/display.css index d837a67c8e..fa346bf279 100644 --- a/theme/base/css/display.css +++ b/theme/base/css/display.css @@ -1593,6 +1593,13 @@ height:16px; top: -3px; } +table.profile_list .h-card .u-photo { + margin-right: 4px; +} +table.profile_list .h-card .p-nickname { + display: block; +} + .entity_profile .entity_nickname, .entity_profile .entity_fn { margin-left:0; @@ -1879,14 +1886,6 @@ margin-left:0; display:inline; } -.profile .entity_profile .p-name, -.profile .entity_profile .label { -margin-left:11px; -margin-bottom:4px; -width:auto; -clear:none; -} - .profile .entity_profile .note, .profile .entity_profile .u-url, .profile .entity_profile .entity_tags,