From c95a61fc056f6a2d7fdb82f9288948a890a3bac5 Mon Sep 17 00:00:00 2001 From: Ben Harris Date: Mon, 31 Jan 2022 14:00:13 -0500 Subject: switch to table, add total counts --- app/views/players/index.html.erb | 30 ++++++++++++++++++++++++++---- 1 file changed, 26 insertions(+), 4 deletions(-) (limited to 'app/views/players') diff --git a/app/views/players/index.html.erb b/app/views/players/index.html.erb index c067483..eb209b0 100644 --- a/app/views/players/index.html.erb +++ b/app/views/players/index.html.erb @@ -1,12 +1,34 @@ -

<%= notice %>

+<% if not notice.nil? %>

<%= notice %>

<% end %>

Players

- <% @players.each do |player| %> - <%= render player %> - <% end %> + + + + + + + + + <% @players.each do |player| %> + + + + + + + <% end %> + +
NamePaidStrikesDelete
<%= link_to player.name, player %> + <% if player.paid %>✓ + <% end %><%= player.strikes %><%= link_to "X", player, data: { + turbo_method: :delete, + turbo_confirm: "Are you sure you want to remove #{player.name}?" + } %>
+

<%= pluralize(@players.count, 'total player') %>

+
<%= link_to "Add a player", new_player_path %> -- cgit 1.4.1