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

Put win type on bracket and made bracket text smaller

This commit is contained in:
2019-02-01 15:36:37 +00:00
parent 2b92bdaf66
commit d0cf5301e2
3 changed files with 11 additions and 8 deletions

View File

@@ -63,15 +63,16 @@ class Match < ActiveRecord::Base
end
if self.finished == 1
if self.win_type == "Default"
return "Def"
return "(Def)"
elsif self.win_type == "Injury Default"
return "Inj"
return "(Inj)"
elsif self.win_type == "DQ"
return "DQ"
return "(DQ)"
elsif self.win_type == "Forfeit"
return "For"
return "(For)"
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

View File

@@ -19,7 +19,7 @@
<option value="red">Red</option>
</select>
<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)">
<option value="red">Red</option>
<option value="green">Green</option>

View File

@@ -1,4 +1,5 @@
<style>
table.smallText tr td { font-size: 10px; }
/*
* Bracket Layout Specifics
*/
@@ -9,9 +10,10 @@ main {
.round {
display:flex;
flex-direction:column;
width: 200px;
width: 145px;
list-style:none;
padding:0;
font-size: 10px;
}
.game + li {
@@ -56,7 +58,7 @@ li:first-child,li:last-child {
}
</style>
<% cache ["#{@weight.id}_bracket", @weight] do %>
<table class='pagebreak'>
<table class='smallText'>
<h5><strong><%= @tournament.name %> - <%= @weight.max %> lbs Bracket</strong></h5>
<tr>
<td valign="top" style="padding: 10px;">