From b483ff56c663e2d346df8f1f243100007c2c93c9 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 31 Jan 2022 14:28:00 -0500 Subject: tidy up, add git hash to src link --- app/views/players/index.html.erb | 2 +- app/views/players/show.html.erb | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) (limited to 'app/views/players') diff --git a/app/views/players/index.html.erb b/app/views/players/index.html.erb index eb209b0..a635ded 100644 --- a/app/views/players/index.html.erb +++ b/app/views/players/index.html.erb @@ -18,7 +18,7 @@ <% if player.paid %>✓ <% end %> <%= player.strikes %> - <%= link_to "X", player, data: { + <%= link_to "❌", player, data: { turbo_method: :delete, turbo_confirm: "Are you sure you want to remove #{player.name}?" } %> diff --git a/app/views/players/show.html.erb b/app/views/players/show.html.erb index e031050..3d0bb78 100644 --- a/app/views/players/show.html.erb +++ b/app/views/players/show.html.erb @@ -1,7 +1,9 @@ -

<%= notice %>

+<% if not notice.nil? %>

<%= notice %>

<% end %> <%= render "form", player: @player %>
- <%= button_to "Delete #{@player.name}", @player, method: :delete %> + <%= link_to "Delete #{@player.name} ❌", @player, data: { + turbo_method: :delete, + turbo_confirm: "Are you sure you want to remove #{@player.name}?"} %>
-- cgit 1.4.1