1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-17 05:15:36 +00:00

Allow decimals in the weight max form and remove references to lbs in views

This commit is contained in:
2023-02-02 13:36:52 +00:00
parent e047383fe4
commit 2eb38ce788
5 changed files with 9 additions and 9 deletions

View File

@@ -78,7 +78,7 @@ table.smallText tr td { font-size: 10px; }
} }
</style> </style>
<table class='smallText'> <table class='smallText'>
<h5><strong><%= @tournament.name %> - <%= @weight.max %> lbs Bracket</strong></h5> <h5><strong><%= @tournament.name %> - <%= @weight.max %> Bracket</strong></h5>
<tr> <tr>
<% if @tournament.tournament_type == "Pool to bracket" %> <% if @tournament.tournament_type == "Pool to bracket" %>
<td valign="top" style="padding: 10px;"> <td valign="top" style="padding: 10px;">

View File

@@ -76,7 +76,7 @@
<tr> <tr>
<td> <td>
<% if can? :read, @tournament %> <% if can? :read, @tournament %>
<%= link_to "#{weight.max} lbs", weight %> <%= link_to "#{weight.max}", weight %>
<% else %> <% else %>
<%= "#{weight.max}" %> <%= "#{weight.max}" %>
<% end %> <% end %>

View File

@@ -28,10 +28,10 @@
<% @mats.each.map do |m| %> <% @mats.each.map do |m| %>
<tr> <tr>
<td><%= m.name %></td> <td><%= m.name %></td>
<td><% if m.unfinished_matches.first %><strong><%=m.unfinished_matches.first.bout_number%></strong> - <%= m.unfinished_matches.first.weight_max %> lbs<br><%= m.unfinished_matches.first.w1_bracket_name %> vs. <%= m.unfinished_matches.first.w2_bracket_name %><% end %></td> <td><% if m.unfinished_matches.first %><strong><%=m.unfinished_matches.first.bout_number%></strong> - <%= m.unfinished_matches.first.weight_max %><br><%= m.unfinished_matches.first.w1_bracket_name %> vs. <%= m.unfinished_matches.first.w2_bracket_name %><% end %></td>
<td><% if m.unfinished_matches.second %><strong><%=m.unfinished_matches.second.bout_number%></strong> - <%= m.unfinished_matches.second.weight_max %> lbs<br><%= m.unfinished_matches.second.w1_bracket_name %> vs. <%= m.unfinished_matches.second.w2_bracket_name %><% end %></td> <td><% if m.unfinished_matches.second %><strong><%=m.unfinished_matches.second.bout_number%></strong> - <%= m.unfinished_matches.second.weight_max %><br><%= m.unfinished_matches.second.w1_bracket_name %> vs. <%= m.unfinished_matches.second.w2_bracket_name %><% end %></td>
<td><% if m.unfinished_matches.third %><strong><%=m.unfinished_matches.third.bout_number%></strong> - <%= m.unfinished_matches.third.weight_max %> lbs<br><%= m.unfinished_matches.third.w1_bracket_name %> vs. <%= m.unfinished_matches.third.w2_bracket_name %><% end %></td> <td><% if m.unfinished_matches.third %><strong><%=m.unfinished_matches.third.bout_number%></strong> - <%= m.unfinished_matches.third.weight_max %><br><%= m.unfinished_matches.third.w1_bracket_name %> vs. <%= m.unfinished_matches.third.w2_bracket_name %><% end %></td>
<td><% if m.unfinished_matches.fourth %><strong><%=m.unfinished_matches.fourth.bout_number%></strong> - <%= m.unfinished_matches.fourth.weight_max %> lbs<br><%= m.unfinished_matches.fourth.w1_bracket_name %> vs. <%= m.unfinished_matches.fourth.w2_bracket_name %><% end %></td> <td><% if m.unfinished_matches.fourth %><strong><%=m.unfinished_matches.fourth.bout_number%></strong> - <%= m.unfinished_matches.fourth.weight_max %><br><%= m.unfinished_matches.fourth.w1_bracket_name %> vs. <%= m.unfinished_matches.fourth.w2_bracket_name %><% end %></td>
</tr> </tr>
<% end %> <% end %>
</tbody> </tbody>
@@ -55,7 +55,7 @@
<tr> <tr>
<td>Round <%= m.round %></td> <td>Round <%= m.round %></td>
<td><%= m.bout_number %></td> <td><%= m.bout_number %></td>
<td><%= m.weight_max %> lbs</td> <td><%= m.weight_max %></td>
<td><%= m.w1_bracket_name %> vs. <%= m.w2_bracket_name %></td> <td><%= m.w1_bracket_name %> vs. <%= m.w2_bracket_name %></td>
</tr> </tr>
<% end %> <% end %>

View File

@@ -13,7 +13,7 @@
<div class="field"> <div class="field">
<%= f.label :max %><br> <%= f.label :max %><br>
<%= f.number_field :max %> <%= f.number_field :max, step: :any %>
</div> </div>
<% if @weight %> <% if @weight %>

View File

@@ -1 +1 @@
<%= @weight.max %> lbs Matches are being generated. This can take anywhere from 1-5 minutes to finish. It is recommended to delete all delegated school permissions to prevent lineup changes after the tournament has started. <%= @weight.max %> Matches are being generated. This can take anywhere from 1-5 minutes to finish. It is recommended to delete all delegated school permissions to prevent lineup changes after the tournament has started.