diff --git a/app/controllers/schools_controller.rb b/app/controllers/schools_controller.rb
index d3fb5c6..42f647f 100644
--- a/app/controllers/schools_controller.rb
+++ b/app/controllers/schools_controller.rb
@@ -26,6 +26,7 @@ class SchoolsController < ApplicationController
# GET /schools/1/edit
def edit
@tournament_field = @school.tournament_id
+ @tournament = Tournament.find(@school.tournament_id)
end
# POST /schools
diff --git a/app/controllers/weights_controller.rb b/app/controllers/weights_controller.rb
index 9543845..12a0c34 100644
--- a/app/controllers/weights_controller.rb
+++ b/app/controllers/weights_controller.rb
@@ -31,6 +31,7 @@ class WeightsController < ApplicationController
def edit
@tournament_field = @weight.tournament_id
@mats = Mat.where(tournament_id: @weight.tournament.id)
+ @tournament = Tournament.find(@weight.tournament_id)
end
# POST /weights
diff --git a/app/views/mats/_form.html.erb b/app/views/mats/_form.html.erb
index 7c8d96b..4a654a0 100644
--- a/app/views/mats/_form.html.erb
+++ b/app/views/mats/_form.html.erb
@@ -24,8 +24,8 @@
<%= f.collection_select :tournament_id, Tournament.all, :id, :name %>
<% end %>
-
+
- <%= f.submit %>
+ <%= f.submit 'Submit', :class=>"btn btn-success" %>
<% end %>
diff --git a/app/views/mats/edit.html.erb b/app/views/mats/edit.html.erb
index 08f73fc..a0b6679 100644
--- a/app/views/mats/edit.html.erb
+++ b/app/views/mats/edit.html.erb
@@ -2,5 +2,4 @@
<%= render 'form' %>
-<%= link_to 'Show', @mat %> |
-<%= link_to 'Back', mats_path %>
+<%= link_to 'Back', "/tournaments/#{@tournament.id}" %>
diff --git a/app/views/mats/new.html.erb b/app/views/mats/new.html.erb
index fb54f53..3dfef6e 100644
--- a/app/views/mats/new.html.erb
+++ b/app/views/mats/new.html.erb
@@ -1,5 +1,6 @@
+<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
+
New mat
<%= render 'form' %>
-<%= link_to 'Back', mats_path %>
diff --git a/app/views/schools/_form.html.erb b/app/views/schools/_form.html.erb
index 8829731..7d3c724 100644
--- a/app/views/schools/_form.html.erb
+++ b/app/views/schools/_form.html.erb
@@ -24,9 +24,9 @@
<%= f.collection_select :tournament_id, Tournament.all, :id, :name %>
<% end %>
-
+
- <%= f.submit %>
+ <%= f.submit 'Submit', :class=>"btn btn-success" %>
<% end %>
diff --git a/app/views/schools/edit.html.erb b/app/views/schools/edit.html.erb
index 15ebfaf..99aadcf 100644
--- a/app/views/schools/edit.html.erb
+++ b/app/views/schools/edit.html.erb
@@ -1,6 +1,7 @@
+<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
+
Editing school
-
+
+
<%= render 'form' %>
-<%= link_to 'Show', @school %> |
-<%= link_to 'Back', schools_path %>
diff --git a/app/views/schools/new.html.erb b/app/views/schools/new.html.erb
index fb195ab..991775f 100644
--- a/app/views/schools/new.html.erb
+++ b/app/views/schools/new.html.erb
@@ -1,5 +1,7 @@
+<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
+
New school
-
+
+
<%= render 'form' %>
-<%= link_to 'Back', "/tournaments/#{@tournament.id}" %>
diff --git a/app/views/schools/show.html.erb b/app/views/schools/show.html.erb
index e943958..33b9706 100644
--- a/app/views/schools/show.html.erb
+++ b/app/views/schools/show.html.erb
@@ -1,5 +1,10 @@
<%= notice %>
-
+<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}",:class=>"btn btn-default" %> |
+<% if user_signed_in? %>
+ <%= link_to "Edit #{@school.name}", edit_school_path(@school),:class=>"btn btn-primary" %>
+<% end %>
+
+
Name:
<%= @school.name %>
@@ -15,17 +20,13 @@
<%= Tournament.find(@school.tournament_id).name %>
-<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %> |
-<% if user_signed_in? %>
- <%= link_to "Edit #{@school.name}", edit_school_path(@school) %> |
-<% end %>
-
+
<% if user_signed_in? %>
- <%= link_to "New #{@school.name} Wrestler" , "/wrestlers/new?school=#{@school.id}" %>
+ <%= link_to "New #{@school.name} Wrestler" , "/wrestlers/new?school=#{@school.id}", :class=>"btn btn-success"%>
<% end %>
diff --git a/app/views/static_pages/brackets.html.erb b/app/views/static_pages/brackets.html.erb
index 2a25911..59bc0f2 100644
--- a/app/views/static_pages/brackets.html.erb
+++ b/app/views/static_pages/brackets.html.erb
@@ -2,7 +2,7 @@
-<%= link_to "Back to #{@tournament.name} weights", "/static_pages/weights?tournament=#{@tournament.id}" %>
+<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
<%= @weight.max %> lbs Bracket
diff --git a/app/views/static_pages/generate_matches.html.erb b/app/views/static_pages/generate_matches.html.erb
index c5d6ff8..469b04c 100644
--- a/app/views/static_pages/generate_matches.html.erb
+++ b/app/views/static_pages/generate_matches.html.erb
@@ -1,3 +1,3 @@
-<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
-
-Done!
\ No newline at end of file
+<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
+
+Matches successfully generated.
\ No newline at end of file
diff --git a/app/views/static_pages/index.html.erb b/app/views/static_pages/index.html.erb
index 6643e8b..5ad3350 100644
--- a/app/views/static_pages/index.html.erb
+++ b/app/views/static_pages/index.html.erb
@@ -6,7 +6,7 @@
} );
<% if user_signed_in? %>
- <%= link_to 'New Tournament', new_tournament_path, :class=>"btn btn-default" %>
+ <%= link_to 'New Tournament', new_tournament_path, :class=>"btn btn-success" %>
<% end %>
@@ -24,7 +24,7 @@
<%= tournament.name %> |
<%= link_to 'Show', tournament, :class=>"btn btn-default" %>
<% if user_signed_in? %>
- <%= link_to 'Edit', edit_tournament_path(tournament), :class=>"btn btn-default" %>
+ <%= link_to 'Edit', edit_tournament_path(tournament), :class=>"btn btn-primary" %>
<%= link_to 'Destroy', tournament, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %>
<% end %>
|
diff --git a/app/views/static_pages/results.html.erb b/app/views/static_pages/results.html.erb
index b8a2552..c21a9f4 100644
--- a/app/views/static_pages/results.html.erb
+++ b/app/views/static_pages/results.html.erb
@@ -1,4 +1,4 @@
-<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
+<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
Round 1
diff --git a/app/views/static_pages/team_scores.html.erb b/app/views/static_pages/team_scores.html.erb
index 9258f9e..34d4d4a 100644
--- a/app/views/static_pages/team_scores.html.erb
+++ b/app/views/static_pages/team_scores.html.erb
@@ -1,4 +1,4 @@
-<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
+<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" , :class=>"btn btn-default"%>
diff --git a/app/views/static_pages/up_matches.html.erb b/app/views/static_pages/up_matches.html.erb
index a14b2df..650dbb5 100644
--- a/app/views/static_pages/up_matches.html.erb
+++ b/app/views/static_pages/up_matches.html.erb
@@ -1,4 +1,4 @@
-<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
+<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default"%>