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

Updated all links

This commit is contained in:
2015-06-30 16:56:36 +00:00
parent 0fddccf6f5
commit 5b17c49a20
25 changed files with 62 additions and 57 deletions

View File

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

View File

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

View File

@@ -24,8 +24,8 @@
<%= f.collection_select :tournament_id, Tournament.all, :id, :name %>
</div>
<% end %>
<br>
<div class="actions">
<%= f.submit %>
<%= f.submit 'Submit', :class=>"btn btn-success" %>
</div>
<% end %>

View File

@@ -2,5 +2,4 @@
<%= render 'form' %>
<%= link_to 'Show', @mat %> |
<%= link_to 'Back', mats_path %>
<%= link_to 'Back', "/tournaments/#{@tournament.id}" %>

View File

@@ -1,5 +1,6 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
<br>
<h1>New mat</h1>
<%= render 'form' %>
<%= link_to 'Back', mats_path %>

View File

@@ -24,9 +24,9 @@
<%= f.collection_select :tournament_id, Tournament.all, :id, :name %>
</div>
<% end %>
<br>
<div class="actions">
<%= f.submit %>
<%= f.submit 'Submit', :class=>"btn btn-success" %>
</div>
<% end %>

View File

@@ -1,6 +1,7 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
<br>
<h1>Editing school</h1>
<br>
<br>
<%= render 'form' %>
<%= link_to 'Show', @school %> |
<%= link_to 'Back', schools_path %>

View File

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

View File

@@ -1,5 +1,10 @@
<p id="notice"><%= notice %></p>
<%= 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 %>
<br>
<br>
<p>
<strong>Name:</strong>
<%= @school.name %>
@@ -15,17 +20,13 @@
<%= Tournament.find(@school.tournament_id).name %>
</p>
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %> |
<% if user_signed_in? %>
<%= link_to "Edit #{@school.name}", edit_school_path(@school) %> |
<% end %>
<br>
<br>
<% 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 %>
<br>
<br>

View File

@@ -2,7 +2,7 @@
</br>
</br>
<%= 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" %>
<br>
<br>
<h1><%= @weight.max %> lbs Bracket</h1>

View File

@@ -1,3 +1,3 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
<br>
Done!
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
<br><br>
Matches successfully generated.

View File

@@ -6,7 +6,7 @@
} );
</script>
<% 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 %>
</br>
</br>
@@ -24,7 +24,7 @@
<td><%= tournament.name %></td>
<td><%= 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 %>
</td>

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>
<h3>Round 1</h3>

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>

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"%>
<script>
$(document).ready(function() {
$('#matchList').dataTable();

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

View File

@@ -34,6 +34,6 @@
<br>
<br>
<div class="actions">
<%= f.submit %>
<%= f.submit 'Submit',:class=>"btn btn-success" %>
</div>
<% end %>

View File

@@ -1,6 +1,7 @@
<%= link_to 'Back', root_path, :class=>"btn btn-default" %>
<br>
<h1>Editing tournament</h1>
<%= render 'form' %>
<%= link_to 'Show', @tournament %> |
<%= link_to 'Back', tournaments_path %>

View File

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

View File

@@ -1,8 +1,8 @@
<p id="notice"><%= notice %></p>
<% if user_signed_in? %>
<%= link_to "Edit #{@tournament.name}", edit_tournament_path(@tournament) %> |
<%= link_to "Edit #{@tournament.name}", edit_tournament_path(@tournament), :class=>"btn btn-primary" %> |
<% end %>
<%= link_to 'Back', root_path %>
<%= link_to 'Back', root_path, :class=>"btn btn-default" %>
<h1>
<%= @tournament.name %>
@@ -31,7 +31,7 @@
</p>
<br>
<% if user_signed_in? %>
<%= link_to "Generate Pool Matches" , "/static_pages/generate_matches?tournament=#{@tournament.id}", :class=>"btn btn-danger" %>
<%= link_to "Generate Pool Matches" , "/static_pages/generate_matches?tournament=#{@tournament.id}", data: { confirm: 'Are you sure? This will delete all current matches.' }, :class=>"btn btn-success" %>
<br>
<br>
<% end %>
@@ -39,7 +39,7 @@
<h3>School Lineups</h3>
<br>
<% if user_signed_in? %>
<%= link_to "New #{@tournament.name} School" , "/schools/new?tournament=#{@tournament.id}", :class=>"btn btn-default" %>
<%= link_to "New #{@tournament.name} School" , "/schools/new?tournament=#{@tournament.id}", :class=>"btn btn-success" %>
<br>
<br>
<% end %>
@@ -58,7 +58,7 @@
<td><%= school.name %></td>
<td><%= link_to 'Show', school, :class=>"btn btn-default" %>
<% if user_signed_in? %>
<%= link_to 'Edit', edit_school_path(school), :class=>"btn btn-default" %>
<%= link_to 'Edit', edit_school_path(school), :class=>"btn btn-primary" %>
<%= link_to 'Destroy', school, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %>
<% end %>
</td>
@@ -73,9 +73,9 @@
<h3>Weight Class Seeds</h3>
<br>
<% if user_signed_in? %>
<%= link_to "New #{@tournament.name} Weight" , "/weights/new?tournament=#{@tournament.id}", :class=>"btn btn-default" %>
<br>
<%= link_to "Create HS Weights" , "/static_pages/createCustomWeights?tournament=#{@tournament.id}&customValue=hs", :class=>"btn btn-default" %>
<%= link_to "New #{@tournament.name} Weight" , "/weights/new?tournament=#{@tournament.id}", :class=>"btn btn-success" %>
<br><br>
<%= link_to "Create HS Weights" , "/static_pages/createCustomWeights?tournament=#{@tournament.id}&customValue=hs",data: { confirm: 'Are you sure? This will delete all current weights.' }, :class=>"btn btn-success" %>
<br>
<br>
<% end %>
@@ -95,7 +95,7 @@
<td><%= weight.bracket_size %></td>
<td><%= link_to 'Show', weight, :class=>"btn btn-default" %>
<% if user_signed_in? %>
<%= link_to 'Edit', edit_weight_path(weight), :class=>"btn btn-default" %>
<%= link_to 'Edit', edit_weight_path(weight), :class=>"btn btn-primary" %>
<%= link_to 'Destroy', weight, method: :delete, data: { confirm: 'Are you sure?' }, :class=>"btn btn-danger" %>
<% end %>
</td>
@@ -109,7 +109,7 @@
<br>
<h3>Mats</h3>
<br>
<%= link_to "New #{@tournament.name} Mat" , "/mats/new?tournament=#{@tournament.id}", :class=>"btn btn-default" %>
<%= link_to "New #{@tournament.name} Mat" , "/mats/new?tournament=#{@tournament.id}", :class=>"btn btn-success" %>
<br>
<br>
<table class="table table-striped table-bordered">

View File

@@ -24,8 +24,8 @@
<%= f.collection_select :tournament_id, Tournament.all, :id, :name %>
</div>
<% end %>
<br>
<div class="actions">
<%= f.submit %>
<%= f.submit 'Submit', :class=>"btn btn-success" %>
</div>
<% end %>

View File

@@ -1,6 +1,6 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
<br>
<h1>Editing weight</h1>
<%= render 'form' %>
<%= link_to 'Show', @weight %> |
<%= link_to 'Back', weights_path %>

View File

@@ -1,7 +1,6 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
<br>
<h1>New weight</h1>
<br>
<br>
<p>Create weights from the bottom up. For example, start with 106 lbs and create the weight classes through to 285 lbs. This will allow the program to run the tournament starting with the lowest weight each round.</p>
<%= render 'form' %>
<%= link_to 'Back', weights_path %>

View File

@@ -2,9 +2,9 @@
<h1>Weight Class:<%= @weight.max %></h1>
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %> |
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %> |
<% if user_signed_in? %>
<%= link_to "Edit #{@weight.max} Weight Class", edit_weight_path(@weight) %> |
<%= link_to "Edit #{@weight.max} Weight Class", edit_weight_path(@weight), :class=>"btn btn-primary" %>
<% end %>
<br>
@@ -45,7 +45,6 @@
<% end %></td>
<td><%= link_to 'Show', wrestler , :class=>"btn btn-default" %>
<% if user_signed_in? %>
<%= link_to 'Edit', edit_wrestler_path(wrestler) , :class=>"btn btn-default" %>
<%= link_to 'Destroy', wrestler, method: :delete, data: { confirm: 'Are you sure?' } , :class=>"btn btn-danger" %></td>
<% end %>
</tr>
@@ -54,7 +53,7 @@
</tbody>
</table>
<% if user_signed_in? %>
<%= submit_tag "Save"%>
<%= submit_tag "Save", :class=>"btn btn-success"%>
<% end %>
<% end %>

View File

@@ -2,5 +2,4 @@
<%= render 'form' %>
<%= link_to 'Show', @wrestler %> |
<%= link_to 'Back', wrestlers_path %>
<%= link_to 'Back', "/schools/#{@school.id}" %>