post votes: let gold users use upvote:self, downvote:self metatags.

* Let gold users use upvote:self, downvote:self metatags to search for
  their own votes.
* Don't let mods use upvote:<user>, downvote:<user> metatags to see
  votes by other users. Only let admins see other users' votes.
* Add vote count to profile page.
This commit is contained in:
evazion
2019-10-28 03:28:47 -05:00
parent f4376fc7a3
commit 93b03c04ad
3 changed files with 19 additions and 8 deletions

View File

@@ -85,6 +85,15 @@
</td>
</tr>
<% if CurrentUser.user == user || CurrentUser.user.is_admin? %>
<tr>
<th>Post Votes</th>
<td>
<%= link_to user.post_votes.count, post_votes_path(search: { user_name: user.name }) %>
</td>
</tr>
<% end %>
<tr>
<th>Favorite Groups</th>
<td><%= presenter.favorite_group_count(self) %></td>