mirror of
https://github.com/jcwimer/wrestlingApp
synced 2026-04-29 02:12:59 +00:00
Printable pages
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
<% if params[:print] %>
|
||||
<head>
|
||||
<title>WrestlingDev</title>
|
||||
<%= render 'layouts/cdn' %>
|
||||
<%= render 'layouts/shim' %>
|
||||
</head>
|
||||
<body>
|
||||
<%= yield %>
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user