Namespace the hotkey link helper

This commit is contained in:
Andy Smith
2025-08-25 12:20:02 -05:00
parent a62cf7a61b
commit 25af985f5c
2 changed files with 7 additions and 7 deletions
+1 -1
View File
@@ -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)
+6 -6
View File
@@ -1,8 +1,8 @@
<div class="fizzy-menu__hotkeys" role="list">
<%= 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" %>
</div>