diff --git a/app/helpers/filters_helper.rb b/app/helpers/filters_helper.rb index 3eab22703..db1b5d8b7 100644 --- a/app/helpers/filters_helper.rb +++ b/app/helpers/filters_helper.rb @@ -36,7 +36,7 @@ module FiltersHelper }, &block end - def hotkey_link(title, path, key, icon) + def filter_hotkey_link(title, path, key, icon) link_to path, class: "popup__group btn borderless", id: "filter-hotkey-#{key}", role: "listitem", data: { filter_target: "item", navigable_list_target: "item", controller: "hotkey", action: "keydown.#{key}@document->hotkey#click keydown.shift+#{key}@document->hotkey#click"} do concat icon_tag(icon) concat tag.span(title.html_safe) diff --git a/app/views/filters/menu/_hotkeys.html.erb b/app/views/filters/menu/_hotkeys.html.erb index 3c85aaa72..5a1703a23 100644 --- a/app/views/filters/menu/_hotkeys.html.erb +++ b/app/views/filters/menu/_hotkeys.html.erb @@ -1,8 +1,8 @@
- <%= hotkey_link "Home", root_path, 1, "home" %> - <%= hotkey_link "Assigned to me", cards_path(assignee_ids: [Current.user.id]), 2, "clipboard" %> - <%= hotkey_link "Added by me", cards_path(creator_ids: [Current.user.id]), 3, "person-add" %> - <%= hotkey_link "New Collection", new_collection_path, 4, "collection-add" %> - <%= hotkey_link "Notifications", notifications_path, 5, "bell" %> - <%= hotkey_link "Account #{tag.span("Settings", class: "visually-hidden")}", account_settings_path, 6, "settings" %> + <%= filter_hotkey_link "Home", root_path, 1, "home" %> + <%= filter_hotkey_link "Assigned to me", cards_path(assignee_ids: [Current.user.id]), 2, "clipboard" %> + <%= filter_hotkey_link "Added by me", cards_path(creator_ids: [Current.user.id]), 3, "person-add" %> + <%= filter_hotkey_link "New Collection", new_collection_path, 4, "collection-add" %> + <%= filter_hotkey_link "Notifications", notifications_path, 5, "bell" %> + <%= filter_hotkey_link "Account #{tag.span("Settings", class: "visually-hidden")}", account_settings_path, 6, "settings" %>