<%= render "search" %> <%= table_for @post_votes, class: "striped autofit" do |t| %> <% t.column "Post" do |vote| %> <%= post_preview(vote.post, show_deleted: true) %> <% end %> <% t.column "Tags", td: {class: "col-expand"} do |vote| %> <%= render_inline_tag_list(vote.post) %> <% end %> <% t.column "Score" do |vote| %> <%= link_to sprintf("%+d", vote.score), post_votes_path(search: { score: vote.score }) %> <% end %> <% t.column "Uploader" do |vote| %> <%= link_to_user vote.post.uploader %> <%= link_to "»", post_votes_path(search: { post_tags_match: "user:#{vote.post.uploader.name}" }) %>
<%= time_ago_in_words_tagged(vote.post.created_at) %>
<% end %> <% t.column "Voter" do |vote| %> <% if policy(vote).can_see_voter? %> <%= link_to_user vote.user %> <%= link_to "»", post_votes_path(search: { user_name: vote.user.name }) %> <% else %> hidden <% end %>
<%= time_ago_in_words_tagged(vote.created_at) %>
<% end %> <% t.column column: "control" do |vote| %> <% if vote.user == CurrentUser.user %> <%= link_to "unvote", post_post_votes_path(vote.post), remote: true, method: :delete %> <% end %> <% end %> <% end %> <%= numbered_paginator(@post_votes) %>