Conversation link as default, permalink for /notice
This commit is contained in:
parent
fa4311fa17
commit
5e4f93cc7d
@ -594,7 +594,7 @@ abstract class ActivityHandlerPlugin extends Plugin
|
||||
$nli->showNoticeLink();
|
||||
$nli->showNoticeSource();
|
||||
$nli->showNoticeLocation();
|
||||
$nli->showContext();
|
||||
$nli->showPermalink();
|
||||
$nli->showRepeat();
|
||||
|
||||
$nli->showNoticeOptions();
|
||||
|
@ -139,9 +139,7 @@ class NoticeListItem extends Widget
|
||||
$this->showNoticeLink();
|
||||
$this->showNoticeSource();
|
||||
$this->showNoticeLocation();
|
||||
if ($this->notice->hasConversation()) {
|
||||
$this->showContext();
|
||||
}
|
||||
$this->showPermalink();
|
||||
$this->showRepeat();
|
||||
Event::handle('EndShowNoticeInfo', array($this));
|
||||
}
|
||||
@ -311,7 +309,7 @@ class NoticeListItem extends Widget
|
||||
{
|
||||
$this->out->elementStart('a', array('rel' => 'bookmark',
|
||||
'class' => 'u-url timestamp',
|
||||
'href' => $this->notice->getLocalUrl()));
|
||||
'href' => Conversation::getUrlFromNotice($this->notice)));
|
||||
$this->out->element('time', array('class' => 'dt-published',
|
||||
'datetime' => common_date_iso8601($this->notice->created),
|
||||
// TRANS: Timestamp title (tooltip text) for NoticeListItem
|
||||
@ -464,20 +462,19 @@ class NoticeListItem extends Widget
|
||||
}
|
||||
|
||||
/**
|
||||
* show link to notice this notice is a reply to
|
||||
* show link to single-notice view for this notice item
|
||||
*
|
||||
* If this notice is a reply, show a link to the notice it is replying to. The
|
||||
* heavy lifting for figuring out replies happens at save time.
|
||||
* A permalink that goes to this specific object and nothing else
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showContext()
|
||||
function showPermalink()
|
||||
{
|
||||
$this->out->element('a',
|
||||
array('href' => $this->notice->getConversationUrl(),
|
||||
'class' => 'conversation'),
|
||||
// TRANS: Addition in notice list item if notice is part of a conversation.
|
||||
_('in context'));
|
||||
array('href' => $this->notice->getLocalUrl(),
|
||||
'class' => 'permalink'),
|
||||
// TRANS: Addition in notice list item for single-notice view.
|
||||
_('permalink'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -185,11 +185,6 @@ class ThreadedNoticeListItem extends NoticeListItem
|
||||
return 3;
|
||||
}
|
||||
|
||||
function showContext()
|
||||
{
|
||||
// Silence!
|
||||
}
|
||||
|
||||
/**
|
||||
* finish the notice
|
||||
*
|
||||
@ -299,11 +294,6 @@ class ThreadedNoticeListSubItem extends NoticeListItem
|
||||
//
|
||||
}
|
||||
|
||||
function showContext()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
function getReplyProfiles()
|
||||
{
|
||||
$all = parent::getReplyProfiles();
|
||||
|
@ -69,18 +69,6 @@ class ConversationTreeItem extends NoticeListItem
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* show link to notice conversation page
|
||||
*
|
||||
* Since we're only used on the conversation page, we skip this
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
function showContext()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* show people this notice is in reply to
|
||||
*
|
||||
|
@ -146,11 +146,6 @@ class NoticeTreeItem extends NoticeListItem
|
||||
return;
|
||||
}
|
||||
|
||||
function showContext()
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//Just changing the link...
|
||||
function showReplyLink()
|
||||
{
|
||||
|
@ -339,7 +339,7 @@ class QnAPlugin extends MicroAppPlugin
|
||||
$nli->showNoticeLink();
|
||||
$nli->showNoticeSource();
|
||||
$nli->showNoticeLocation();
|
||||
$nli->showContext();
|
||||
$nli->showPermalink();
|
||||
$nli->showRepeat();
|
||||
|
||||
$nli->showNoticeOptions();
|
||||
|
@ -983,6 +983,14 @@ content: ":";
|
||||
display: none;
|
||||
}
|
||||
|
||||
.notice .permalink:after {
|
||||
content: ']';
|
||||
}
|
||||
|
||||
.notice .permalink:before {
|
||||
content: '[';
|
||||
}
|
||||
|
||||
/* old school conversation style */
|
||||
|
||||
#conversation .notices .notices {
|
||||
|
Loading…
Reference in New Issue
Block a user