]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/notes/index.html.erb
Merge remote-tracking branch 'upstream/pull/5717'
[rails.git] / app / views / notes / index.html.erb
index 0b39234a93e61f2eaf222b0e221906f48bf8c567..4bd7d499d3da7acec77a8996842a450e662c5e26 100644 (file)
@@ -48,7 +48,7 @@
       </td>
       <td><%= link_to note.id, note %></td>
       <td><%= note_author(note.author) %></td>
       </td>
       <td><%= link_to note.id, note %></td>
       <td><%= note_author(note.author) %></td>
-      <td><%= note_description(note.author, note.description).to_html %></td>
+      <td><%= note_description(note.author, note.description, current_user&.moderator? ? note.comments.unscope(:where => :visible).first : note.comments.first).to_html %></td>
       <td><%= friendly_date_ago(note.created_at) %></td>
       <td><%= friendly_date_ago(note.updated_at) %></td>
     </tr>
       <td><%= friendly_date_ago(note.created_at) %></td>
       <td><%= friendly_date_ago(note.updated_at) %></td>
     </tr>