From 8c51ca391bf4e565cd8a311a2ec4cb80c4924683 Mon Sep 17 00:00:00 2001 From: Jason Zimdars Date: Wed, 23 Apr 2025 13:40:10 -0500 Subject: [PATCH] Move card delete button to a far less prominent position --- app/helpers/cards_helper.rb | 4 ++-- app/views/cards/_container.html.erb | 2 -- app/views/cards/_messages.html.erb | 5 +++++ 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/app/helpers/cards_helper.rb b/app/helpers/cards_helper.rb index 27bdd2595..79338d622 100644 --- a/app/helpers/cards_helper.rb +++ b/app/helpers/cards_helper.rb @@ -33,9 +33,9 @@ module CardsHelper def button_to_delete_card(card) button_to collection_card_path(card.collection, card), - method: :delete, class: "btn", data: { turbo_confirm: "Are you sure you want to delete this?" } do + method: :delete, class: "btn txt-negative borderless txt-small", data: { turbo_frame: "_top", turbo_confirm: "Are you sure you want to permanently delete this card?" } do concat(icon_tag("trash")) - concat(tag.span("Delete", class: "for-screen-reader")) + concat(tag.span("Delete this card")) end end end diff --git a/app/views/cards/_container.html.erb b/app/views/cards/_container.html.erb index aa5b186d5..ce7482d9c 100644 --- a/app/views/cards/_container.html.erb +++ b/app/views/cards/_container.html.erb @@ -5,8 +5,6 @@
diff --git a/app/views/cards/_messages.html.erb b/app/views/cards/_messages.html.erb index 4b4298759..35f0cd586 100644 --- a/app/views/cards/_messages.html.erb +++ b/app/views/cards/_messages.html.erb @@ -14,5 +14,10 @@ <%= avatar_tag watcher %> <% end %>
+ +
+
+ <%= button_to_delete_card(@card) %> +
<% end %>