]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/notes/_description.html.erb
Make notes RSS feeds work
[rails.git] / app / views / notes / _description.html.erb
index 596d63269fea0799a98fc0944694e5cfe4ee5a4c..761b69ea2db87fc7dd0528a1188a0705243328f0 100644 (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 -%>