diff --git a/app/helpers/alchemy/admin/base_helper.rb b/app/helpers/alchemy/admin/base_helper.rb index 46706c16d4..1175a12b09 100644 --- a/app/helpers/alchemy/admin/base_helper.rb +++ b/app/helpers/alchemy/admin/base_helper.rb @@ -104,10 +104,11 @@ def sites_for_select # The css class of the tag # @option options [String or Hash] :data ({'alchemy-list-filter' => items}) # A HTML data attribute that holds the jQuery selector that represents the list to be filtered - # + # @deprecated render Alchemy::Admin::ListFilter.new(items) instead def js_filter_field(items, _options = {}) render Alchemy::Admin::ListFilter.new(items) end + deprecate js_filter_field: "render Alchemy::Admin::ListFilter.new(items) instead", deprecator: Alchemy::Deprecation # Returns a link that opens a modal confirmation to delete window. # diff --git a/app/views/alchemy/admin/attachments/_tag_list.html.erb b/app/views/alchemy/admin/attachments/_tag_list.html.erb index d0e0086277..502bfdb5f0 100644 --- a/app/views/alchemy/admin/attachments/_tag_list.html.erb +++ b/app/views/alchemy/admin/attachments/_tag_list.html.erb @@ -1,6 +1,6 @@ <% if Alchemy::Attachment.tag_counts.any? %>

<%= Alchemy.t("Filter by tag") %>

- <%= js_filter_field '.tag-list li' %> + <%= render Alchemy::Admin::ListFilter.new(".tag-list li") %> diff --git a/app/views/alchemy/admin/pictures/_tag_list.html.erb b/app/views/alchemy/admin/pictures/_tag_list.html.erb index 35a3da7655..73f7cce212 100644 --- a/app/views/alchemy/admin/pictures/_tag_list.html.erb +++ b/app/views/alchemy/admin/pictures/_tag_list.html.erb @@ -1,6 +1,6 @@ <% if Alchemy::Picture.tag_counts.any? %>

<%= Alchemy.t("Filter by tag") %>

- <%= js_filter_field '.tag-list li' %> + <%= render Alchemy::Admin::ListFilter.new(".tag-list li") %> diff --git a/app/views/alchemy/admin/resources/_tag_list.html.erb b/app/views/alchemy/admin/resources/_tag_list.html.erb index 047377cbe4..9a3c45fbe4 100644 --- a/app/views/alchemy/admin/resources/_tag_list.html.erb +++ b/app/views/alchemy/admin/resources/_tag_list.html.erb @@ -1,6 +1,6 @@

<%= Alchemy.t("Filter by tag") %>

- <%= js_filter_field '.tag-list li' %> + <%= render Alchemy::Admin::ListFilter.new(".tag-list li") %> diff --git a/app/views/alchemy/admin/tags/edit.html.erb b/app/views/alchemy/admin/tags/edit.html.erb index fdbb921c6d..6cd35aa2dc 100644 --- a/app/views/alchemy/admin/tags/edit.html.erb +++ b/app/views/alchemy/admin/tags/edit.html.erb @@ -13,7 +13,7 @@
- <%= js_filter_field '.tag-list li' %> + <%= render Alchemy::Admin::ListFilter.new(".tag-list li") %>
    <%= render partial: "radio_tag", collection: @tags, locals: {name: "tag"} %>