post/comment/forum votes: add vote counts to profile pages.
* Add post/comment/forum vote counts to user profiles. * Show uploaders on post votes index and allow searching by uploader. * Show forum posters on forum votes index and allow searching by poster. * Add unvote link to forum votes index. * Only show unvote links to current user.
This commit is contained in:
@@ -87,9 +87,11 @@
|
||||
|
||||
<% if CurrentUser.user == user || CurrentUser.user.is_admin? %>
|
||||
<tr>
|
||||
<th>Post Votes</th>
|
||||
<th>Votes</th>
|
||||
<td>
|
||||
<%= link_to user.post_votes.count, post_votes_path(search: { user_name: user.name }) %>
|
||||
<%= link_to user.post_votes.count, post_votes_path(search: { user_name: user.name }) %> posts,
|
||||
<%= link_to user.comment_votes.count, comment_votes_path(search: { user_name: user.name }) %> comments,
|
||||
<%= link_to user.forum_post_votes.count, forum_post_votes_path(search: { creator_name: user.name }) %> forum posts
|
||||
</td>
|
||||
</tr>
|
||||
<% end %>
|
||||
|
||||
Reference in New Issue
Block a user