From ce8b283255e2be4c0f42b3223c3cf4ad33364933 Mon Sep 17 00:00:00 2001 From: jessib Date: Mon, 7 Jan 2013 12:25:12 -0800 Subject: Ticket comments can be private --- help/app/views/tickets/_comment.html.haml | 31 +++++++++++++++++-------------- 1 file changed, 17 insertions(+), 14 deletions(-) (limited to 'help/app/views/tickets/_comment.html.haml') diff --git a/help/app/views/tickets/_comment.html.haml b/help/app/views/tickets/_comment.html.haml index 26794dc..ae7f1d4 100644 --- a/help/app/views/tickets/_comment.html.haml +++ b/help/app/views/tickets/_comment.html.haml @@ -1,15 +1,18 @@ - # style is super ugly but just for now -%tr - %td - - if commenter = User.find(comment.posted_by) - %b - = 'Posted by' + (commenter.is_admin? ? ' admin' : '') + ':' - = commenter.login - - else - Unauthenticated post - .pull-right - %b - Posted at: - = comment.posted_at.to_s(:short) - %br - = comment.body +- if admin? or !comment.private # only show comment if user is admin or comment is not private + %tr + %td + - if commenter = User.find(comment.posted_by) + %b + = 'Posted by' + (commenter.is_admin? ? ' admin' : '') + ':' + = commenter.login + - else + Unauthenticated post + - if comment.private + (Private comment) + .pull-right + %b + Posted at: + = comment.posted_at.to_s(:short) + %br + = comment.body \ No newline at end of file -- cgit v1.2.3