diff --git a/app/helpers/collections_helper.rb b/app/helpers/collections_helper.rb index 56894e51e..1cb9d8a17 100644 --- a/app/helpers/collections_helper.rb +++ b/app/helpers/collections_helper.rb @@ -7,6 +7,12 @@ module CollectionsHelper end end + def link_to_edit_collection(collection) + link_to edit_collection_path(collection), class: "btn", data: { controller: "tooltip" } do + icon_tag("settings") + tag.span("Settings for #{collection.name}", class: "for-screen-reader") + end + end + def referenced_collections_from(records) Current.user.collections.where id: records.pluck(:collection_id).uniq end diff --git a/app/views/cards/_collection_settings.html.erb b/app/views/cards/_collection_settings.html.erb deleted file mode 100644 index b677c3f96..000000000 --- a/app/views/cards/_collection_settings.html.erb +++ /dev/null @@ -1,4 +0,0 @@ -<%= link_to edit_collection_path(collection), class: "btn", data: { controller: "tooltip" } do %> - <%= icon_tag "settings" %> - Settings for <%= collection.name %> -<% end %> diff --git a/app/views/cards/index.html.erb b/app/views/cards/index.html.erb index d700b363a..bc28fc82d 100644 --- a/app/views/cards/index.html.erb +++ b/app/views/cards/index.html.erb @@ -18,7 +18,7 @@