From b7e6f015d0171712770d90895691ac2266a58958 Mon Sep 17 00:00:00 2001 From: jcwimer Date: Tue, 8 Dec 2015 14:43:51 +0000 Subject: [PATCH] Printable pages --- app/views/layouts/application.html.erb | 2 + app/views/tournaments/all_brackets.html.erb | 28 +++++++-- assignment.pdf | 69 +++++++++++++++++++++ 3 files changed, 93 insertions(+), 6 deletions(-) create mode 100644 assignment.pdf diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 86f2808..4d2624a 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -3,6 +3,8 @@ <% if params[:print] %> WrestlingDev + <%= render 'layouts/cdn' %> + <%= render 'layouts/shim' %> <%= yield %> diff --git a/app/views/tournaments/all_brackets.html.erb b/app/views/tournaments/all_brackets.html.erb index 8eb5618..1b303ea 100644 --- a/app/views/tournaments/all_brackets.html.erb +++ b/app/views/tournaments/all_brackets.html.erb @@ -1,6 +1,18 @@ @@ -9,7 +21,8 @@
<% @tournament.weights.sort_by{|w| w.max}.each do |w| %> -
+ + +
<% @weight = w %> <% @matches = @tournament.matches.select{|m| m.weight_id == @weight.id} %> <% @wrestlers = Wrestler.where(weight_id: @weight.id) %> @@ -17,8 +30,10 @@
<%= @weight.max %> lbs Bracket
<%= render 'pool' %> - -
+
+ + +
<% if w.pool_bracket_type == "twoPoolsToFinal" %> <%= render 'twoPoolFinalBracket' %> <% end %> @@ -31,6 +46,7 @@ <% if w.pool_bracket_type == "fourPoolsToSemi" %> <%= render 'fourPoolSemiBracket' %> <% end %> - +
<% end %>
diff --git a/assignment.pdf b/assignment.pdf new file mode 100644 index 0000000..b8ed4ea --- /dev/null +++ b/assignment.pdf @@ -0,0 +1,69 @@ +%PDF-1.3 +%ÿÿÿÿ +1 0 obj +<< /Creator +/Producer +>> +endobj +2 0 obj +<< /Type /Catalog +/Pages 3 0 R +>> +endobj +3 0 obj +<< /Type /Pages +/Count 1 +/Kids [5 0 R] +>> +endobj +4 0 obj +<< /Length 83 +>> +stream +q + +BT +36.0 747.384 Td +/F1.0 12 Tf +[<48656c6c6f2057> 30 <6f72> -15 <6c64>] TJ +ET + +Q + +endstream +endobj +5 0 obj +<< /Type /Page +/Parent 3 0 R +/MediaBox [0 0 612.0 792.0] +/Contents 4 0 R +/Resources << /ProcSet [/PDF /Text /ImageB /ImageC /ImageI] +/Font << /F1.0 6 0 R +>> +>> +>> +endobj +6 0 obj +<< /Type /Font +/Subtype /Type1 +/BaseFont /Helvetica +/Encoding /WinAnsiEncoding +>> +endobj +xref +0 7 +0000000000 65535 f +0000000015 00000 n +0000000109 00000 n +0000000158 00000 n +0000000215 00000 n +0000000348 00000 n +0000000526 00000 n +trailer +<< /Size 7 +/Root 2 0 R +/Info 1 0 R +>> +startxref +623 +%%EOF