Improve display of anonymous note comments

This commit is contained in:
Tom Hughes 2013-02-02 13:04:27 +00:00
parent 0b993e5ce0
commit 2ef58f47a2
5 changed files with 27 additions and 13 deletions

View file

@ -1,7 +1,11 @@
<div>
<% description.comments.each do |comment| -%>
<div class="note-comment" style="margin-top: 5px">
<div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at_by", :when => friendly_date(comment.created_at), :user => note_author(comment, :only_path => false) %></div>
<% if comment.author.nil> -%>
<div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at", :when => friendly_date(comment.created_at) %></div>
<% else -%>
<div class="note-comment-description" style="font-size: smaller; color: #999999"><%= t "note.description.#{comment.event}_at_by", :when => friendly_date(comment.created_at), :user => note_author(comment.author, :only_path => false) %></div>
<% end -%>
<div class="note-comment-text"><%= comment.body %></div>
</div>
<% end -%>