Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Chris Woodall
committed
Jun 15, 2016
1 parent
4423364
commit c53824f
Showing
13 changed files
with
335 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,175 @@ | ||
:css | ||
@page { | ||
size: 8.5in 11in; | ||
margin: .5in; | ||
} | ||
body { | ||
padding-top: 0; | ||
} | ||
table { | ||
width: 100%; | ||
font-size: 12px; | ||
} | ||
td, th { | ||
border: 1px solid black; | ||
padding: 2px 4px; | ||
line-height: 1; | ||
} | ||
th { | ||
text-align: center; | ||
} | ||
tr.title > th { | ||
background-color: #000000 !important; | ||
color: #FFFFFF !important; | ||
-webkit-print-color-adjust: exact; | ||
} | ||
.overview { | ||
height: 306px; | ||
padding-left: 3px; | ||
padding-right: 3px; | ||
} | ||
.overview th { | ||
text-align: left; | ||
} | ||
.goals, .penalties { | ||
float: left; | ||
} | ||
.goals { | ||
width: 40%; | ||
padding-right: 3px; | ||
} | ||
.penalties { | ||
width: 60%; | ||
} | ||
.header, | ||
.top, | ||
.middle { | ||
margin-bottom: 5px; | ||
} | ||
.home-team, .away-team { | ||
width: 25%; | ||
float: left; | ||
} | ||
.header .home, | ||
.header .away { | ||
width: 50%; | ||
float: left; | ||
} | ||
.header .home { | ||
text-align: right; | ||
} | ||
.game-info { | ||
width: 50%; | ||
float: left; | ||
} | ||
.scoring-by-period, | ||
.shots-by-period { | ||
float: left; | ||
width: 50%; | ||
padding-left: 3px; | ||
padding-right: 3px; | ||
} | ||
.home-saves, | ||
.away-saves, | ||
.home-minutes, | ||
.away-minutes { | ||
float: left; | ||
width: 25%; | ||
} | ||
.clear { | ||
clear: both; | ||
} | ||
.home-saves, | ||
.home-minutes { | ||
padding-right: 3px; | ||
} | ||
.away-saves, | ||
.away-minutes { | ||
padding-left: 3px; | ||
} | ||
td.name { | ||
position: relative | ||
} | ||
td.name:before { | ||
content: ' '; | ||
visibility: hidden; | ||
} | ||
td.name span { | ||
position: absolute; | ||
left: 4px; | ||
right: 4px; | ||
white-space: nowrap; | ||
overflow: hidden; | ||
text-overflow: clip; | ||
} | ||
|
||
.header | ||
.away | ||
%h3= @statsheet.game.away_team_name | ||
.home | ||
%h3= @statsheet.game.home_team_name | ||
.clear | ||
.top | ||
.away-team | ||
= render partial: 'admin/hockey_statsheets/print/roster_table', locals: { header: "HOME TEAM", skaters: @statsheet.skaters.away.order(:last_name) } | ||
.game-info | ||
.overview | ||
%table | ||
%tr.title | ||
%th(colspan="2" style="text-align: center;") GAME OVERVIEW | ||
%tr | ||
%th Date | ||
%td= @statsheet.game.starts_on.strftime('%^a %-m/%-e/%y %l:%M %p') | ||
%tr | ||
%th Time | ||
%td= @statsheet.game.starts_on.strftime('%l:%M %p') | ||
%tr | ||
%th League | ||
%td= @statsheet.game.program.name | ||
%tr | ||
%th Season | ||
%td= @statsheet.game.season.name | ||
%tr | ||
%th Division | ||
%td= @statsheet.game.division.name | ||
%tr | ||
%th Location | ||
%td= @statsheet.game.location.name | ||
%tr | ||
%th Surface | ||
%th= @statsheet.game.playing_surface.name if @statsheet.game.playing_surface | ||
%tr | ||
%th(colspan=2 style="height: 165px; vertical-align: top;") Notes | ||
|
||
.by-period | ||
.scoring-by-period | ||
= render partial: 'admin/hockey_statsheets/print/scoring_table' | ||
.shots-by-period | ||
= render partial: 'admin/hockey_statsheets/print/shots_table' | ||
.clear | ||
.home-team | ||
= render partial: 'admin/hockey_statsheets/print/roster_table', locals: { header: "AWAY TEAM", skaters: @statsheet.skaters.home.order(:last_name) } | ||
.clear | ||
.middle | ||
.goals | ||
= render partial: 'admin/hockey_statsheets/print/goals_table' | ||
.penalties | ||
= render partial: 'admin/hockey_statsheets/print/penalties_table' | ||
.clear | ||
.bottom | ||
.home-saves | ||
= render partial: 'admin/hockey_statsheets/print/goalie_table', locals: { header: 'HOME GOALIE SAVES' } | ||
.home-minutes | ||
= render partial: 'admin/hockey_statsheets/print/goalie_table', locals: { header: 'HOME GOALIE MINUTES' } | ||
.away-minutes | ||
= render partial: 'admin/hockey_statsheets/print/goalie_table', locals: { header: 'AWAY GOALIE MINUTES' } | ||
.away-saves | ||
= render partial: 'admin/hockey_statsheets/print/goalie_table', locals: { header: 'AWAY GOALIE SAVES' } | ||
:javascript | ||
$(function() { | ||
window.print(); | ||
}); | ||
|
||
|
||
|
||
|
18 changes: 18 additions & 0 deletions
18
app/views/admin/hockey_statsheets/print/_goalie_table.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
%table | ||
%thead | ||
%tr.title | ||
%th(colspan="5")= header | ||
%tr | ||
%th(width="20%") # | ||
%th(width="20%") 1 | ||
%th(width="20%") 2 | ||
%th(width="20%") 3 | ||
%th(width="20%") OT | ||
%tbody | ||
- 2.times.each do | ||
%tr | ||
%td | ||
%td | ||
%td | ||
%td | ||
%td |
21 changes: 21 additions & 0 deletions
21
app/views/admin/hockey_statsheets/print/_goals_table.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
%table | ||
%thead | ||
%tr.title | ||
%th(colspan="8") GOALS | ||
%tr | ||
%th PER | ||
%th TIME | ||
%th TEAM | ||
%th GOAL | ||
%th(colspan="2") ASSISTS | ||
%th PP/SH | ||
%tbody | ||
- (1..20).each do |row| | ||
%tr | ||
%td | ||
%td | ||
%td | ||
%td | ||
%td | ||
%td | ||
%td |
24 changes: 24 additions & 0 deletions
24
app/views/admin/hockey_statsheets/print/_penalties_table.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
%table | ||
%thead | ||
%tr.title | ||
%th(colspan="8") PENALTIES | ||
%tr | ||
%th PER | ||
%th TIME | ||
%th TEAM | ||
%th PLR | ||
%th MIN | ||
%th INFRACTION | ||
/ %th START | ||
/ %th END | ||
%tbody | ||
- (1..20).each do |row| | ||
%tr | ||
%td | ||
%td | ||
%td | ||
%td | ||
%td | ||
%td | ||
/ %td | ||
/ %td |
20 changes: 20 additions & 0 deletions
20
app/views/admin/hockey_statsheets/print/_roster_table.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
%table | ||
%thead | ||
%tr.title | ||
%th(colspan="3")= header | ||
%tr | ||
%th(width="15%") GP | ||
%th(width="15%") # | ||
%th(width="70%") NAME | ||
%tbody | ||
- (1..20).each do |row| | ||
%tr | ||
%td | ||
%td(style="text-align: center;") | ||
= "#{skaters[row].jersey_number}" if skaters[row] | ||
%td.name | ||
%span | ||
- if skaters[row] | ||
= "#{skaters[row].last_name}, #{skaters[row].first_name}" | ||
= "*" if skaters[row].player and skaters[row].player.substitute? | ||
!= " " unless skaters[row] |
18 changes: 18 additions & 0 deletions
18
app/views/admin/hockey_statsheets/print/_scoring_table.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
%table | ||
%thead | ||
%tr.title | ||
%th(colspan="5") SCORING BY PERIOD | ||
%tr | ||
%th TEAM | ||
%th 1 | ||
%th 2 | ||
%th 3 | ||
%th OT | ||
%tbody | ||
- ['HOME','AWAY'].each do |team| | ||
%tr | ||
%td= team | ||
%td | ||
%td | ||
%td | ||
%td |
18 changes: 18 additions & 0 deletions
18
app/views/admin/hockey_statsheets/print/_shots_table.html.haml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
%table | ||
%thead | ||
%tr.title | ||
%th(colspan="5") SHOTS BY PERIOD | ||
%tr | ||
%th TEAM | ||
%th 1 | ||
%th 2 | ||
%th 3 | ||
%th OT | ||
%tbody | ||
- ['HOME','AWAY'].each do |team| | ||
%tr | ||
%td= team | ||
%td | ||
%td | ||
%td | ||
%td |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
- title 'Print Statsheet' | ||
|
||
= render 'admin/hockey_statsheets/print' | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
!!! | ||
%html | ||
%head | ||
%title | ||
= content_for?(:title) ? yield(:title) : 'Untitled' | ||
= " - " + Tenant.current.name | ||
- theme = Tenant.current.theme | ||
- if theme and !theme.empty? | ||
= stylesheet_link_tag "themes/#{theme}", media: "all" | ||
= favicon_link_tag "themes/#{theme}/icon.ico" | ||
- else | ||
= stylesheet_link_tag "application", media: "all" | ||
= javascript_include_tag "application" | ||
= csrf_meta_tag | ||
%meta{ :content => "width=device-width, initial-scale=1.0", :name => "viewport"} | ||
= yield(:head) | ||
%body{ :style => "background-image: none;" } | ||
.container | ||
= yield | ||
= render 'layouts/google_analytics' if Tenant.current.analytics_id.present? | ||
= yield :javascript | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters