From 3ea5d4d632b06f7b60a30af268651efd72f09591 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Fri, 31 Oct 2025 16:00:03 -0500 Subject: [PATCH] Add hotkey to create a new card --- app/views/columns/show/_add_card_button.html.erb | 4 ++-- app/views/events/index/_add_card_button.html.erb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/views/columns/show/_add_card_button.html.erb b/app/views/columns/show/_add_card_button.html.erb index 16144ca0d..4cca718d1 100644 --- a/app/views/columns/show/_add_card_button.html.erb +++ b/app/views/columns/show/_add_card_button.html.erb @@ -1,7 +1,7 @@
- <%= button_to collection_cards_path(collection), method: :post, class: "btn btn--link", form: { data: { turbo_frame: "_top" } } do %> - <%= icon_tag "add" %> + <%= button_to collection_cards_path(collection), method: :post, class: "btn btn--link", form: { data: { turbo_frame: "_top" } }, data: { controller: "hotkey", action: "keydown.a@document->hotkey#click" } do %> Add a card + A <% end %> diff --git a/app/views/events/index/_add_card_button.html.erb b/app/views/events/index/_add_card_button.html.erb index 55e8ec023..7581538bc 100644 --- a/app/views/events/index/_add_card_button.html.erb +++ b/app/views/events/index/_add_card_button.html.erb @@ -1,8 +1,8 @@
<% if collection = user_filtering.single_collection_or_first %> - <%= button_to collection_cards_path(collection), method: :post, class: "btn btn--link btn--circle-mobile" do %> - <%= icon_tag "add" %> + <%= button_to collection_cards_path(collection), method: :post, class: "btn btn--link btn--circle-mobile", data: { controller: "hotkey", action: "keydown.a@document->hotkey#click" } do %> Add a card + A <% end %> <% end %>