From 9cde6b0566390002d167703fa900129bb90e07d8 Mon Sep 17 00:00:00 2001 From: Marcel Korpel Date: Fri, 10 Jul 2015 18:47:33 +0200 Subject: Show dateline when a comment is edited or deleted Signed-off-by: Marcel Korpel Signed-off-by: Lukas Fleischer --- web/template/pkg_comments.php | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) (limited to 'web/template') diff --git a/web/template/pkg_comments.php b/web/template/pkg_comments.php index 6cc9555..8650db2 100644 --- a/web/template/pkg_comments.php +++ b/web/template/pkg_comments.php @@ -16,19 +16,33 @@ $count = pkgbase_comments_count($base_id, $include_deleted); - {$row['UserName']}"; - endif; ?> + ('; + if ($row['DelUsersID']) { + $user_fmtd = html_format_username($row['DelUserName']); + $heading .= __('deleted on %s by %s', $date_fmtd, $user_fmtd); + } else { + $user_fmtd = html_format_username($row['EditUserName']); + $heading .= __('last edited on %s by %s', $date_fmtd, $user_fmtd); + } + $heading .= ')'; + } + + $row['DelUserName'] = html_format_username($row['DelUserName']); + $row['EditUserName'] = html_format_username($row['EditUserName']); + ?> class="comment-deleted"> - - - - - - - - () - +
-- cgit v1.2.3-70-g09d2