diff --git a/app/controllers/tournaments_controller.rb b/app/controllers/tournaments_controller.rb index 490b8a1..421725e 100644 --- a/app/controllers/tournaments_controller.rb +++ b/app/controllers/tournaments_controller.rb @@ -55,8 +55,7 @@ class TournamentsController < ApplicationController end def brackets - @weights = @tournament.weights - @weights.sort_by{|w| w.max} + @weights = @tournament.weights.sort_by{|w| w.max} end def team_scores diff --git a/app/controllers/wrestlers_controller.rb b/app/controllers/wrestlers_controller.rb index 06ad302..7a8cf5d 100644 --- a/app/controllers/wrestlers_controller.rb +++ b/app/controllers/wrestlers_controller.rb @@ -20,7 +20,7 @@ class WrestlersController < ApplicationController @tournament = Tournament.find(@school.tournament_id) end if @tournament - @weights = Weight.where(tournament_id: @tournament.id) + @weights = Weight.where(tournament_id: @tournament.id).sort_by{|w| w.max} end end @@ -31,7 +31,7 @@ class WrestlersController < ApplicationController @school = @wrestler.school @tournament = @wrestler.tournament @weight = @wrestler.weight - @weights = @tournament.weights + @weights = @tournament.weights.sort_by{|w| w.max} end # POST /wrestlers diff --git a/app/views/devise/passwords/edit.html.erb b/app/views/devise/passwords/edit.html.erb index 34a4960..f4b0178 100644 --- a/app/views/devise/passwords/edit.html.erb +++ b/app/views/devise/passwords/edit.html.erb @@ -10,7 +10,7 @@
<%= f.label :password_confirmation, "Confirm new password" %>
<%= f.password_field :password_confirmation %>
-
<%= f.submit "Change my password" %>
+
<%= f.submit "Change my password" :class=>"btn btn-success"%>
<% end %> <%= render "devise/shared/links" %> diff --git a/app/views/devise/passwords/new.html.erb b/app/views/devise/passwords/new.html.erb index 5a400df..497a199 100644 --- a/app/views/devise/passwords/new.html.erb +++ b/app/views/devise/passwords/new.html.erb @@ -5,8 +5,9 @@
<%= f.label :email %>
<%= f.email_field :email, :autofocus => true %>
- -
<%= f.submit "Send me reset password instructions" %>
+
+
<%= f.submit "Send me reset password instructions",:class=>"btn btn-success" %>
<% end %> - +
+
<%= render "devise/shared/links" %> diff --git a/app/views/devise/registrations/edit.html.erb b/app/views/devise/registrations/edit.html.erb index 986db40..62b0c16 100644 --- a/app/views/devise/registrations/edit.html.erb +++ b/app/views/devise/registrations/edit.html.erb @@ -18,12 +18,12 @@
<%= f.label :current_password %> (we need your current password to confirm your changes)
<%= f.password_field :current_password %>
- -
<%= f.submit "Update" %>
+
+
<%= f.submit "Update",:class=>"btn btn-success" %>
<% end %>

Cancel my account

-

Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %>

+

Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete, :class=>"btn btn-danger" %>

+ -<%= link_to "Back", :back %> diff --git a/app/views/devise/sessions/new.html.erb b/app/views/devise/sessions/new.html.erb index f9bc2c1..831957e 100644 --- a/app/views/devise/sessions/new.html.erb +++ b/app/views/devise/sessions/new.html.erb @@ -11,7 +11,8 @@
<%= f.check_box :remember_me %> <%= f.label :remember_me %>
<% end -%> -
<%= f.submit "Sign in" %>
+
<%= f.submit "Sign in" ,:class=>"btn btn-success"%>
<% end %> - +
+
<%= render "devise/shared/links" %> diff --git a/app/views/schools/show.html.erb b/app/views/schools/show.html.erb index b109ad4..6ea54ed 100644 --- a/app/views/schools/show.html.erb +++ b/app/views/schools/show.html.erb @@ -1,7 +1,7 @@

<%= notice %>

-<%= 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 tournament_permissions(@school.tournament) %> - <%= link_to "Edit #{@school.name}", edit_school_path(@school),:class=>"btn btn-primary" %> +| <%= link_to "Edit #{@school.name}", edit_school_path(@school),:class=>"btn btn-primary" %> <% end %>

@@ -63,7 +63,7 @@ <% if tournament_permissions(@school.tournament) %> <%= link_to 'Show', wrestler , :class=>"btn btn-default" %> - <%= link_to 'Edit', edit_wrestler_path(wrestler), :class=>"btn btn-default" %> + <%= link_to 'Edit', edit_wrestler_path(wrestler),:class=>"btn btn-primary" %> <%= link_to 'Destroy', wrestler, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %> <% end %> diff --git a/app/views/tournaments/edit.html.erb b/app/views/tournaments/edit.html.erb index 5887f6d..40be8f3 100644 --- a/app/views/tournaments/edit.html.erb +++ b/app/views/tournaments/edit.html.erb @@ -1,4 +1,4 @@ -<%= link_to 'Back', root_path, :class=>"btn btn-default" %> +<%= link_to 'Back', tournaments_path, :class=>"btn btn-default" %>

Editing tournament

diff --git a/app/views/tournaments/new.html.erb b/app/views/tournaments/new.html.erb index 6c3e7ba..295af8b 100644 --- a/app/views/tournaments/new.html.erb +++ b/app/views/tournaments/new.html.erb @@ -1,4 +1,4 @@ -<%= link_to 'Back', root_path, :class=>"btn btn-default" %> +<%= link_to 'Back', tournaments_path, :class=>"btn btn-default" %>

New tournament

diff --git a/app/views/tournaments/no_matches.html.erb b/app/views/tournaments/no_matches.html.erb index d0d0fb8..0dc45c3 100644 --- a/app/views/tournaments/no_matches.html.erb +++ b/app/views/tournaments/no_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" %>

No Matches

diff --git a/app/views/tournaments/weigh_in.html.erb b/app/views/tournaments/weigh_in.html.erb index b15a517..f0ebeec 100644 --- a/app/views/tournaments/weigh_in.html.erb +++ b/app/views/tournaments/weigh_in.html.erb @@ -1,4 +1,4 @@ -<%= 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" %>

<% @weights.each do |weight| %> diff --git a/app/views/weights/show.html.erb b/app/views/weights/show.html.erb index 691aee0..abed09e 100644 --- a/app/views/weights/show.html.erb +++ b/app/views/weights/show.html.erb @@ -1,13 +1,14 @@

<%= notice %>

-

Weight Class:<%= @weight.max %>

+ - <%= 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 tournament_permissions(@tournament) %> - <%= link_to "Edit #{@weight.max} Weight Class", edit_weight_path(@weight), :class=>"btn btn-primary" %> + | <%= link_to "Edit #{@weight.max} Weight Class", edit_weight_path(@weight), :class=>"btn btn-primary" %> <% end %>
+

Weight Class:<%= @weight.max %>



diff --git a/app/views/wrestlers/_form.html.erb b/app/views/wrestlers/_form.html.erb index 9d7cf9a..5256004 100644 --- a/app/views/wrestlers/_form.html.erb +++ b/app/views/wrestlers/_form.html.erb @@ -1,3 +1,4 @@ + <%= form_for(@wrestler) do |f| %> <% if @wrestler.errors.any? %>
@@ -52,7 +53,7 @@

- <%= f.submit %> + <%= f.submit :class=>"btn btn-success"%>
<% end %> diff --git a/app/views/wrestlers/edit.html.erb b/app/views/wrestlers/edit.html.erb index 7cc7d68..5ac92be 100644 --- a/app/views/wrestlers/edit.html.erb +++ b/app/views/wrestlers/edit.html.erb @@ -1,5 +1,7 @@ +<%= link_to "Back to #{@school.name}", "/schools/#{@school.id}", :class=>"btn btn-default" %> +
+

Editing wrestler

<%= render 'form' %> -<%= link_to 'Back', "/schools/#{@school.id}" %> diff --git a/app/views/wrestlers/new.html.erb b/app/views/wrestlers/new.html.erb index 99ff05e..f8234d5 100644 --- a/app/views/wrestlers/new.html.erb +++ b/app/views/wrestlers/new.html.erb @@ -1,5 +1,7 @@ +<%= link_to "Back to #{@school.name}", "/schools/#{@school.id}", :class=>"btn btn-default" %> +
+

New wrestler

<%= render 'form' %> -<%= link_to 'Back', "/schools/#{@school.id}" %>