forked from GNUsocial/gnu-social
correctly show the blog content for blog entries
This commit is contained in:
parent
8e2a9bfa5b
commit
b5c5d8d393
@ -71,15 +71,31 @@ class BlogEntryListItem extends NoticeListItemAdapter
|
|||||||
$out->element('a', array('href' => $notice->bestUrl()), $entry->title);
|
$out->element('a', array('href' => $notice->bestUrl()), $entry->title);
|
||||||
$out->elementEnd('h4');
|
$out->elementEnd('h4');
|
||||||
|
|
||||||
if (!empty($entry->summary)) {
|
// XXX: kind of a hack
|
||||||
$out->elementStart('div', 'blog-entry-summary');
|
|
||||||
$out->raw($entry->summary);
|
$actionName = $out->trimmed('action');
|
||||||
$out->elementEnd('div');
|
|
||||||
} else {
|
if ($actionName == 'shownotice' ||
|
||||||
// XXX: hide content initially; click More... for full text.
|
$actionName == 'showblogentry' ||
|
||||||
|
$actionName == 'conversation') {
|
||||||
|
|
||||||
$out->elementStart('div', 'blog-entry-content');
|
$out->elementStart('div', 'blog-entry-content');
|
||||||
$out->raw($entry->content);
|
$out->raw($entry->content);
|
||||||
$out->elementEnd('div');
|
$out->elementEnd('div');
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
if (!empty($entry->summary)) {
|
||||||
|
$out->elementStart('div', 'blog-entry-summary');
|
||||||
|
$out->raw($entry->summary);
|
||||||
|
$out->elementEnd('div');
|
||||||
|
}
|
||||||
|
|
||||||
|
$url = ($entry->url) ? $entry->url : $notice->bestUrl();
|
||||||
|
$out->element('a',
|
||||||
|
array('href' => $url,
|
||||||
|
'class' => 'blog-entry-link'),
|
||||||
|
_('More...'));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user