diff options
Diffstat (limited to 'app/views')
-rw-r--r-- | app/views/layouts/application.html.erb | 4 | ||||
-rw-r--r-- | app/views/machines/index.html.erb | 6 | ||||
-rw-r--r-- | app/views/pages/index.html.erb | 3 | ||||
-rw-r--r-- | app/views/pages/teampicker.html.erb | 4 | ||||
-rw-r--r-- | app/views/players/edit.html.erb | 5 | ||||
-rw-r--r-- | app/views/players/index.html.erb | 5 |
6 files changed, 15 insertions, 12 deletions
diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index efe387a..d0c5007 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -21,10 +21,6 @@ <hr> <%= yield %> - - <footer> - <center><a href="https://tildegit.org/ben/pinrails">source code here</a></center> - </footer> </main> </body> </html> diff --git a/app/views/machines/index.html.erb b/app/views/machines/index.html.erb index 5abd2c2..f099ea6 100644 --- a/app/views/machines/index.html.erb +++ b/app/views/machines/index.html.erb @@ -1,16 +1,19 @@ <h1>Pinball Machines</h1> - <table> <thead> <th>Name</th> <th>Edition</th> + <th>Delete</th> </thead> <tbody> <% @machines.each do |machine| %> <tr> <td><%= link_to machine.name, edit_machine_path(machine) %></td> <td><%= machine.edition %></td> + <td><%= link_to "X", machine_path(machine), + method: :delete, + data: { confirm: "Are you sure?" } %></td> </tr> <% end %> </tbody> @@ -19,4 +22,3 @@ <hr> <p><%= @machines.size %> available machines</p> <%= link_to "+ Add Machine", new_machine_path %> - diff --git a/app/views/pages/index.html.erb b/app/views/pages/index.html.erb index bccab8f..2611626 100644 --- a/app/views/pages/index.html.erb +++ b/app/views/pages/index.html.erb @@ -1,3 +1,6 @@ <h1>nomi pinball</h1> <%= image_tag "coinslotlogo.png" %> +<footer> + <center><a href="https://tildegit.org/ben/pinrails">source code here</a></center> +</footer> diff --git a/app/views/pages/teampicker.html.erb b/app/views/pages/teampicker.html.erb index ea0f883..8504ece 100644 --- a/app/views/pages/teampicker.html.erb +++ b/app/views/pages/teampicker.html.erb @@ -3,9 +3,9 @@ <% @groups.each.with_index(1) do |slice, i| %> <h2>Team <%= i %></h2> <p>Table: <%= @machines[i - 1].name %></p> - <ul> + <ol> <% slice.each do |player| %> <li><%= link_to player.name, edit_player_path(player) %></li> <% end %> - </ul> + </ol> <% end %> diff --git a/app/views/players/edit.html.erb b/app/views/players/edit.html.erb index 1504b65..fd22922 100644 --- a/app/views/players/edit.html.erb +++ b/app/views/players/edit.html.erb @@ -2,7 +2,6 @@ <%= render "form", machine: @player %> -<%= link_to "Delete #{@player.name}", player_path(@player), +<p><%= link_to "Delete #{@player.name}", player_path(@player), method: :delete, - data: { confirm: "Are you sure?" } %> - + data: { confirm: "Are you sure?" } %></p> diff --git a/app/views/players/index.html.erb b/app/views/players/index.html.erb index aea4252..31a84f1 100644 --- a/app/views/players/index.html.erb +++ b/app/views/players/index.html.erb @@ -1,11 +1,11 @@ <h1>Pinball Players</h1> - <table> <thead> <th>Name</th> <th>Paid</th> <th>Strikes</th> + <th>Delete</th> </thead> <tbody> <% @players.order("strikes").each do |player| %> @@ -13,6 +13,9 @@ <td><%= link_to player.name, edit_player_path(player) %></td> <td><% if player.paid %>✓<% end %></td> <td><%= player.strikes %></td> + <td><%= link_to "X", player_path(player), + method: :delete, + data: { confirm: "Are you sure?" } %></td> </tr> <% end %> </tbody> |