diff --git a/app/views/wrestlers/.show.html.erb.swp b/app/controllers/.schools_controller.rb.swp
similarity index 70%
rename from app/views/wrestlers/.show.html.erb.swp
rename to app/controllers/.schools_controller.rb.swp
index 49cd346..cd08878 100644
Binary files a/app/views/wrestlers/.show.html.erb.swp and b/app/controllers/.schools_controller.rb.swp differ
diff --git a/app/controllers/schools_controller.rb b/app/controllers/schools_controller.rb
index 41ade29..40a6ca1 100644
--- a/app/controllers/schools_controller.rb
+++ b/app/controllers/schools_controller.rb
@@ -1,9 +1,13 @@
class SchoolsController < ApplicationController
- before_action :set_school, only: [:show, :edit, :update, :destroy]
+ before_action :set_school, only: [:show, :edit, :update, :destroy, :stats]
before_action :check_access_director, only: [:new,:create,:destroy]
before_action :check_access_delegate, only: [:update,:edit]
+ def stats
+ @tournament = @school.tournament
+ end
+
# GET /schools/1
# GET /schools/1.json
def show
@@ -89,7 +93,7 @@ class SchoolsController < ApplicationController
end
authorize! :manage, @tournament
end
-
+
def check_access_delegate
authorize! :manage, @school
end
diff --git a/app/views/schools/show.html.erb b/app/views/schools/show.html.erb
index dacc026..23118fc 100644
--- a/app/views/schools/show.html.erb
+++ b/app/views/schools/show.html.erb
@@ -1,16 +1,16 @@
-
- <%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}",:class=>"btn btn-default" %>
+
+ <%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}",:class=>"btn btn-default" %>
<% if can? :manage, @school %>
| <%= link_to "Edit #{@school.name}", edit_school_path(@school),:class=>"btn btn-primary" %>
<% end %>
-
+ | <%= link_to "#{@school.name} Stat Summary", "/schools/#{@school.id}/stats",:class=>"btn btn-primary" %>
Name: <%= @school.name %>
- +Team Points Deducted: <%= @school.totalDeductedPoints %> @@ -19,23 +19,23 @@ Score: <%= @school.score %>
- +Tournament: <%= @school.tournament.name %>
- - - - - + + + + +| Actions | ||||
|---|---|---|---|---|
| Wrester | +Bout | +Match Bracket Position | +Stats | +Result | +
|---|---|---|---|---|
| <%= wrestler.name %> + | <%= m.bout_number %> | +<%= m.bracket_position %> | +<%= m.list_w1_stats %> <%= m.list_w2_stats %> |
+ <%= wrestler.resultByBout(m.bout_number) %> + |