Add search page
- Fix issue with updater_name erroring out - Add search options is_new and name_changed
This commit is contained in:
5
app/views/pool_versions/_secondary_links.html.erb
Normal file
5
app/views/pool_versions/_secondary_links.html.erb
Normal file
@@ -0,0 +1,5 @@
|
||||
<% content_for(:secondary_links) do %>
|
||||
<%= quick_search_form_for(:name_matches, pool_versions_path, "pools", autocomplete: "pool") %>
|
||||
<%= subnav_link_to "Listing", pool_versions_path %>
|
||||
<%= subnav_link_to "Search", search_pool_versions_path %>
|
||||
<% end %>
|
||||
@@ -32,7 +32,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "pools/secondary_links" %>
|
||||
<%= render "secondary_links" %>
|
||||
|
||||
<% content_for(:page_title) do %>
|
||||
Pool Version Comparison - <%= @pool_version.name %> - <%= Danbooru.config.app_name %>
|
||||
|
||||
@@ -8,4 +8,4 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "pools/secondary_links" %>
|
||||
<%= render "secondary_links" %>
|
||||
|
||||
19
app/views/pool_versions/search.html.erb
Normal file
19
app/views/pool_versions/search.html.erb
Normal file
@@ -0,0 +1,19 @@
|
||||
<div id="c-pool-versions">
|
||||
<div id="a-search">
|
||||
<h1>Search Changes</h1>
|
||||
|
||||
<%= search_form_for(pool_versions_path) do |f| %>
|
||||
<%= f.input :updater_name, label: "Updater", input_html: { value: params.dig(:search, :updater_name), "data-autocomplete": "user" } %>
|
||||
<%= f.input :name_matches, label: "Pool", input_html: { value: params.dig(:search, :name_matches), "data-autocomplete": "pool" } %>
|
||||
<%= f.input :category, label: "Category", collection: [["Series", "series"], ["Collection", "collection"]], include_blank: true %>
|
||||
<%= f.input :is_new, label: "New?", collection: [["Yes", true], ["No", false]], include_blank: true %>
|
||||
<%= f.input :name_changed, label: "Name changed?", collection: [["Yes", true], ["No", false]], include_blank: true %>
|
||||
<%= f.input :description_changed, label: "Description changed?", collection: [["Yes", true], ["No", false]], include_blank: true %>
|
||||
<%= f.input :is_active, label: "Active?", collection: [["Yes", true], ["No", false]], include_blank: true %>
|
||||
<%= f.input :is_banned, label: "Deleted?", collection: [["Yes", true], ["No", false]], include_blank: true %>
|
||||
<%= f.submit "Search" %>
|
||||
<% end %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%= render "secondary_links" %>
|
||||
Reference in New Issue
Block a user