post versions: add back support for changed_tags param.
Fix broken links on various pages: * The 'History' link in the sidebar on the post index page. * The 'History' links on the tags index page. * The 'Tag History' link in the sidebar on the wiki show page.
This commit is contained in:
@@ -47,6 +47,10 @@ class PostVersion < ApplicationRecord
|
||||
q = super
|
||||
q = q.search_attributes(params, :updater_id, :post_id, :tags, :added_tags, :removed_tags, :rating, :rating_changed, :parent_id, :parent_changed, :source, :source_changed, :version)
|
||||
|
||||
if params[:changed_tags]
|
||||
q = q.changed_tags_include_all(params[:changed_tags].scan(/[^[:space:]]+/))
|
||||
end
|
||||
|
||||
if params[:all_changed_tags]
|
||||
q = q.changed_tags_include_all(params[:all_changed_tags].scan(/[^[:space:]]+/))
|
||||
end
|
||||
|
||||
@@ -7,8 +7,7 @@
|
||||
<%= f.input :updater_name, label: "Updater", input_html: { value: params.dig(:search, :updater_name), "data-autocomplete": "user" } %>
|
||||
<%= f.input :added_tags_include_all, label: "Added tags", input_html: { value: params.dig(:search, :added_tags_include_all), "data-autocomplete": "tag-query" } %>
|
||||
<%= f.input :removed_tags_include_all, label: "Removed tags", input_html: { value: params.dig(:search, :removed_tags_include_all), "data-autocomplete": "tag-query" } %>
|
||||
<%= f.input :all_changed_tags, label: "All Changed Tags", input_html: { "data-autocomplete": "tag-query", value: params.dig(:search, :all_changed_tags) }, hint: "All tags must appear in either tag adds or removes" %>
|
||||
<%= f.input :any_changed_tags, label: "Any Changed Tags", input_html: { "data-autocomplete": "tag-query", value: params.dig(:search, :any_changed_tags) }, hint: "Any tag must appear in either tag adds or removes" %>
|
||||
<%= f.input :changed_tags, label: "Changed Tags", input_html: { "data-autocomplete": "tag-query", value: params.dig(:search, :changed_tags) }, hint: "Added or removed tags" %>
|
||||
<%= f.input :post_id, input_html: { value: params.dig(:search, :post_id) } %>
|
||||
<%= f.input :parent_id, input_html: { value: params.dig(:search, :parent_id) } %>
|
||||
<%= f.input :rating, input_html: { value: params.dig(:search, :rating) } %>
|
||||
|
||||
Reference in New Issue
Block a user