]> git.openstreetmap.org Git - rails.git/blobdiff - app/views/diary_entry/_diary_entry.rhtml
Show comment counts in diary entry lists.
[rails.git] / app / views / diary_entry / _diary_entry.rhtml
index a4897366d22407b07dc97094e9e322e0a67c5966..8ff7afd34aa32249fd5926d757b5e687f28d4cf0 100644 (file)
@@ -8,6 +8,8 @@ Posted by <b><%= link_to diary_entry.user.display_name, :controller => 'user', :
 <%= link_to 'Comment on this entry', :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'newcomment' %>
 |
 <%= link_to 'Reply to this entry', :controller => 'message', :action => 'new', :user_id => diary_entry.user.id, :title => "Re: #{diary_entry.title}" %>
 <%= link_to 'Comment on this entry', :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'newcomment' %>
 |
 <%= link_to 'Reply to this entry', :controller => 'message', :action => 'new', :user_id => diary_entry.user.id, :title => "Re: #{diary_entry.title}" %>
+|
+<%= link_to pluralize(diary_entry.diary_comments.count, "comment"), :action => 'view', :display_name => diary_entry.user.display_name, :id => diary_entry.id, :anchor => 'comments' %>
 <% end %>
 <br />
 <hr />
 <% end %>
 <br />
 <hr />