mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-14 17:06:46 +00:00
A ton of stuff was done to finalize the app for use
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<h1><%= @weight.max %> lbs Bracket</h1>
|
||||
|
||||
<h3>Pool 1</h3>
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<h1><%= @weight.max %> lbs Bracket</h1>
|
||||
<h3>Pool 1</h3>
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<h1><%= @weight.max %> lbs Bracket</h1>
|
||||
<h3>Pool 1</h3>
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
<h1><%= @weight.max %> lbs Bracket</h1>
|
||||
<h3>Pool 1</h3>
|
||||
<table class="table table-striped table-bordered">
|
||||
<thead>
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<%= link_to "Back to #{@tournament.name} weights", "/static_pages/weights?tournament=#{@tournament.id}" %>
|
||||
<br>
|
||||
<br>
|
||||
<h1><%= @weight.max %> lbs Bracket <%= Mat.find(@weight.mat_id).name %></h1>
|
||||
<% if @bracket_size == 10 %>
|
||||
<%= render 'man10' %>
|
||||
<% elsif @bracket_size == 9 %>
|
||||
|
||||
3
app/views/static_pages/generate_matches.html.erb
Normal file
3
app/views/static_pages/generate_matches.html.erb
Normal file
@@ -0,0 +1,3 @@
|
||||
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
|
||||
<br>
|
||||
Done!
|
||||
105
app/views/static_pages/results.html.erb
Normal file
105
app/views/static_pages/results.html.erb
Normal file
@@ -0,0 +1,105 @@
|
||||
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Round 1</h3>
|
||||
<% @matches.each do |m| %>
|
||||
<% if m.round == 1 %>
|
||||
<% if Wrestler.find(m.g_id).id == m.winner_id %>
|
||||
<% @winner = Wrestler.find(m.g_id) %>
|
||||
<% else %>
|
||||
<% @loser = Wrestler.find(m.g_id) %>
|
||||
<% end %>
|
||||
<% if Wrestler.find(m.r_id).id == m.winner_id %>
|
||||
<% @winner = Wrestler.find(m.r_id) %>
|
||||
<% else %>
|
||||
<% @loser = Wrestler.find(m.r_id) %>
|
||||
<% end %>
|
||||
<%= @winner.weight.max %> Lbs <%= @winner.name %> <%= m.win_type %> <%= m.score %> <%= @loser.name %>
|
||||
<br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3>Round 2</h3>
|
||||
<% @matches.each do |m| %>
|
||||
<% if m.round == 2 %>
|
||||
<% if Wrestler.find(m.g_id).id == m.winner_id %>
|
||||
<% @winner = Wrestler.find(m.g_id) %>
|
||||
<% else %>
|
||||
<% @loser = Wrestler.find(m.g_id) %>
|
||||
<% end %>
|
||||
<% if Wrestler.find(m.r_id).id == m.winner_id %>
|
||||
<% @winner = Wrestler.find(m.r_id) %>
|
||||
<% else %>
|
||||
<% @loser = Wrestler.find(m.r_id) %>
|
||||
<% end %>
|
||||
<%= @winner.weight.max %> Lbs <%= @winner.name %> <%= m.win_type %> <%= m.score %> <%= @loser.name %>
|
||||
<br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3>Round 3</h3>
|
||||
<% @matches.each do |m| %>
|
||||
<% if m.round == 3 %>
|
||||
<% if Wrestler.find(m.g_id).id == m.winner_id %>
|
||||
<% @winner = Wrestler.find(m.g_id) %>
|
||||
<% else %>
|
||||
<% @loser = Wrestler.find(m.g_id) %>
|
||||
<% end %>
|
||||
<% if Wrestler.find(m.r_id).id == m.winner_id %>
|
||||
<% @winner = Wrestler.find(m.r_id) %>
|
||||
<% else %>
|
||||
<% @loser = Wrestler.find(m.r_id) %>
|
||||
<% end %>
|
||||
<%= @winner.weight.max %> Lbs <%= @winner.name %> <%= m.win_type %> <%= m.score %> <%= @loser.name %>
|
||||
<br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3>Round 4</h3>
|
||||
<% @matches.each do |m| %>
|
||||
<% if m.round == 4 %>
|
||||
<% if Wrestler.find(m.g_id).id == m.winner_id %>
|
||||
<% @winner = Wrestler.find(m.g_id) %>
|
||||
<% else %>
|
||||
<% @loser = Wrestler.find(m.g_id) %>
|
||||
<% end %>
|
||||
<% if Wrestler.find(m.r_id).id == m.winner_id %>
|
||||
<% @winner = Wrestler.find(m.r_id) %>
|
||||
<% else %>
|
||||
<% @loser = Wrestler.find(m.r_id) %>
|
||||
<% end %>
|
||||
<%= @winner.weight.max %> Lbs <%= @winner.name %> <%= m.win_type %> <%= m.score %> <%= @loser.name %>
|
||||
<br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3>Round 5</h3>
|
||||
<% @matches.each do |m| %>
|
||||
<% if m.round == 5 %>
|
||||
<% if Wrestler.find(m.g_id).id == m.winner_id %>
|
||||
<% @winner = Wrestler.find(m.g_id) %>
|
||||
<% else %>
|
||||
<% @loser = Wrestler.find(m.g_id) %>
|
||||
<% end %>
|
||||
<% if Wrestler.find(m.r_id).id == m.winner_id %>
|
||||
<% @winner = Wrestler.find(m.r_id) %>
|
||||
<% else %>
|
||||
<% @loser = Wrestler.find(m.r_id) %>
|
||||
<% end %>
|
||||
<%= @winner.weight.max %> Lbs <%= @winner.name %> <%= m.win_type %> <%= m.score %> <%= @loser.name %>
|
||||
<br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3>Round 6</h3>
|
||||
<% @matches.each do |m| %>
|
||||
<% if m.round == 6 %>
|
||||
<% if Wrestler.find(m.g_id).id == m.winner_id %>
|
||||
<% @winner = Wrestler.find(m.g_id) %>
|
||||
<% else %>
|
||||
<% @loser = Wrestler.find(m.g_id) %>
|
||||
<% end %>
|
||||
<% if Wrestler.find(m.r_id).id == m.winner_id %>
|
||||
<% @winner = Wrestler.find(m.r_id) %>
|
||||
<% else %>
|
||||
<% @loser = Wrestler.find(m.r_id) %>
|
||||
<% end %>
|
||||
<%= @winner.weight.max %> Lbs <%= @winner.name %> <%= m.win_type %> <%= m.score %> <%= @loser.name %>
|
||||
<br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
45
app/views/static_pages/up_matches.html.erb
Normal file
45
app/views/static_pages/up_matches.html.erb
Normal file
@@ -0,0 +1,45 @@
|
||||
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
|
||||
<br>
|
||||
<br>
|
||||
<h3>Round 1</h3>
|
||||
<% @matches.each do |m| %>
|
||||
<% if m.round == 1 %>
|
||||
<%= Wrestler.find(m.r_id).weight.max %> Lbs <%= Wrestler.find(m.r_id).name %> vs. <%= Wrestler.find(m.g_id).name %> <%= link_to "Control Match", "/matches/#{m.id}/edit" %>
|
||||
<br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3>Round 2</h3>
|
||||
<% @matches.each do |m| %>
|
||||
<% if m.round == 2 %>
|
||||
<%= Wrestler.find(m.r_id).weight.max %> Lbs <%= Wrestler.find(m.r_id).name %> vs. <%= Wrestler.find(m.g_id).name %> <%= link_to "Control Match", "/matches/#{m.id}/edit" %>
|
||||
<br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3>Round 3</h3>
|
||||
<% @matches.each do |m| %>
|
||||
<% if m.round == 3 %>
|
||||
<%= Wrestler.find(m.r_id).weight.max %> Lbs <%= Wrestler.find(m.r_id).name %> vs. <%= Wrestler.find(m.g_id).name %> <%= link_to "Control Match", "/matches/#{m.id}/edit" %>
|
||||
<br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3>Round 4</h3>
|
||||
<% @matches.each do |m| %>
|
||||
<% if m.round == 4 %>
|
||||
<%= Wrestler.find(m.r_id).weight.max %> Lbs <%= Wrestler.find(m.r_id).name %> vs. <%= Wrestler.find(m.g_id).name %> <%= link_to "Control Match", "/matches/#{m.id}/edit" %>
|
||||
<br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3>Round 5</h3>
|
||||
<% @matches.each do |m| %>
|
||||
<% if m.round == 5 %>
|
||||
<%= Wrestler.find(m.r_id).weight.max %> Lbs <%= Wrestler.find(m.r_id).name %> vs. <%= Wrestler.find(m.g_id).name %> <%= link_to "Control Match", "/matches/#{m.id}/edit" %>
|
||||
<br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<h3>Round 6</h3>
|
||||
<% @matches.each do |m| %>
|
||||
<% if m.round == 6 %>
|
||||
<%= Wrestler.find(m.r_id).weight.max %> Lbs <%= @weight_class %> LBS <%= Wrestler.find(m.r_id).name %> vs. <%= Wrestler.find(m.g_id).name %> <%= link_to "Control Match", "/matches/#{m.id}/edit" %>
|
||||
<br>
|
||||
<% end %>
|
||||
<% end %>
|
||||
Reference in New Issue
Block a user