Permalink
Browse files

feature(comments): Comment/reply timestamps are now permalinks

This also colors links gray inside of .elgg-subtext

Fixes #8407
  • Loading branch information...
mrclay committed Jun 2, 2015
1 parent 3c0f642 commit 4596e00b6b9dbc37b8bc14ab844de4a66f9a4fd4
@@ -115,6 +115,10 @@
font-style: italic;
}
.elgg-subtext a {
color: #666;
}
.elgg-text-help {
display: block;
font-size: 85%;
@@ -6,6 +6,7 @@
*/
$reply = elgg_extract('entity', $vars, FALSE);
/* @var ElggDiscussionReply $reply */
if (!$reply) {
return true;
@@ -35,22 +36,34 @@
));
}
$subtitle = "$poster_text $date";
if (elgg_in_context('activity')) {
$content = '<div class="elgg-output elgg-inner" data-role="comment-text">';
$content .= elgg_view('output/text', array(
'value' => elgg_get_excerpt($reply->description)
));
$content .= '</div>';
$date_link = elgg_view('output/url', [
'href' => $reply->getURL(),
'text' => $date,
'is_trusted' => true,
]);
} else {
$content = elgg_view('output/longtext', array(
'value' => $reply->description,
'class' => 'elgg-inner',
'data-role' => 'discussion-reply-text',
));
$date_link = elgg_view('output/url', [
'href' => $reply->getURL(),
'text' => $date,
'is_trusted' => true,
]);
}
$subtitle = "$poster_text $date_link";
$params = array(
'entity' => $reply,
'metadata' => $metadata,
@@ -1575,6 +1575,10 @@
margin-bottom: 5px;
}
.elgg-subtext a {
color: #666;
}
.elgg-text-help {
display: block;
font-size: 85%;
@@ -118,6 +118,10 @@
font-style: italic;
}
.elgg-subtext a {
color: #666;
}
.elgg-text-help {
display: block;
font-size: 85%;
@@ -9,6 +9,7 @@
$full_view = elgg_extract('full_view', $vars, true);
$comment = $vars['entity'];
/* @var ElggComment $comment */
$entity = get_entity($comment->container_guid);
$commenter = get_user($comment->owner_guid);
@@ -41,20 +42,33 @@
'value' => elgg_get_excerpt($comment->description),
));
$comment_text .= '</div>';
$time_link = elgg_view('output/url', [
'href' => $comment->getURL(),
'text' => $friendlytime,
'is_trusted' => true,
]);
} else {
$comment_text = elgg_view('output/longtext', array(
'value' => $comment->description,
'class' => 'elgg-inner',
'data-role' => 'comment-text',
));
$time_link = elgg_view('output/url', [
'href' => $comment->getURL(),
'text' => $friendlytime,
'is_trusted' => true,
]);
}
$body = <<<HTML
$anchor
<div class="mbn">
$menu
$commenter_link
<span class="elgg-subtext">
$friendlytime
$time_link
</span>
$comment_text
</div>

0 comments on commit 4596e00

Please sign in to comment.