1
0
mirror of https://github.com/jcwimer/wrestlingApp synced 2026-04-29 02:12:59 +00:00

Printable pages

This commit is contained in:
2015-12-08 14:43:51 +00:00
parent e7b0ce9ff3
commit b7e6f015d0
3 changed files with 93 additions and 6 deletions

View File

@@ -3,6 +3,8 @@
<% if params[:print] %>
<head>
<title>WrestlingDev</title>
<%= render 'layouts/cdn' %>
<%= render 'layouts/shim' %>
</head>
<body>
<%= yield %>

View File

@@ -1,6 +1,18 @@
<style>
.pagebreak { page-break-after: always; width:100%;}
#html, #body, #wrapper { width:100%; }
.pagebreak {
page-break-after: always;
border: none;
margin: 0px;
padding: 0px;
width: 7in; /* width: 7in; */
height: 9.5in; /* or height: 9.5in; */
font-size: 10px;
position: relative;
left: 1in;
height: 1in;
}
</style>
@@ -9,7 +21,8 @@
<br>
<div id="exportable">
<% @tournament.weights.sort_by{|w| w.max}.each do |w| %>
<div class="pagebreak">
<table class='pagebreak'>
<td>
<% @weight = w %>
<% @matches = @tournament.matches.select{|m| m.weight_id == @weight.id} %>
<% @wrestlers = Wrestler.where(weight_id: @weight.id) %>
@@ -17,8 +30,10 @@
<h5><%= @weight.max %> lbs Bracket</h5>
<%= render 'pool' %>
</div>
<div class="pagebreak">
</td>
</table>
<table class='pagebreak'>
<td>
<% if w.pool_bracket_type == "twoPoolsToFinal" %>
<%= render 'twoPoolFinalBracket' %>
<% end %>
@@ -31,6 +46,7 @@
<% if w.pool_bracket_type == "fourPoolsToSemi" %>
<%= render 'fourPoolSemiBracket' %>
<% end %>
</div>
</td>
</table>
<% end %>
</div>