showNoticeSource()
showReplyTo()
This commit is contained in:
sarven 2009-01-15 00:30:06 +00:00
parent 46b1e2fcec
commit 35645308dc
1 changed files with 13 additions and 8 deletions

View File

@ -225,8 +225,8 @@ 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), common_element_start('a', array('href' => $this->profile->profileurl,
'class' => 'url'); 'class' => 'url'));
$this->showAvatar(); $this->showAvatar();
$this->showNickname(); $this->showNickname();
common_element_end('a'); common_element_end('a');
@ -352,7 +352,8 @@ class NoticeListItem
function showNoticeSource() function showNoticeSource()
{ {
if ($this->notice->source) { if ($this->notice->source) {
common_element('span', null, _(' from ')); $this->elementStart('dl', 'device');
$this->element('dt', null, _('From'));
$source_name = _($this->notice->source); $source_name = _($this->notice->source);
switch ($this->notice->source) { switch ($this->notice->source) {
case 'web': case 'web':
@ -360,18 +361,22 @@ class NoticeListItem
case 'mail': case 'mail':
case 'omb': case 'omb':
case 'api': case 'api':
common_element('span', 'noticesource', $source_name); $this->element('dd', 'noticesource', $source_name);
break; break;
default: default:
$ns = Notice_source::staticGet($this->notice->source); $ns = Notice_source::staticGet($this->notice->source);
if ($ns) { if ($ns) {
common_element('a', array('href' => $ns->url), $this->elementStart('dd', null);
$this->element('a', array('href' => $ns->url,
'rel' => 'external'),
$ns->name); $ns->name);
$this->elementEnd('dd');
} else { } else {
common_element('span', 'noticesource', $source_name); $this->element('dd', 'noticesource', $source_name);
} }
break; break;
} }
$this->elementEnd('dl');
} }
} }
@ -393,8 +398,8 @@ class NoticeListItem
$this->element('dt', null, _('To')); $this->element('dt', null, _('To'));
$this->elementStart('dd'); $this->elementStart('dd');
$this->element('a', array('class' => 'inreplyto', $this->element('a', array('class' => 'inreplyto',
'href' => $replyurl), 'href' => $replyurl,
'rel' => 'in-reply-to', 'rel' => 'in-reply-to'),
_('in reply to')); _('in reply to'));
$this->elementEnd('dd'); $this->elementEnd('dd');
$this->elementEnd('dl'); $this->elementEnd('dl');