Commit eda4ad16 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Highlight comment in the link from a make comment public request notification


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent 7fac83dd
...@@ -225,6 +225,7 @@ class ArtefactTypeComment extends ArtefactType { ...@@ -225,6 +225,7 @@ class ArtefactTypeComment extends ArtefactType {
if ($last == $showcomment) { if ($last == $showcomment) {
$rank = key($ids); $rank = key($ids);
$result->forceoffset = $offset = ((ceil($rank / $limit) - 1) * $limit); $result->forceoffset = $offset = ((ceil($rank / $limit) - 1) * $limit);
$result->showcomment = $showcomment;
} }
} }
...@@ -314,6 +315,10 @@ class ArtefactTypeComment extends ArtefactType { ...@@ -314,6 +315,10 @@ class ArtefactTypeComment extends ArtefactType {
$item->pubmessage = get_string('thisfeedbackisprivate', 'artefact.comment'); $item->pubmessage = get_string('thisfeedbackisprivate', 'artefact.comment');
} }
if (isset($data->showcomment) && $data->showcomment == $item->id) {
$item->highlight = 1;
}
if ($item->deletedby) { if ($item->deletedby) {
$item->deletedmessage = $deletedmessage[$item->deletedby]; $item->deletedmessage = $deletedmessage[$item->deletedby];
} }
...@@ -514,6 +519,7 @@ function make_public_submit(Pieform $form, $values) { ...@@ -514,6 +519,7 @@ function make_public_submit(Pieform $form, $values) {
else { else {
$url = get_config('wwwroot') . 'view/view.php?id=' . $viewid; $url = get_config('wwwroot') . 'view/view.php?id=' . $viewid;
} }
$url .= '&showcomment=' . $comment->get('id');
$author = $comment->get('author'); $author = $comment->get('author');
$owner = $comment->get('owner'); $owner = $comment->get('owner');
......
{foreach from=$data item=item} {foreach from=$data item=item}
<tr class="{cycle name=rows values='r0,r1'}"> <tr class="{cycle name=rows values='r0,r1'}{if $item->highlight} highlight{/if}">
<td> <td>
{if $item->deletedmessage} {if $item->deletedmessage}
<span class="details">{str tag=commentremoved section=artefact.comment}</span> <span class="details">{str tag=commentremoved section=artefact.comment}</span>
......
...@@ -208,6 +208,10 @@ td.narrow { ...@@ -208,6 +208,10 @@ td.narrow {
.r1 td { .r1 td {
background-color: #f3f3f3; background-color: #f3f3f3;
} }
tr.highlight td {
background-color: #fffcd8 !important;
border-bottom: 1px solid #FFF;
}
.listing { .listing {
margin-bottom: .5em; margin-bottom: .5em;
} }
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment