* On /pools, hide deleted pools by default in HTML responses. Don't filter out deleted pools in API responses. * API change: on /forum_topics, only hide deleted forum topics by default for HTML responses, not for API responses. Explicitly do https://danbooru.donmai.us/forum_topics.json?search[is_deleted]=false to filter out deleted topics. * API change: on /tags, only hide empty tags by default for HTML responses, not for API responses. Explicitly do https://danbooru.donmai.us/tags.json?search[is_empty]=false to filter out empty tags. * API change: on /pools, default to 20 posts per page for API responses, not 40. * API change: add `search[is_empty]` param to /tags.json endpoint. `search[hide_empty]=true` is deprecated in favor of `search[is_empty]=false`. * On /pools, add option to show/hide deleted pools in search form. * Fix the /forum_topics page putting `search[order]=sticky&limit=40` in the URL when browsing past page 1.
10 lines
931 B
Plaintext
10 lines
931 B
Plaintext
<%= search_form_for(path) do |f| %>
|
|
<%= f.input :name_matches, label: "Name", input_html: { value: params.dig(:search, :name_matches), "data-autocomplete": "pool" } %>
|
|
<%= f.input :description_matches, label: "Description", input_html: { value: params.dig(:search, :description_matches) } %>
|
|
<%= f.input :post_tags_match, label: "Post tags", input_html: { value: params.dig(:search, :post_tags_match), "data-autocomplete": "tag-query" } %>
|
|
<%= f.input :is_deleted, label: "Deleted?", as: :select, include_blank: true, selected: params[:search][:is_deleted] %>
|
|
<%= f.input :category, collection: %w[series collection], include_blank: true, selected: params[:search][:category] %>
|
|
<%= f.input :order, collection: [%w[Last\ updated updated_at], %w[Name name], %w[Recently\ created created_at], %w[Post\ count post_count]], include_blank: true, selected: params.dig(:search, :order) %>
|
|
<%= f.submit "Search" %>
|
|
<% end %>
|