1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-03-25 01:14:43 +00:00

Went through views to make sure navigation is correct and views look ok

This commit is contained in:
2015-11-05 03:02:03 +00:00
parent 4fae1c2896
commit 7aad1ee429
15 changed files with 34 additions and 27 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -10,7 +10,7 @@
<div><%= f.label :password_confirmation, "Confirm new password" %><br />
<%= f.password_field :password_confirmation %></div>
<div><%= f.submit "Change my password" %></div>
<div><%= f.submit "Change my password" :class=>"btn btn-success"%></div>
<% end %>
<%= render "devise/shared/links" %>

View File

@@ -5,8 +5,9 @@
<div><%= f.label :email %><br />
<%= f.email_field :email, :autofocus => true %></div>
<div><%= f.submit "Send me reset password instructions" %></div>
<br>
<div><%= f.submit "Send me reset password instructions",:class=>"btn btn-success" %></div>
<% end %>
<br>
<br>
<%= render "devise/shared/links" %>

View File

@@ -18,12 +18,12 @@
<div><%= f.label :current_password %> <i>(we need your current password to confirm your changes)</i><br />
<%= f.password_field :current_password %></div>
<div><%= f.submit "Update" %></div>
<br>
<div><%= f.submit "Update",:class=>"btn btn-success" %></div>
<% end %>
<h3>Cancel my account</h3>
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete %></p>
<p>Unhappy? <%= button_to "Cancel my account", registration_path(resource_name), :data => { :confirm => "Are you sure?" }, :method => :delete, :class=>"btn btn-danger" %></p>
<%= link_to "Back", :back %>

View File

@@ -11,7 +11,8 @@
<div><%= f.check_box :remember_me %> <%= f.label :remember_me %></div>
<% end -%>
<div><%= f.submit "Sign in" %></div>
<div><%= f.submit "Sign in" ,:class=>"btn btn-success"%></div>
<% end %>
<br>
<br>
<%= render "devise/shared/links" %>

View File

@@ -1,7 +1,7 @@
<p id="notice"><%= notice %></p>
<%= 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 %>
<br>
<br>
@@ -63,7 +63,7 @@
<% if tournament_permissions(@school.tournament) %>
<td>
<%= 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" %>
</td>
<% end %>

View File

@@ -1,4 +1,4 @@
<%= link_to 'Back', root_path, :class=>"btn btn-default" %>
<%= link_to 'Back', tournaments_path, :class=>"btn btn-default" %>
<br>
<h1>Editing tournament</h1>

View File

@@ -1,4 +1,4 @@
<%= link_to 'Back', root_path, :class=>"btn btn-default" %>
<%= link_to 'Back', tournaments_path, :class=>"btn btn-default" %>
<br>
<h1>New tournament</h1>

View File

@@ -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" %>
<br>
<br>
<h1>No Matches</h1>

View File

@@ -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" %>
<br>
<br>
<% @weights.each do |weight| %>

View File

@@ -1,13 +1,14 @@
<p id="notice"><%= notice %></p>
<h1>Weight Class:<%= @weight.max %></h1>
<%= 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 %>
<br>
<h1>Weight Class:<%= @weight.max %></h1>
<br>
<br>
<table class="table table-striped table-bordered">

View File

@@ -1,3 +1,4 @@
<%= form_for(@wrestler) do |f| %>
<% if @wrestler.errors.any? %>
<div id="error_explanation">
@@ -52,7 +53,7 @@
</br>
</br>
<div class="actions">
<%= f.submit %>
<%= f.submit :class=>"btn btn-success"%>
</div>
<% end %>

View File

@@ -1,5 +1,7 @@
<%= link_to "Back to #{@school.name}", "/schools/#{@school.id}", :class=>"btn btn-default" %>
<br>
<br>
<h1>Editing wrestler</h1>
<%= render 'form' %>
<%= link_to 'Back', "/schools/#{@school.id}" %>

View File

@@ -1,5 +1,7 @@
<%= link_to "Back to #{@school.name}", "/schools/#{@school.id}", :class=>"btn btn-default" %>
<br>
<br>
<h1>New wrestler</h1>
<%= render 'form' %>
<%= link_to 'Back', "/schools/#{@school.id}" %>