about summary refs log tree commit diff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/controllers/machines_controller.rb2
-rw-r--r--app/controllers/players_controller.rb2
-rw-r--r--app/views/machines/show.html.erb6
-rw-r--r--app/views/pages/index.html.erb2
-rw-r--r--app/views/players/index.html.erb2
-rw-r--r--app/views/players/show.html.erb6
6 files changed, 12 insertions, 8 deletions
diff --git a/app/controllers/machines_controller.rb b/app/controllers/machines_controller.rb
index 33dcd3b..9d47832 100644
--- a/app/controllers/machines_controller.rb
+++ b/app/controllers/machines_controller.rb
@@ -52,7 +52,7 @@ class MachinesController < ApplicationController
     @machine.destroy
 
     respond_to do |format|
-      format.html { redirect_to machines_url, notice: 'Machine was successfully destroyed.' }
+      format.html { redirect_to machines_url, notice: 'Machine was successfully removed.' }
       format.json { head :no_content }
     end
   end
diff --git a/app/controllers/players_controller.rb b/app/controllers/players_controller.rb
index cebe2a1..4e1195d 100644
--- a/app/controllers/players_controller.rb
+++ b/app/controllers/players_controller.rb
@@ -49,7 +49,7 @@ class PlayersController < ApplicationController
     @player.destroy
 
     respond_to do |format|
-      format.html { redirect_to players_url, notice: 'Player was successfully destroyed.' }
+      format.html { redirect_to players_url, notice: 'Player was successfully removed.' }
       format.json { head :no_content }
     end
   end
diff --git a/app/views/machines/show.html.erb b/app/views/machines/show.html.erb
index 19e5f19..4bba20c 100644
--- a/app/views/machines/show.html.erb
+++ b/app/views/machines/show.html.erb
@@ -1,7 +1,9 @@
-<p style="color: green"><%= notice %></p>
+<% if not notice.nil? %><p style="color: green"><%= notice %></p><% end %>
 
 <%= render "form", machine: @machine %>
 
 <div>
-  <%= button_to "Delete #{@machine.name}", @machine, method: :delete %>
+  <%= link_to "Delete #{@machine.name} ❌", @machine, data: {
+    turbo_method: :delete,
+    turbo_confirm: "Are you sure you want to remove #{@machine.name}?"} %>
 </div>
diff --git a/app/views/pages/index.html.erb b/app/views/pages/index.html.erb
index ddfa22f..e9456ca 100644
--- a/app/views/pages/index.html.erb
+++ b/app/views/pages/index.html.erb
@@ -1,3 +1,3 @@
 <h1>Knockout</h1>
 <p>To start the tournament, add players and make sure that the pins are up to date. Then hit randomize to automatically pick teams!</p>
-<p>The source code for this app can be found <a href="https://tildegit.org/ben/pinrails">here</a>.</p>
\ No newline at end of file
+<p>The source code for this app can be found <%= link_to 'here', "#{GIT_REPO}/src/commit/#{GIT_SHA}" %>.</p>
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 %></td>
         <td><%= player.strikes %></td>
-        <td><%= link_to "X", player, data: {
+        <td><%= link_to "❌", player, data: {
           turbo_method: :delete,
           turbo_confirm: "Are you sure you want to remove #{player.name}?"
         } %></td>
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 @@
-<p style="color: green"><%= notice %></p>
+<% if not notice.nil? %><p style="color: green"><%= notice %></p><% end %>
 
 <%= render "form", player: @player %>
 
 <div>
-  <%= 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}?"} %>
 </div>