Refactor search forms to use `search_form_for` so that we can set common options on all search forms, such as autocomplete="off" (#4162).
39 lines
1.3 KiB
Plaintext
39 lines
1.3 KiB
Plaintext
<div id="c-post-approvals">
|
|
<div id="a-index">
|
|
<h1>Approvals</h1>
|
|
<%= render "posts/partials/common/inline_blacklist" %>
|
|
|
|
<%= search_form_for(post_approvals_path) do |f| %>
|
|
<%= f.input :user_name, label: "Approver", input_html: { value: params[:search][:user_name], data: { autocomplete: "user" } } %>
|
|
<%= f.input :post_tags_match, label: "Tags", input_html: { value: params[:search][:post_tags_match], data: { autocomplete: "tag-query" } } %>
|
|
<%= f.submit "Search" %>
|
|
<% end %>
|
|
|
|
<table width="100%" class="striped">
|
|
<thead>
|
|
<tr>
|
|
<th width="1%">Post</th>
|
|
<th width="15%">Approver</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
<% @post_approvals.each do |post_approval| %>
|
|
<tr>
|
|
<td>
|
|
<%= PostPresenter.preview(post_approval.post, :tags => "status:any") %>
|
|
</td>
|
|
|
|
<td>
|
|
<%= link_to_user post_approval.user %>
|
|
<%= link_to "»", post_approvals_path(search: params[:search].merge(user_name: post_approval.user.name)) %>
|
|
<br><%= time_ago_in_words_tagged post_approval.created_at %>
|
|
</td>
|
|
</tr>
|
|
<% end %>
|
|
</tbody>
|
|
</table>
|
|
|
|
<%= numbered_paginator(@post_approvals) %>
|
|
</div>
|
|
</div>
|