Skip to content

Commit

Permalink
feature(discussions): makes "last reply" text into a link
Browse files Browse the repository at this point in the history
  • Loading branch information
mrclay committed Oct 18, 2015
1 parent ed21578 commit 9c1d543
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion mod/discussions/views/default/object/discussion.php
Expand Up @@ -49,10 +49,16 @@
if (isset($last_reply[0])) {
$last_reply = $last_reply[0];
}
/* @var ElggDiscussionReply $last_reply */

$poster = $last_reply->getOwnerEntity();
$reply_time = elgg_view_friendly_time($last_reply->time_created);
$reply_text = elgg_echo('discussion:updated', array($poster->name, $reply_time));

$reply_text = elgg_view('output/url', [
'text' => elgg_echo('discussion:updated', [$poster->name, $reply_time]),
'href' => $last_reply->getURL(),
'is_trusted' => true,
]);

$replies_link = elgg_view('output/url', array(
'href' => $topic->getURL() . '#group-replies',
Expand Down

0 comments on commit 9c1d543

Please sign in to comment.