Commit cb21d3cc authored by Richard Mansfield's avatar Richard Mansfield Committed by Gerrit Code Review
Browse files

Merge "Add updated time information to feedback display (bug #906646)"

parents c155ad0f 4094f91b
......@@ -338,7 +338,7 @@ class ArtefactTypeComment extends ArtefactType {
$comments = get_records_sql_assoc('
SELECT
a.id, a.author, a.authorname, a.ctime, a.description,
a.id, a.author, a.authorname, a.ctime, a.mtime, a.description,
c.private, c.deletedby, c.requestpublic, c.rating,
u.username, u.firstname, u.lastname, u.preferredname, u.email, u.staff, u.admin,
u.deleted, u.profileicon
......@@ -424,6 +424,9 @@ class ArtefactTypeComment extends ArtefactType {
foreach ($data->data as &$item) {
$item->ts = strtotime($item->ctime);
$item->date = format_date($item->ts, 'strftimedatetime');
if ($item->ts < strtotime($item->mtime)) {
$item->updated = format_date(strtotime($item->mtime), 'strftimedatetime');
}
$item->isauthor = $item->author && $item->author == $USER->get('id');
if (!empty($item->attachments)) {
if ($data->isowner) {
......
......@@ -48,7 +48,7 @@
{if $item->deletedmessage}
<span>{$item->deletedmessage} | </span>
{else}
<span class="date">{$item->date} </span>
<span class="date">{$item->date} {if $item->updated}[{str tag=Updated}: {$item->updated}]{/if}</span>
{if $item->pubmessage} | <span>{$item->pubmessage}</span>{/if}
{if $item->makepublicrequested} | <span>{str tag=youhaverequestedpublic section=artefact.comment}</span>{/if}
{strip}
......
Markdown is supported
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