Files
danbooru/app/views/wiki_pages/search.html.erb
BrokenEagle 50740e302f Add option to search for wikis that don't link to a specific wiki
Also add inputs on the search page for both the linked_to and the
not_linked_to search parameters. Additionally, normalize the title
first since autocomplete adds trailing spaces. The search query was
also simplified a bit by taking advantage of Rails associations.
2020-06-23 05:31:43 +00:00

18 lines
996 B
Plaintext

<div id="c-wiki-pages">
<div id="a-search">
<%= search_form_for(wiki_pages_path) do |f| %>
<%= f.input :title_normalize, label: "Title", hint: "Use * for wildcard searches", input_html: { "data-autocomplete": "wiki-page" } %>
<%= f.input :other_names_match, label: "Other names", hint: "Use * for wildcard searches" %>
<%= f.input :body_matches, label: "Body" %>
<%= f.input :linked_to, hint: "Which wikis link to the specified wiki.", input_html: { "data-autocomplete": "wiki-page" } %>
<%= f.input :not_linked_to, hint: "Which wikis do not link to the specified wiki.", input_html: { "data-autocomplete": "wiki-page" } %>
<%= f.input :other_names_present, as: :select %>
<%= f.input :hide_deleted, as: :select, include_blank: false %>
<%= f.input :order, collection: [%w[Name title], %w[Date time], %w[Posts post_count]], include_blank: false %>
<%= f.submit "Search" %>
<% end %>
</div>
</div>
<%= render "secondary_links" %>