If user has fn, then it will not link to their own profile with @class

'fn'. Only put @class 'fn' on the anchor if there is no fn.
This commit is contained in:
sarven 2009-01-20 23:50:52 +00:00
parent caeb74c9a5
commit 1ab0de3ddd
2 changed files with 5 additions and 4 deletions

View File

@ -243,9 +243,10 @@ class ShowstreamAction extends Action
$this->elementStart('dl', 'user_nickname');
$this->element('dt', null, _('Nickname'));
$this->elementStart('dd');
$this->element('a', array('href' => $this->profile->profileurl,
'rel' => 'me', 'class' => 'nickname url uid'),
$this->profile->nickname);
$hasFN = ($this->profile->fullname) ? 'nickname url uid' : 'fn nickname url uid';
$this->element('a', array('href' => $this->profile->profileurl,
'rel' => 'me', 'class' => $hasFN),
$this->profile->nickname);
$this->elementEnd('dd');
$this->elementEnd('dl');

View File

@ -87,7 +87,7 @@ class ProfileList extends Widget
function showProfile()
{
$this->out->elementStart('li', array('class' => 'profile vcard',
$this->out->elementStart('li', array('class' => 'profile',
'id' => 'profile-' . $this->profile->id));
$user = common_current_user();