From 2528d8af8a65d687925ea575dc20fb9bb342ec31 Mon Sep 17 00:00:00 2001 From: Cjay Date: Thu, 2 Jul 2015 18:53:18 +0800 Subject: [PATCH] Show edited date/time on posts/comments --- app/views/comments/_single.html.haml | 6 +++--- app/views/posts/_single.html.haml | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/views/comments/_single.html.haml b/app/views/comments/_single.html.haml index ae9c503af..af6c328e5 100644 --- a/app/views/comments/_single.html.haml +++ b/app/views/comments/_single.html.haml @@ -5,10 +5,10 @@ = render :partial => "members/avatar", :locals => { :member => comment.author } .col-md-11 .comment-meta - Posted by + = (comment.created_at == comment.updated_at) ? 'Posted by' : 'Edited by' = link_to comment.author.login_name, member_path(comment.author) - at - = comment.created_at + on + = (comment.created_at == comment.updated_at) ? comment.created_at : comment.updated_at .comment-body :growstuff_markdown diff --git a/app/views/posts/_single.html.haml b/app/views/posts/_single.html.haml index e6f7ae0f3..44750ceac 100644 --- a/app/views/posts/_single.html.haml +++ b/app/views/posts/_single.html.haml @@ -9,13 +9,13 @@ .post-meta %p - Posted by + = (post.created_at == post.updated_at) ? 'Posted by' : 'Edited by' = link_to post.author.login_name, member_path(post.author) - if post.forum in = link_to post.forum, post.forum - at - = post.created_at + on + = (post.created_at == post.updated_at) ? post.created_at : post.updated_at .post-body :growstuff_markdown