Skip to content
Permalink
Browse files

fix(comments): show read more in activity for long comments

fixes #12271
  • Loading branch information...
jeabakker committed Jan 9, 2019
1 parent 88158fe commit 5cca32bfa0fd2e80291ce9e3d4613f73f441b96d
Showing with 12 additions and 1 deletion.
  1. +1 −0 languages/en.php
  2. +11 −1 views/default/river/object/comment/create.php
@@ -962,6 +962,7 @@
'remove' => 'Remove',
'revert' => 'Revert',
'validate' => 'Validate',
'read_more' => 'Read more',
'site' => 'Site',
'activity' => 'Activity',
@@ -70,6 +70,16 @@
$vars['summary'] = elgg_echo($key, [$subject_link, $target_link]);
}
$vars['message'] = elgg_get_excerpt($comment->description);
$message = elgg_get_excerpt($comment->description);
if (substr($message, -3) === '...') {
$message .= elgg_view('output/url', [
'text' => elgg_echo('read_more'),
'href' => $comment->getURL(),
'is_trusted' => true,
'class' => 'mls',
]);
}
$vars['message'] = $message;
echo elgg_view('river/elements/layout', $vars);

0 comments on commit 5cca32b

Please sign in to comment.
You can’t perform that action at this time.