"In conversation" text in noticelistitem

This commit is contained in:
Mikael Nordfeldth 2016-04-08 13:44:22 +02:00
parent 6d33c003fc
commit 4645033b98

View File

@ -189,6 +189,7 @@ class NoticeListItem extends Widget
function showNoticeInfo() function showNoticeInfo()
{ {
if (Event::handle('StartShowNoticeInfo', array($this))) { if (Event::handle('StartShowNoticeInfo', array($this))) {
$this->showContextLink();
$this->showNoticeLink(); $this->showNoticeLink();
$this->showNoticeSource(); $this->showNoticeSource();
$this->showNoticeLocation(); $this->showNoticeLocation();
@ -375,14 +376,10 @@ class NoticeListItem extends Widget
*/ */
function showNoticeLink() function showNoticeLink()
{ {
$this->out->elementStart('a', array('rel' => 'bookmark',
'class' => 'timestamp',
'href' => Conversation::getUrlFromNotice($this->notice)));
$this->out->element('time', array('class' => 'dt-published', $this->out->element('time', array('class' => 'dt-published',
'datetime' => common_date_iso8601($this->notice->created), 'datetime' => common_date_iso8601($this->notice->created),
'title' => common_exact_date($this->notice->created)), 'title' => common_exact_date($this->notice->created)),
common_date_string($this->notice->created)); common_date_string($this->notice->created));
$this->out->elementEnd('a');
} }
/** /**
@ -568,6 +565,18 @@ class NoticeListItem extends Widget
} }
} }
/**
* Show link to conversation view.
*/
function showContextLink()
{
$this->out->element('a', array('rel' => 'bookmark',
'class' => 'timestamp',
'href' => Conversation::getUrlFromNotice($this->notice)),
// TRANS: A link to the conversation view of a notice, on the local server.
_('In conversation'));
}
/** /**
* show a link to reply to the current notice * show a link to reply to the current notice
* *