45 lines
1.7 KiB
Plaintext
45 lines
1.7 KiB
Plaintext
<div id="c-forum-post-votes">
|
|
<div id="a-index">
|
|
<%= search_form_for(forum_post_votes_path) do |f| %>
|
|
<%= f.input :creator_name, label: "User", input_html: { value: params[:search][:creator_name], data: { autocomplete: "user" } } %>
|
|
<%= f.input :forum_post_id, label: "Forum Post", input_html: { value: params[:search][:forum_post_id] } %>
|
|
<%= f.input :score, label: "Type", collection: [["Up", "1"], ["Meh", "0"], ["Down", "-1"]], include_blank: true, selected: params[:search][:score] %>
|
|
<%= f.submit "Search" %>
|
|
<% end %>
|
|
|
|
<table class="striped autofit">
|
|
<thead>
|
|
<tr>
|
|
<th>Forum Post</th>
|
|
<th>Forum Topic</th>
|
|
<th>Type</th>
|
|
<th>Created</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @forum_post_votes.each do |forum_post_vote| %>
|
|
<tr>
|
|
<td>
|
|
<%= link_to "Forum ##{forum_post_vote.forum_post_id}", forum_post_vote.forum_post %>
|
|
<%= link_to "»", forum_post_votes_path(search: { forum_post_id: forum_post_vote.forum_post_id }) %>
|
|
</td>
|
|
<td class="col-expand">
|
|
<%= link_to forum_post_vote.forum_post.topic.title, forum_post_vote.forum_post.topic %>
|
|
</td>
|
|
<td>
|
|
<%= forum_post_vote.vote_type %>
|
|
</td>
|
|
<td>
|
|
<%= link_to_user forum_post_vote.creator %>
|
|
<%= link_to "»", forum_post_votes_path(search: { creator_name: forum_post_vote.creator.name }) %>
|
|
<p><%= time_ago_in_words_tagged(forum_post_vote.updated_at) %></p>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= numbered_paginator(@forum_post_votes) %>
|
|
</div>
|
|
</div>
|