blob: eb209b0aeefea080d03bb7f05ad06c4e0fbd9631 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
<% if not notice.nil? %><p style="color: green"><%= notice %></p><% end %>
<h1>Players</h1>
<div id="players">
<table>
<thead>
<th>Name</th>
<th>Paid</th>
<th>Strikes</th>
<th>Delete</th>
</thead>
<tbody>
<% @players.each do |player| %>
<tr>
<td><%= link_to player.name, player %></td>
<td>
<% if player.paid %>✓
<% end %></td>
<td><%= player.strikes %></td>
<td><%= link_to "X", player, data: {
turbo_method: :delete,
turbo_confirm: "Are you sure you want to remove #{player.name}?"
} %></td>
</tr>
<% end %>
</tbody>
</table>
</div>
<p><%= pluralize(@players.count, 'total player') %></p>
<hr>
<%= link_to "Add a player", new_player_path %>
|