From 62ec679bfb980c804a3276238e7392de7c31aa00 Mon Sep 17 00:00:00 2001 From: evazion Date: Sat, 28 Sep 2019 12:14:09 -0500 Subject: [PATCH] /post_versions/search: add tag autocomplete + quicksearch. --- app/views/post_versions/_secondary_links.html.erb | 1 + app/views/post_versions/search.html.erb | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/views/post_versions/_secondary_links.html.erb b/app/views/post_versions/_secondary_links.html.erb index e3d45135c..8e5166e10 100644 --- a/app/views/post_versions/_secondary_links.html.erb +++ b/app/views/post_versions/_secondary_links.html.erb @@ -1,4 +1,5 @@ <% content_for(:secondary_links) do %> + <%= quick_search_form_for(:changed_tags, post_versions_path, "versions", autocomplete: "tag-query") %> <%= subnav_link_to "Listing", posts_path %> <%= subnav_link_to "Upload", new_upload_path %> <%= subnav_link_to "Search", search_post_versions_path %> diff --git a/app/views/post_versions/search.html.erb b/app/views/post_versions/search.html.erb index 2bb25e21f..3a9b76154 100644 --- a/app/views/post_versions/search.html.erb +++ b/app/views/post_versions/search.html.erb @@ -5,9 +5,9 @@ <%= search_form_for(post_versions_path) do |f| %> <%= f.input :updated_at, label: "Date" %> <%= f.input :updater_name, label: "Updater", input_html: { "data-autocomplete": "user" } %> - <%= f.input :changed_tags_include_all, label: "Changed tags" %> - <%= f.input :added_tags_include_all, label: "Added tags" %> - <%= f.input :removed_tags_include_all, label: "Removed tags" %> + <%= f.input :changed_tags_include_all, label: "Changed tags", input_html: { "data-autocomplete": "tag-query" } %> + <%= f.input :added_tags_include_all, label: "Added tags", input_html: { "data-autocomplete": "tag-query" } %> + <%= f.input :removed_tags_include_all, label: "Removed tags", input_html: { "data-autocomplete": "tag-query" } %> <%= f.input :post_id %> <%= f.input :parent_id %> <%= f.input :rating %>