mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-11 07:56:28 +00:00
Put win type on bracket and made bracket text smaller
This commit is contained in:
@@ -63,15 +63,16 @@ class Match < ActiveRecord::Base
|
|||||||
end
|
end
|
||||||
if self.finished == 1
|
if self.finished == 1
|
||||||
if self.win_type == "Default"
|
if self.win_type == "Default"
|
||||||
return "Def"
|
return "(Def)"
|
||||||
elsif self.win_type == "Injury Default"
|
elsif self.win_type == "Injury Default"
|
||||||
return "Inj"
|
return "(Inj)"
|
||||||
elsif self.win_type == "DQ"
|
elsif self.win_type == "DQ"
|
||||||
return "DQ"
|
return "(DQ)"
|
||||||
elsif self.win_type == "Forfeit"
|
elsif self.win_type == "Forfeit"
|
||||||
return "For"
|
return "(For)"
|
||||||
else
|
else
|
||||||
return "(#{self.score})"
|
win_type_abbreviation = "#{self.win_type.chars.to_a[0..2].join('')}"
|
||||||
|
return "(#{win_type_abbreviation} #{self.score})"
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -19,7 +19,7 @@
|
|||||||
<option value="red">Red</option>
|
<option value="red">Red</option>
|
||||||
</select>
|
</select>
|
||||||
<br>School: <%= @w1.school.name %>
|
<br>School: <%= @w1.school.name %>
|
||||||
<br>Last Match: <%= if @w1.last_match != nil then time_ago_in_words(@w2.last_match.updated_at) else "N/A" end%></th>
|
<br>Last Match: <%= if @w1.last_match != nil then time_ago_in_words(@w1.last_match.updated_at) else "N/A" end%></th>
|
||||||
<th>Name: <%= @w2.name %> <select id="w2-color" onchange="changeW2Color(this)">
|
<th>Name: <%= @w2.name %> <select id="w2-color" onchange="changeW2Color(this)">
|
||||||
<option value="red">Red</option>
|
<option value="red">Red</option>
|
||||||
<option value="green">Green</option>
|
<option value="green">Green</option>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
<style>
|
<style>
|
||||||
|
table.smallText tr td { font-size: 10px; }
|
||||||
/*
|
/*
|
||||||
* Bracket Layout Specifics
|
* Bracket Layout Specifics
|
||||||
*/
|
*/
|
||||||
@@ -9,9 +10,10 @@ main {
|
|||||||
.round {
|
.round {
|
||||||
display:flex;
|
display:flex;
|
||||||
flex-direction:column;
|
flex-direction:column;
|
||||||
width: 200px;
|
width: 145px;
|
||||||
list-style:none;
|
list-style:none;
|
||||||
padding:0;
|
padding:0;
|
||||||
|
font-size: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.game + li {
|
.game + li {
|
||||||
@@ -56,7 +58,7 @@ li:first-child,li:last-child {
|
|||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<% cache ["#{@weight.id}_bracket", @weight] do %>
|
<% cache ["#{@weight.id}_bracket", @weight] do %>
|
||||||
<table class='pagebreak'>
|
<table class='smallText'>
|
||||||
<h5><strong><%= @tournament.name %> - <%= @weight.max %> lbs Bracket</strong></h5>
|
<h5><strong><%= @tournament.name %> - <%= @weight.max %> lbs Bracket</strong></h5>
|
||||||
<tr>
|
<tr>
|
||||||
<td valign="top" style="padding: 10px;">
|
<td valign="top" style="padding: 10px;">
|
||||||
|
|||||||
Reference in New Issue
Block a user