Add hotkey to create a new card
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<div class="collection-tools card">
|
||||
<%= 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 %>
|
||||
<span>Add a card</span>
|
||||
<kbd>A</kbd>
|
||||
<% end %>
|
||||
|
||||
<hr class="separator--horizontal full-width" aria-hidden="true">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
<div class="header__actions header__actions--start">
|
||||
<% 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 %>
|
||||
<span>Add a card</span>
|
||||
<kbd>A</kbd>
|
||||
<% end %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user