/comments/search: add more search params; style as inline form.
This commit is contained in:
@@ -43,3 +43,20 @@ form.simple_form {
|
||||
}
|
||||
}
|
||||
|
||||
form.inline-form {
|
||||
display: table;
|
||||
|
||||
> div.input {
|
||||
display: table-row;
|
||||
line-height: 2em;
|
||||
|
||||
label {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
label, input {
|
||||
display: table-cell;
|
||||
padding-right: 1em;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,13 +2,16 @@
|
||||
<div id="a-search">
|
||||
<h1>Search Comments</h1>
|
||||
|
||||
<%= form_tag(comments_path, :method => :get, :class => "simple_form") do %>
|
||||
<%= simple_form_for(:search, :method => :get, url: comments_path, defaults: { required: false }, html: { class: "inline-form" }) do |f| %>
|
||||
<%= hidden_field_tag "group_by", "comment", :id => "group_by_full" %>
|
||||
|
||||
<%= search_field "body_matches", :label => "Body" %>
|
||||
<%= search_field "creator_name", :label => "User" %>
|
||||
<%= search_field "post_tags_match", :label => "Tags" %>
|
||||
<%= submit_tag "Search" %>
|
||||
<%= f.input :creator_name, label: "Commenter" %>
|
||||
<%= f.input :body_matches, label: "Body" %>
|
||||
<%= f.input :post_tags_match, label: "Tags" %>
|
||||
<%= f.input :is_deleted, label: "Deleted?", collection: [["Yes", true], ["No", false]] %>
|
||||
<%= f.input :is_sticky, label: "Sticky?", collection: [["Yes", true], ["No", false]] %>
|
||||
<%= f.input :do_not_bump_post, label: "Bumping?", collection: [["Yes", false], ["No", true]] %>
|
||||
<%= f.input :order, include_blank: false, collection: [%w(Created id_desc), %w(Updated updated_at_desc), %w(Score score_desc), %w(Post post_id_desc)] %>
|
||||
<%= f.submit "Search" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user