forked from GNUsocial/gnu-social
Show permalinks only for local notices
the "from [site]" already links to the permalink
This commit is contained in:
parent
7ea067a0dc
commit
e90a1f44c4
@ -308,7 +308,7 @@ class NoticeListItem extends Widget
|
|||||||
function showNoticeLink()
|
function showNoticeLink()
|
||||||
{
|
{
|
||||||
$this->out->elementStart('a', array('rel' => 'bookmark',
|
$this->out->elementStart('a', array('rel' => 'bookmark',
|
||||||
'class' => 'u-url timestamp',
|
'class' => 'timestamp',
|
||||||
'href' => Conversation::getUrlFromNotice($this->notice)));
|
'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),
|
||||||
@ -472,11 +472,19 @@ class NoticeListItem extends Widget
|
|||||||
*/
|
*/
|
||||||
function showPermalink()
|
function showPermalink()
|
||||||
{
|
{
|
||||||
|
$class = 'permalink u-url';
|
||||||
|
if (!$this->notice->isLocal()) {
|
||||||
|
$class .= ' external';
|
||||||
|
}
|
||||||
|
try {
|
||||||
$this->out->element('a',
|
$this->out->element('a',
|
||||||
array('href' => $this->notice->getLocalUrl(),
|
array('href' => $this->notice->getUrl(),
|
||||||
'class' => 'permalink'),
|
'class' => $class),
|
||||||
// TRANS: Addition in notice list item for single-notice view.
|
// TRANS: Addition in notice list item for single-notice view.
|
||||||
_('permalink'));
|
_('permalink'));
|
||||||
|
} catch (InvalidUrlException $e) {
|
||||||
|
// no permalink available
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -991,6 +991,10 @@ content: ":";
|
|||||||
content: '[';
|
content: '[';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.notice .permalink.external {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
/* old school conversation style */
|
/* old school conversation style */
|
||||||
|
|
||||||
#conversation .notices .notices {
|
#conversation .notices .notices {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user