1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-04 13:43:48 +00:00

Moving pages to tournament from static_pages

This commit is contained in:
2015-11-04 16:10:56 -05:00
parent 0ad274b421
commit f86a577c8b
15 changed files with 111 additions and 114 deletions

View File

@@ -13,7 +13,7 @@
}
</script>
<%= link_to "Back to #{@tournament.name} weights", "/static_pages/weights?tournament=#{@tournament.id}" %>
<%= link_to "Back to #{@tournament.name} weights", "/tournaments/#{@tournament.id}/weights" %>
<br>
<br>
<button type="submit" class="btn btn-primary" onclick="exportDataToRtf()">Export to file for printing</button>

View File

@@ -1,3 +0,0 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
<br><br>
Matches successfully generated.

View File

@@ -5,6 +5,6 @@
<br>
<p>If you would like to run a tournament, please click log in and then click sign up.</p>
<br>
<%= link_to "Browse Tournaments", '/static_pages/tournaments', class: "btn btn-large btn-primary" %>
<%= link_to "Browse Tournaments", '/tournaments', class: "btn btn-large btn-primary" %>
<p></p>
</div>

View File

@@ -1,5 +0,0 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" %>
<br>
<br>
<h1>No Matches</h1>
<p>This view will not render until matches have been generated by the tournament director.</p>

View File

@@ -1,22 +0,0 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}" , :class=>"btn btn-default"%>
<br>
<br>
<h3>Team Scores</h3>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Name</th>
<th>Score</th>
</tr>
</thead>
<tbody>
<% @schools.each do |school| %>
<tr>
<td><%= school.name %></td>
<td><%= school.score %></td>
</tr>
<% end %>
</tbody>
</table>

View File

@@ -1,68 +0,0 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default"%>
<script>
$(document).ready(function() {
$('#matchList').dataTable();
} );
</script>
<script>
setTimeout("location.reload(true);",30000);
</script>
<br>
<br>
<h5 style="color:red">This page reloads every 30s</h5>
<br>
<br>
<h3>Upcoming Matches</h3>
<br>
<br>
<table class="table table-striped table-bordered">
<thead>
<tr>
<th>Mat</th>
<th>On Mat</th>
<th>On Deck</th>
<th>In The Hole</th>
<th>Warm Up</th>
</tr>
</thead>
<tbody>
<% @mats.each.map do |m| %>
<tr>
<td><%= m.name %></td>
<td><%=m.unfinishedMatches.first.bout_number%><br><%= m.unfinishedMatches.first.w1_name %> vs. <%= m.unfinishedMatches.first.w2_name %></td>
<td><%=m.unfinishedMatches.second.bout_number%><br><%= m.unfinishedMatches.second.w1_name %> vs. <%= m.unfinishedMatches.second.w2_name %></td>
<td><%=m.unfinishedMatches.third.bout_number%><br><%= m.unfinishedMatches.third.w1_name %> vs. <%= m.unfinishedMatches.third.w2_name %></td>
<td><%=m.unfinishedMatches.fourth.bout_number%><br><%= m.unfinishedMatches.fourth.w1_name %> vs. <%= m.unfinishedMatches.fourth.w2_name %></td>
</tr>
<% end %>
</tbody>
</table>
<br>
<br>
<h3>Matches not assigned</h3>
<br>
<br>
<table class="display compact cell-border" id="matchList">
<thead>
<tr>
<th>Round</th>
<th>Bout Number</th>
<th>Weight Class</th>
<th>Matchup</th>
</tr>
</thead>
<tbody>
<% @matches.each.map do |m| %>
<tr>
<td>Round <%= m.round %></td>
<td><%= m.bout_number %></td>
<td><%= m.weight_max %> lbs</td>
<td><%= m.w1_name %> vs. <%= m.w2_name %></td>
</tr>
<% end %>
</tbody>
</table>
<br>

View File

@@ -1,8 +0,0 @@
<%= link_to "Back to #{@tournament.name}", "/tournaments/#{@tournament.id}", :class=>"btn btn-default" %>
<br>
<br>
<% @weights.each do |weight| %>
<%= link_to "#{weight.max}" , "/static_pages/brackets?weight=#{weight.id}" %>
<br>
<% end %>
<%= link_to "All Brackets", "/static_pages/all_brackets?print=true&tournament=#{@tournament.id}" %>