showAuthor() minor update. Using a single anchor to wrap both avatar and

nickname instead of two anchors.
This commit is contained in:
sarven 2009-01-15 00:03:06 +00:00
parent eb53e96942
commit 442dcfde0e
1 changed files with 8 additions and 6 deletions

View File

@ -191,7 +191,8 @@ class NoticeListItem
function showStart() function showStart()
{ {
// XXX: RDFa // XXX: RDFa
common_element_start('li', array('class' => 'notice_single hentry', // TODO: add notice_type class e.g., notice_video, notice_image
common_element_start('li', array('class' => 'hentry notice',
'id' => 'notice-' . $this->notice->id)); 'id' => 'notice-' . $this->notice->id));
} }
@ -224,8 +225,11 @@ class NoticeListItem
function showAuthor() function showAuthor()
{ {
common_element_start('span', 'vcard author'); common_element_start('span', 'vcard author');
common_element_start('a', array('href' => $this->profile->profileurl),
'class' => 'url');
$this->showAvatar(); $this->showAvatar();
$this->showNickname(); $this->showNickname();
common_element_end('a');
common_element_end('span'); common_element_end('span');
} }
@ -241,18 +245,17 @@ class NoticeListItem
function showAvatar() function showAvatar()
{ {
$avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE); $avatar = $this->profile->getAvatar(AVATAR_STREAM_SIZE);
common_element_start('a', array('href' => $this->profile->profileurl));
common_element('img', array('src' => ($avatar) ? common_element('img', array('src' => ($avatar) ?
common_avatar_display_url($avatar) : common_avatar_display_url($avatar) :
common_default_avatar(AVATAR_STREAM_SIZE), common_default_avatar(AVATAR_STREAM_SIZE),
'class' => 'avatar stream photo', 'class' => 'avatar photo',
'width' => AVATAR_STREAM_SIZE, 'width' => AVATAR_STREAM_SIZE,
'height' => AVATAR_STREAM_SIZE, 'height' => AVATAR_STREAM_SIZE,
'alt' => 'alt' =>
($this->profile->fullname) ? ($this->profile->fullname) ?
$this->profile->fullname : $this->profile->fullname :
$this->profile->nickname)); $this->profile->nickname));
common_element_end('a');
} }
/** /**
@ -265,8 +268,7 @@ class NoticeListItem
function showNickname() function showNickname()
{ {
common_element('a', array('href' => $this->profile->profileurl, common_element('span', array('class' => 'nickname fn'),
'class' => 'nickname fn url'),
$this->profile->nickname); $this->profile->nickname);
} }