mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-07 06:54:16 +00:00
Added back links to brackets and weights static_pages
This commit is contained in:
@@ -7,6 +7,7 @@ class StaticPagesController < ApplicationController
|
|||||||
def brackets
|
def brackets
|
||||||
if params[:weight]
|
if params[:weight]
|
||||||
@weight = Weight.find(params[:weight])
|
@weight = Weight.find(params[:weight])
|
||||||
|
@tournament = Tournament.find(@weight.tournament_id)
|
||||||
@wrestlers = Wrestler.where(weight_id: @weight.id)
|
@wrestlers = Wrestler.where(weight_id: @weight.id)
|
||||||
@bracket_size = Wrestler.where(weight_id: @weight.id).count
|
@bracket_size = Wrestler.where(weight_id: @weight.id).count
|
||||||
@seed1 = Wrestler.where(weight_id: @weight.id, original_seed: 1).first
|
@seed1 = Wrestler.where(weight_id: @weight.id, original_seed: 1).first
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
<%= link_to "Back to #{@tournament.name} weights", "/static_pages/weights?tournament=#{@tournament.id}" %>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
<% if @bracket_size == 10 %>
|
<% if @bracket_size == 10 %>
|
||||||
<%= render 'man10' %>
|
<%= render 'man10' %>
|
||||||
<% elsif @bracket_size == 9 %>
|
<% elsif @bracket_size == 9 %>
|
||||||
|
|||||||
@@ -1,3 +1,6 @@
|
|||||||
|
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
|
||||||
|
<br>
|
||||||
|
<br>
|
||||||
<% @weights.each do |weight| %>
|
<% @weights.each do |weight| %>
|
||||||
<%= link_to "#{weight.max}" , "/static_pages/brackets?weight=#{weight.id}" %>
|
<%= link_to "#{weight.max}" , "/static_pages/brackets?weight=#{weight.id}" %>
|
||||||
<br>
|
<br>
|
||||||
|
|||||||
Reference in New Issue
Block a user