Cal Lutheran

Claremont-Mudd-Scripps

Wed, Sep. 20, 2017
5:00 PM PDT

Live statistics will be available at the start of the event in:


Overview

Cal Lutheran

Team Record Conf. Record Last Game
4-1 2-0 W, 3-1 at Chapman

Claremont-Mudd-Scripps

Team Record Conf. Record Last Game
1-4 0-2 L, 4-1 at Pomona-Pitzer

Team Comparison

Shots-per Game

15.8
10.8

SOG percentage

.557
.500

Saves per game

4.80
3.80

Save percentage

.750
.613

2.60GPG1.60
1.60GAA2.40
Cal Lutheran (based on 5 games)
Claremont-Mudd-Scripps (based on 5 games)

Key Contributors


Points

There was a problem with a Velocity script
Pagestatcrew-soxml-template
ErrorError invoking method 'get(java.lang.Integer)' in java.util.ArrayList at statcrew-soxml-template[line 402, column 90]
Page source:
1: #if ($stats.view == "pt")
2:     $website.include("options")
3: 
4:     ## This is for testability purposes.
5:     #set ($pregame = $stats.pregame)
6:     #set ($startTime = $document.getRootElement().valueOf("network/@startTime"))
7:     #if ($document.getRootElement().valueOf("network/@tba") == 'Y')
8:         #set ($tba = true)
9:     #else
10:         #set ($tba = false)
11:     #end
12:     #set ($location = $document.getRootElement().valueOf("network/@location"))
13:     #set ($localDate = $document.getRootElement().valueOf("network/@localDate"))
14:     #set ($localTime = $document.getRootElement().valueOf("network/@localTime"))
15: 	#set ($hasVideo = false)
16: 	#if ($document.getRootElement().valueOf("primetime/@videoProvider").length() > 0 && $document.getRootElement().valueOf("primetime/@videoProvider") != "none")
17: 		#set ($hasVideo = true)
18: 	#end
19:     #if ($location != '')
20:         #set ($neutral = true)
21:     #else
22:         #set ($neutral = false)
23:     #end
24:     #if ($request.getParameter("paused") == 'y')
25:         #set ($paused = true)
26:     #else
27:         #set ($paused = false)
28:     #end
29: 
30:     #if ($pregame)
31:         #set ($visitorTeamId = $document.getRootElement().valueOf("team[@vh='V']/@teamId"))
32:         #set ($homeTeamId = $document.getRootElement().valueOf("team[@vh='H']/@teamId"))
33: 
34:         #if ($!options.get("primetime_preview_hide").equalsIgnoreCase("hide"))
35:             #set ($shouldStatsShow = false)
36:         #else
37:             #set ($shouldStatsShow = $preview.shouldStatsShow($homeTeamId,$visitorTeamId))
38:         #end
39:     #end
40: 
41:     <head>
42:         <script type="text/javascript" src='$website.cdn("/info/jquery-2.1.1.js")'></script>
43:         <script type="text/javascript" src='$website.cdn("/info/notifications/jquery.noty.packaged.min.js")'></script>
44:         <script type="text/javascript" src='$website.cdn("/info/dataTables/js/jquery.dataTables.js")'></script>
45:         <script type="text/javascript" src='$website.cdn("/info/momentjs/moment.js")'></script>
46:         <script type="text/javascript" src='$website.cdn("/info/primetime3/js/full_screen_api.js")'></script>
47:         <script type="text/javascript" src='$website.cdn("/info/primetime3/js/flipclock.min.js")'></script>
48: 
49:         $website.addCss($website.cdn("/info/dataTables/css/jquery.dataTables.css"))
50:         $website.addCss($website.cdn("/info/primetime3/css/flipclock.css"))
51: 
52:         <script type="text/javascript" src="/info/primetime3/js/pt3-embed.js"></script>
53: 
54:         <script type="text/javascript">var jQuery_2_1 = $.noConflict(true);</script>
55:         <script type="text/javascript" src="/info/primetime3/js/add-ons.js"></script>
56:         <script type="text/javascript" src="/info/primetime3/js/pt3-util.js"></script>
57:         <script type="text/javascript" src="/info/primetime3/js/pt3-soc-template.js"></script>
58: 
59:         <script src="/info/primetime3/js/highcharts.js"></script>
60:         <script src="/info/primetime3/js/highcharts-more.js"></script>
61:         <script src="/info/primetime3/js/solid-gauge.js"></script>
62: 
63:         <script type="text/javascript" src="/info/primetime3/js/pt3-preview-charts.js"></script>
64: 
65:         $website.addCss("/info/primetime3/css/pt3-styles.css")
66:         $website.addCss("/info/primetime3/css/pt3-soccer-icons.css")
67:         $website.addCss("/info/primetime3/css/pt3-field-hockey-icons.css")
68: 
69:         $website.addCss("/info/primetime3/css/pt3-responsive.css")
70: 
71:         <script type="text/javascript" src="/info/primetime3/js/restive.js"></script>
72:         <script type="text/javascript" src="/info/primetime3/js/pt3-restive.js"></script>
73: 
74:         <script type="text/javascript">
75:             var conf = new Object();
76:             conf.locale = '${locale}';
77:             conf.videoProvider = '${videoProvider}';
78:             conf.videoId = '${videoId}';
79:             conf.eventId = '$document.valueOf("sogame/network/@eventId")';
80:             conf.eventIdHashCode = '$eventIdHashCode';
81:             conf.visitorTeamLogo = '$stats.visitorTeamLogo';
82:             conf.homeTeamLogo = '$stats.homeTeamLogo';
83:             conf.visitorTeamColor = '#121212';
84:             conf.homeTeamColor = '#6D6D6D';
85:             conf.startTime = '$startTime';
86:             conf.pregame = $pregame;
87:             conf.tba = $tba;
88:             conf.localDate = '$localDate';
89:             conf.localTime = '$localTime';
90:             conf.visitor = '${tool.esc.javascript($document.getRootElement().valueOf("team[@vh='V']/@name"))}';
91:             conf.home = '${tool.esc.javascript($document.getRootElement().valueOf("team[@vh='H']/@name"))}';
92:             conf.currentDate = new Date();
93:             conf.statusFinal = $stats.final;
94:             conf.neutral = $neutral;
95:             conf.paused = $paused;
96: 
97:             conf.visitorTeamLighterColor = $.fn.increase_brightness(conf.visitorTeamColor, 30);
98:             conf.homeTeamLighterColor = $.fn.increase_brightness(conf.homeTeamColor, 30);
99:         </script>
100:     </head>
101: 
102:     #if ($pregame && !$shouldStatsShow)
103:         <div id="primetime-wrapper" class="primetime-pre-game primetime-soccer primetime-wrapper clearfix">
104:             <div class="primetime-overflow clearfix">
105:                 <div id="primetime-header" class="grid-row">
106:                     <div class="grid-col grid-col-hdr">
107: 
108:                         <div class="pt-header clearfix">
109:                             <div class="pt-team pt-team-away visitor-team-color" style="background: $document.getRootElement().valueOf("team[@vh='V']/@color")">
110:                                 <img src="$stats.visitorTeamLogo" alt="" class="team-logo visitor-team-logo" />
111:                                 <h3 class="team-name visitor-team-name">$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
112:                             </div>
113: 
114:                             <div class="pt-team pt-team-home home-team-color" style="background: $document.getRootElement().valueOf("team[@vh='H']/@color")">
115:                                 <img src="$stats.homeTeamLogo" alt="" class="team-logo home-team-logo" />
116:                                 <h3 class="team-name home-team-name">$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
117:                             </div>
118: 
119:                             <div class="pt-match-scoreboard clearfix">
120:                                 <div class="pt-mtach-info pt-pregame">
121:                                     <center>
122:                                         <div>
123:                                             $localDate <br>
124:                                             #if ($tba)
125:                                                 TBA
126:                                             #else
127:                                                 $localTime
128:                                             #end
129:                                         </div>
130:                                     </center>
131:                                 </div>
132:                             </div>
133:                         </div>
134:                     </div>
135:                 </div>
136:                 <div class="grid-row-container clearfix">
137:                     <div class="grid-row">
138:                         <div class="content">
139:                             <div class="pt-last-play clearfix" style="display: none">
140:                                 <span class="pt-label clearfix" style="text-align: center !important; width: 100% ">
141:                                     This event doesn't have a set start time, but PrimeTime will be available once the event begins.
142:                                 </span>
143:                             </div>
144:                             <div class="text">
145:                                 <h3>
146:                                     Live statistics will be available at the start of the event in:
147:                                 </h3>
148:                                 <center>
149:                                     <div class="clock"></div><br/>
150:                                     #if ($tba)
151:                                         Days
152:                                     #end
153:                                 </center>
154:                             </div>
155:                         </div>
156:                     </div>
157:                     <div class="pt-game-info grid-row clearfix">
158:                         <div class="pt-tabs-panes clearfix">
159:                             <div id="stats-tabs" class="pt-tabs-pane clearfix">
160:                                 <div id="divGameInformation" class="grid-row">
161:                                     <div class="grid-col grid-col-gi grid-col1">
162:                                         <h3 class="grid-title">
163:                                             Game Information
164:                                         </h3>
165:                                         <div class="grid-content clearfix">
166:                                             <div class="pt-game-information clearfix">
167:                                                 <div class="pt-row clearfix">
168:                                                     <center>
169:                                                         <div class="game-location pt-col">
170:                                                         <span class="date">
171:                                                             $localDate<br />
172:                                                             #if ($tba)
173:                                                                 TBA
174:                                                             #else
175:                                                                 $localTime
176:                                                             #end
177:                                                         </span>
178:                                                             <h3>Date & Time</h3>
179:                                                         </div>
180:                                                         #if ($location != '')
181:                                                             <div class="game-venue pt-col">
182:                                                         <span class="venue">
183:                                                             $location<br />
184:                                                             (Neutral)
185:                                                         </span>
186:                                                                 <h3>Location</h3>
187:                                                             </div>
188:                                                         #end
189:                                                     </center>
190:                                                 </div>
191:                                             </div>
192:                                         </div>
193:                                     </div>
194:                                 </div>
195:                             </div>
196:                         </div>
197:                     </div>
198:                 </div>
199: 
200:                 <div id="primetime-footer" class="grid-row">
201:                     <div class="grid-col grid-col-ftr">
202:                         <a href="/"></a>
203:                     </div>
204:                 </div>
205:             </div>
206:             ## GENERAL INFORMATION
207:         </div>
208:     #elseif ($pregame && $shouldStatsShow)
209:         #set ($visitorTeamId = $document.getRootElement().valueOf("team[@vh='V']/@teamId"))
210:         #set ($homeTeamId = $document.getRootElement().valueOf("team[@vh='H']/@teamId"))
211: 
212:         #set ($teamStats = ["sha", "sogpt", "svpg", "svpt", "gfa", "gaa"])
213:         #set ($teamStatsLabels = {"sha": "Shots-per Game", "sogpt": "SOG percentage", "svpg": "Saves per game", "svpt": "Save percentage", "gfa":"GPG", "gaa": "GAA"})
214:         #set ($topStats = ["p", "g", "a", "gaa"])
215: 
216:         #set ($visitorStats = $preview.getTeam($visitorTeamId).setTeamStats($teamStats).setTopStats($topStats).calculate())
217:         #set ($homeStats = $preview.getTeam($homeTeamId).setTeamStats($teamStats).setTopStats($topStats).calculate())
218: 
219:         <div id="primetime-wrapper" class="primetime-pre-game primetime-soccer clearfix">
220:             <div class="primetime-overflow clearfix">
221:                 <div id="primetime-header" class="grid-row">
222:                 <div class="grid-col grid-col-hdr">
223:                     <div class="pt-header clearfix">
224:                         <div class="pt-team pt-team-away visitor-team-color" style="background: $document.getRootElement().valueOf("team[@vh='V']/@color")">
225:                             <img src="$stats.visitorTeamLogo" alt="" class="team-logo visitor-team-logo" />
226:                             <h3 class="team-name visitor-team-name">$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
227:                         </div>
228: 
229:                         <div class="pt-team pt-team-home home-team-color" style="background: $document.getRootElement().valueOf("team[@vh='H']/@color")">
230:                             <img src="$stats.homeTeamLogo" alt="" class="team-logo home-team-logo" />
231:                             <h3 class="team-name home-team-name">$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
232:                         </div>
233: 
234:                         <div class="pt-match-scoreboard clearfix">
235:                             <div class="pt-mtach-info pt-pregame">
236:                                 <center>
237:                                     <div>
238:                                         $localDate <br>
239:                                         #if ($tba)
240:                                             TBA
241:                                         #else
242:                                             $localTime
243:                                         #end
244:                                     </div>
245:                                 </center>
246:                             </div>
247:                         </div>
248:                     </div>
249:                 </div>
250:             </div>
251:                 <div class="grid-row-container clearfix">
252:                     <div class="grid-row preview">
253:                         <div class="content">
254:                             <div class="pt-last-play clearfix" style="display: none">
255:                                 <span class="pt-label clearfix" style="text-align: center !important; width: 100% ">
256:                                     This event doesn't have a set start time, but PrimeTime will be available once the event begins.
257:                                 </span>
258:                             </div>
259:                             <div class="text">
260:                                 <h3>
261:                                     Live statistics will be available at the start of the event in:
262:                                 </h3>
263:                                 <center>
264:                                     <div class="clock"></div><br/>
265:                                     #if ($tba)
266:                                         Days
267:                                     #end
268:                                 </center>
269:                             </div>
270:                         </div>
271:                     </div>
272: 
273:                     <!-- Team Overview -->
274:                     <div class="grid-row pt-overview">
275:                         <h2>Overview</h2>
276:                         <div class="grid-col grid-col-e grid-col2 background-black">
277:                             <h3>$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
278:                             <div class="container clearfix pt-live-action">
279:                                 <table>
280:                                     <thead>
281:                                     <tr>
282:                                         <th>Team Record</th>
283:                                         <th>Conf. Record</th>
284:                                         <th>Last Game</th>
285:                                     </tr>
286:                                     </thead>
287:                                     <tbody>
288:                                     <tr>
289:                                         <td>${visitorStats.overallRecord}</td>
290:                                         <td>${visitorStats.conferenceRecord}</td>
291:                                         <td style="text-align: center">
292:                                             ${visitorStats.lastGame.APResult}
293:                                             <span>
294:                                             #if ($visitorStats.lastGame.neutralSite.length() > 0 || $visitorStats.lastGame.home)
295:                                                 vs.
296:                                             #else
297:                                                 at
298:                                             #end
299:                                                 ${visitorStats.lastGame.opponent.name}
300:                                         </span>
301:                                         </td>
302:                                     </tr>
303:                                     </tbody>
304:                                 </table>
305:                             </div>
306:                             <br />
307:                         </div>
308:                         <div class="grid-col grid-col-e grid-col2 background-gray">
309:                             <h3>$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
310:                             <div class="pt-live-action">
311:                                 <table>
312:                                     <thead>
313:                                     <tr>
314:                                         <th>Team Record</th>
315:                                         <th>Conf. Record</th>
316:                                         <th>Last Game</th>
317:                                     </tr>
318:                                     </thead>
319:                                     <tbody>
320:                                     <tr>
321:                                         <td>${homeStats.overallRecord}</td>
322:                                         <td>${homeStats.conferenceRecord}</td>
323:                                         <td style="text-align: center">
324:                                             ${homeStats.lastGame.APResult}
325:                                             <span>
326:                                             #if ($homeStats.lastGame.neutralSite.length() > 0 || $homeStats.lastGame.home)
327:                                                 vs.
328:                                             #else
329:                                                 at
330:                                             #end
331:                                                 ${homeStats.lastGame.opponent.name}
332:                                         </span>
333:                                         </td>
334:                                     </tr>
335:                                     </tbody>
336:                                 </table>
337:                             </div>
338:                             <br />
339:                         </div>
340:                     </div>
341: 
342:                     <!-- Team Comaprison -->
343:                     <div class="grid-row">
344:                         <div class="grid-col team-compare">
345:                             <h2>Team Comparison</h2>
346: 
347:                             <div class="charts-line">
348:                                 <div class="charts-inner">
349:                                     #foreach ($i in [0..3])
350:                                         #set ($key = $teamStats[$i])
351:                                         <div class="chart-container">
352:                                             <h3>${teamStatsLabels[$key]}</h3>
353:                                             <div class="stats-chart ts-$key"></div>
354:                                             <div class="stats-values">
355:                                                 #set ($visValue = ${formatter.formatNumber($visitorStats.teamStats[$key], $formats.get($key))})
356:                                                 #set ($homeValue = ${formatter.formatNumber($homeStats.teamStats[$key], $formats.get($key))})
357:                                                 <div class="stats-value visitor">$visValue</div>
358:                                                 <div class="stats-value home">$homeValue</div>
359:                                             </div>
360:                                         </div>
361:                                     #end
362:                                 </div>
363:                             </div>
364: 
365:                             <br/>
366: 
367:                             <div class="game-leaders">
368:                                 <div class="top">
369:                                     <div class="charts">
370:                                         #foreach ($i in [4..5])
371:                                             #set ($key = $teamStats[$i])
372:                                             #set ($visValue = ${formatter.formatNumber($visitorStats.teamStats[$key], $formats.get($key))})
373:                                             #set ($homeValue = ${formatter.formatNumber($homeStats.teamStats[$key], $formats.get($key))})
374:                                                 <div class="chart">
375:                                                     <div class="stats-chart visitor $key"></div>
376:                                                     <div class="label"><span>$visValue</span><span class="title">${teamStatsLabels[$key]}</span><span>$homeValue</span></div>
377:                                                     <div class="stats-chart home $key"></div>
378:                                                 </div>
379:                                         #end
380:                                     </div>
381:                                 </div>
382:                             </div>
383:                             <div class="legend grid-col clearfix">
384:                                 <div class="stats-value visitor">$document.getRootElement().valueOf("team[@vh='V']/@name") (based on ${visitorStats.gamesPlayed} games)</div>
385:                                 <div class="stats-value home">$document.getRootElement().valueOf("team[@vh='H']/@name") (based on ${homeStats.gamesPlayed} games)</div>
386:                             </div>
387:                         </div>
388:                     </div>
389: 
390:                     <!-- Key Contributors -->
391:                     <div class="grid-row">
392:                         <div class="grid-col grid-col1 game-leaders grid-col">
393:                             <h2>Key Contributors</h2>
394:                             #macro (gameLeaders $category $label $visitorPlayers $homePlayers $quantityPlayers $displayFormat)
395:                                 #set ($quantityPlayers = $quantityPlayers - 1)
396:                                 <div class="game-leaders">
397:                                     <br/>
398:                                     <h3>$label</h3>
399:                                     <div class="grid-col top1">
400:                                         <div class="grid-col charts">
401:                                             #foreach ($i in [0..$quantityPlayers])
402:                                                 #set ($visitorTopPlayer = $visitorPlayers[$i])
403:                                                 #set ($homeTopPlayer = $homePlayers[$i])
404:                                                 <div class="grid-col chart">
405:                                                     <div class="stats-player visitor">
406:                                                         <div class="player-name">${visitorTopPlayer.firstName} ${visitorTopPlayer.lastName}</div>
407:                                                         <div class="stats-chart visitor ${category}-top${i}"></div>
408:                                                     </div>
409:                                                     <!-- Using the format '#' directly since the wyg has set 0.0 as format on the stats metadata object -->
410:                                                     <div class="label"><span>${formatter.formatNumber($visitorTopPlayer.stats[$category], $displayFormat)}</span><span class="title"></span><span>${formatter.formatNumber($homeTopPlayer.stats[$category], $displayFormat)}</span></div>
411:                                                     <div class="stats-player home">
412:                                                         <div class="player-name">${homeTopPlayer.firstName} ${homeTopPlayer.lastName}</div>
413:                                                         <div class="stats-chart home ${category}-top${i}"></div>
414:                                                     </div>
415:                                                 </div>
416:                                             #end
417:                                         </div>
418:                                     </div>
419:                                 </div>
420:                             #end
421: 
422:                             #gameLeaders('p' 'Points' $visitorStats.topStats['p'] $homeStats.topStats['p'] 2 $formats.get('p'))
423:                             #gameLeaders('g' 'Goals' $visitorStats.topStats['g'] $homeStats.topStats['g'] 2 $formats.get('g'))
424:                             #gameLeaders('a' 'Assists' $visitorStats.topStats['a'] $homeStats.topStats['a'] 2 $formats.get('a'))
425:                             #gameLeaders('gaa' 'Goals Against Average' $visitorStats.topStats['gaa'] $homeStats.topStats['gaa'] 1 $formats.get('gaa'))
426: 
427:                             <div class="legend grid-col clearfix">
428:                                 <div class="stats-value visitor">$document.getRootElement().valueOf("team[@vh='V']/@name") (based on ${visitorStats.gamesPlayed} games)</div>
429:                                 <div class="stats-value home">$document.getRootElement().valueOf("team[@vh='H']/@name") (based on ${homeStats.gamesPlayed} games)</div>
430:                             </div>
431:                         </div>
432:                     </div>
433: 
434:                     <!-- Game Information -->
435:                     <div class="pt-game-info grid-row clearfix">
436:                         <div class="pt-tabs-panes clearfix">
437:                             <div id="stats-tabs" class="pt-tabs-pane clearfix">
438:                                 <div id="divGameInformation" class="grid-row">
439:                                     <div class="grid-col grid-col-gi grid-col1">
440:                                         <h2 class="grid-title">
441:                                             Game Information
442:                                         </h2>
443:                                         <div class="grid-content clearfix">
444:                                             <div class="pt-game-information clearfix">
445:                                                 <div class="pt-row clearfix">
446:                                                     <center>
447:                                                         <div class="game-location pt-col">
448:                                                                 <span class="date">
449:                                                                     $localDate<br />
450:                                                                     #if ($tba)
451:                                                                         TBA
452:                                                                     #else
453:                                                                         $localTime
454:                                                                     #end
455:                                                                 </span>
456:                                                             <h3>Date & Time</h3>
457:                                                         </div>
458:                                                         #if ($location != '')
459:                                                             <div class="game-venue pt-col">
460:                                                                 <span class="venue">
461:                                                                     $location<br />
462:                                                                     (Neutral)
463:                                                                 </span>
464:                                                                 <h3>Location</h3>
465:                                                             </div>
466:                                                         #end
467:                                                     </center>
468:                                                 </div>
469:                                             </div>
470:                                         </div>
471:                                     </div>
472:                                 </div>
473:                             </div>
474:                         </div>
475:                     </div>
476:                 </div>
477: 
478:                 <div id="primetime-footer" class="grid-row">
479:                 <div class="grid-col grid-col-ftr">
480:                     <a href="/"></a>
481:                 </div>
482:             </div>
483:             </div>
484:             <script type="text/javascript">
485:             (function($) {
486:                 $(document).ready(function() {
487:                     Highcharts.setOptions({
488:                         colors: [conf.homeTeamColor, conf.visitorTeamColor]
489:                     });
490: 
491:                     #foreach ($i in [0..3])
492:                         #set ($key = $teamStats[$i])
493:                         #set ($visValue = ${visitorStats.teamStats[$key]})
494:                         #set ($homeValue = ${homeStats.teamStats[$key]})
495:                         $.fn.buildDonutChart('.stats-chart.ts-$key', $visValue, $homeValue);
496:                     #end
497: 
498:                     #foreach ($i in [4..5])
499:                         #set ($key = $teamStats[$i])
500:                         #set ($visValue = ${visitorStats.teamStats[$key]})
501:                         #set ($homeValue = ${homeStats.teamStats[$key]})
502:                         $.fn.buildVisitorBarChart('.top .visitor.$key', $visValue, 4.0, conf.visitorTeamLighterColor);
503:                         $.fn.buildHomeBarChart('.top .home.$key', $homeValue, 4.0, conf.homeTeamLighterColor);
504:                     #end
505: 
506:                     // Key Contributors
507:                     #macro (playerStatsScript $category $visitorPlayers $homePlayers $visitorLimit $homeLimit $playersLimit)
508:                         #set ($playersLimit = $playersLimit - 1)
509:                         #foreach ($i in [0..$playersLimit])
510:                             #set ($visitorTopPlayer = $visitorPlayers[$i])
511:                             #set ($homeTopPlayer = $homePlayers[$i])
512:                             $.fn.buildVisitorBarChart('.${category}-top${i}.visitor', ${visitorTopPlayer.stats[$category]}, $visitorLimit, conf.visitorTeamLighterColor);
513:                             $.fn.buildHomeBarChart('.${category}-top${i}.home', ${homeTopPlayer.stats[$category]}, $homeLimit, conf.homeTeamLighterColor);
514:                         #end
515:                     #end
516: 
517:                     #playerStatsScript('p' $visitorStats.topStats['p'] $homeStats.topStats['p'] 55 55 2)
518:                     #playerStatsScript('g' $visitorStats.topStats['g'] $homeStats.topStats['g'] 25 25 2)
519:                     #playerStatsScript('a' $visitorStats.topStats['a'] $homeStats.topStats['a'] 25 25 2)
520:                     #playerStatsScript('gaa' $visitorStats.topStats['gaa'] $homeStats.topStats['gaa'] 15 15 1)
521: 
522:                     $('.stats-value.visitor').css("background-color", conf.visitorTeamColor);
523:                     $('.stats-value.visitor.light').css("background-color", conf.visitorTeamLighterColor);
524:                     $('.stats-value.home').css("background-color", conf.homeTeamColor);
525:                     $('.stats-value.home.light').css("background-color", conf.homeTeamLighterColor);
526:                 });
527:             })(jQuery);
528:         </script>
529:         </div>
530:     #else
531:         <div id="primetime-wrapper" class="primetime-soccer primetime-wrapper clearfix">
532: 
533:             <div class="primetime-overflow clearfix">
534:                 ## HEADER
535:                 <div id="primetime-header" class="grid-row">
536:                     <div class="grid-col grid-col-hdr">
537: 
538:                         <div class="primetime-screen-controls clearfix"> 
539:                             <a href="#" class="full-screen-button pt-icon-resize-full"><span class="text">Switch</span></a> 
540:                             <a href="#" class="normal-screen-button pt-icon-resize-small"><span class="text">Switch</span></a> 
541:                             <a href="#" class="expand-button pt-icon-link-ext"><span class="text">Switch</span></a>
542:                         </div>
543: 
544:                         <div class="pt-header clearfix">
545: 
546:                             <div class="pt-team pt-team-away visitor-team-color"><img src="$stats.visitorTeamLogo" alt="" class="team-logo visitor-team-logo" /><span
547:                                     class="team-record visitor-team-record"></span>
548:                                 <h3 class="team-name visitor-team-name"></h3>
549:                             </div>
550: 
551:                             <div class="pt-team pt-team-home home-team-color">
552:                                 <span class="team-record home-team-record"></span>
553:                                 <img src="$stats.homeTeamLogo" alt="" class="team-logo home-team-logo" />
554:                                 <h3 class="team-name home-team-name"></h3>
555:                             </div>
556: 
557:                             <div class="pt-match-scoreboard clearfix">
558:                                 <p class="team-score visitor-team-score"></p>
559:                                 <p class="team-score home-team-score"></p>
560: 
561:                                 <div class="pt-mtach-info">
562:                                     <span class="time scoreboard-time"></span><br />
563:                                     <span class="period scoreboard-period" style="width: 100%"></span>
564:                                 </div>
565: 
566:                             </div>
567: 
568:                             <div id="pt-page-nav" class="pt-page-nav">
569: 								<a href="#" class="pt-menu">Menu</a>
570:                             	<ul class="clearfix">
571:                                     <li><a href="#live-action-title" data-stroke="1" data-id="#live-action-title">Live Action</a></li>
572:                             		<li><a href="#line-score-title" data-stroke="2" data-id="#line-score-title">Line Score</a></li>
573:                             		## <li><a href="#social-sharing-title" data-id="social-sharing-title">Social Sharing</a></li>
574:                             		<li><a href="#scoring-plays-title" data-stroke="3" data-id="#scoring-plays-title" data-tab-id="#stats-tabs">Scoring Plays</a></li>
575:                             		<li><a href="#team-comparison-title" data-stroke="4" data-id="#team-comparison-title" data-tab-id="#stats-tabs">Team Comparison</a></li>
576:                             		<li><a href="#individual-stats-title" data-stroke="5" data-id="#individual-stats-title" data-tab-id="#stats-tabs">Individual Stats</a></li>
577:                             		<li><a href="#game-info-title" data-stroke="6" data-id="#game-info-title" data-tab-id="#stats-tabs">Game Information</a></li>
578:                             		<li><a href="#play-by-play-title" data-stroke="7" data-id="#play-by-play-title" data-tab-id="#pbp-tabs">Play by Play</a></li>
579:                             	</ul>
580:                             </div>
581: 
582:                         </div>
583: 
584:                     </div>
585:                 </div>
586:                 ## PRIMETIME HEADER 
587: 
588: 				## GRID ROW CONTAINER
589:                 <div class="grid-row-container clearfix">
590: 
591:                 ## GRID ROW
592: 				#set ($gridRowClass = "grid-row no-video")
593: 				#if ($hasVideo)
594: 					#set ($gridRowClass = "grid-row")
595: 				#end
596: 				
597:                 <div id="firstPanelRow" class="$gridRowClass">
598: 
599: 				#set ($gridCounter = 0)
600: 				
601: 				#if ($hasVideo)	
602: 					#set ($gridCounter = $gridCounter + 1)
603:                     <div class="grid-col grid-col-v grid-col${gridCounter}">
604:                         <h3 id="video-field-title" class="grid-title">Broadcast<span class="close">x</span></h3>
605:                         <div class="grid-content clearfix">
606:                             <div class='embed-container'>
607: 
608:                             </div>
609:                         </div>
610:                         ## GRID CONTENT
611:                     </div>
612:                     ## VIDEO COL
613: 				#end
614: 
615: 					#set ($gridCounter = $gridCounter + 1)
616:                     <div class="grid-col grid-col-cd grid-col${gridCounter}">
617:                         <h3 id="live-action-title" class="grid-title">
618:                             Live Action<span class="close">x</span>
619:                         </h3>
620:                         <div class="grid-content clearfix">
621:                             <div class="clearfix">
622:                                 <div class="container clearfix pt-live-action">
623:                                     <table>
624:                                         <thead>
625:                                             <tr>
626:                                                 <th>Time</th>
627:                                                 <th>Action</th>
628:                                                 <th>Plays</th>
629:                                             </tr>
630:                                         </thead>
631:                                         <tbody>
632:                                         </tbody>
633:                                     </table>
634:                                 </div>
635:                             </div>
636:                         </div>
637:                     </div>
638:                 </div>
639: 
640: ## COMMENT THE TIMELINE AND TIMEPLAY CODE
641: #*
642:                 <div class="grid-row">
643:                     <div class="grid-col pt-timeline grid-col-tl grid-col3">
644:                         <h3 id="timeline-title" class="grid-title">
645:                             Timeline<span class="close">x</span>
646:                         </h3>
647:                         <div class="grid-content clearfix ">
648:                             <div class="pt-timeline-logos">
649:                                 <img class="team-logo visitor-team-logo" /><br />
650:                                 <img class="team-logo home-team-logo" />
651:                             </div>
652:                             <div class="pt-timeline-times">
653:                             </div>
654:                         </div>
655:                     </div>
656:                 </div>
657: 
658:                 <div class="grid-row">
659:                     <div class="grid-col pt-timeline-plays grid-col-tp grid-col4">
660: 						<h3 id="timeline-plays-title" class="grid-title">
661:                     		Timeline Plays<span class="close">x</span>
662:                     	</h3>
663:                         <div class="grid-content clearfix">
664:                         </div>
665:                     </div>
666:                 </div>
667: *#
668:                 <div class="grid-row">
669: 					#set ($gridCounter = $gridCounter + 1)
670:                     <div class="grid-col grid-col-bs grid-col${gridCounter}">
671:                         <h3 id="line-score-title" class="grid-title">
672:                             Line Score<span class="close">x</span>
673:                         </h3>
674:                         <div class="grid-content clearfix">
675:                             <div class="pt-line-score clearfix">
676:                                 <table id="scoreByPeriod">
677:                                     <thead>
678:                                         <tr>
679:                                             <th></th>
680:                                         </tr>
681:                                     </thead>
682:                                     <tbody>
683:                                         <tr class="visitor">
684:                                             <td><img src="" alt=""
685:                                                 class="team-logo visitor-team-logo" />
686:                                                 <span class="team-name visitor-team-name"></span></td>
687:                                         </tr>
688:                                         <tr class="home">
689:                                             <td><img src="" alt=""
690:                                                 class="team-logo home-team-logo" />
691:                                                 <span class="team-name home-team-name"></span></td>
692:                                         </tr>
693:                                     </tbody>
694:                                 </table>
695: 
696:                             </div>
697:                         </div>
698:                         ## GRID CONTENT
699:                     </div>
700:                     ## LINE SCORE
701: 					
702: 					## SOCIAL
703: 					#*
704: 					#set ($gridCounter = $gridCounter + 1)
705:                     <div class="grid-col grid-col-ls grid-col${gridCounter}">
706:                         <h3 id="social-sharing-title" class="grid-title">
707:                             Social Sharing<span class="close">x</span>
708:                         </h3>
709:                         <div class="grid-content clearfix">
710:                             <div class="pt-last-score clearfix">
711: 
712:                             </div>
713:                         </div>
714:                         ## GRID CONTENT
715:                     </div>
716: 					*#
717:                     ## SOCIAL
718:                 </div>
719:                 ## GRID ROW ## TABS
720:                 <div class="pt-game-info clearfix">
721: 
722:                     <ul class="pt-tabs clearfix">
723:                         <li class="current"><a href="#stats-tabs">Statistics</a></li>
724:                         <li><a href="#pbp-tabs">Play By Play</a></li>
725:                     </ul>
726: 
727:                     <div class="pt-tabs-panes clearfix">
728:                         <div id="stats-tabs" class="pt-tabs-pane clearfix">
729: 
730:                             ## GRID ROW
731:                             <div class="grid-row">
732: 								#set ($gridCounter = $gridCounter + 1)
733:                                 <div class="grid-col grid-col-sp grid-col${gridCounter}">
734:                                     <h3 id="scoring-plays-title" class="grid-title">
735:                                         Scoring Plays<span class="close">x</span>
736:                                     </h3>
737:                                     <div class="grid-content clearfix">
738:                                         <div id="scoringPlayList" class="pt-scoring-plays clearfix">
739:                                         </div>
740:                                     </div>
741:                                     ## GRID CONTENT
742: 
743:                                 </div>
744:                                 ## SCRING PLAY
745:                             </div>
746:                             ## GRID ROW ##GRID ROW
747:                             <div class="grid-row">
748: 								#set ($gridCounter = $gridCounter + 1)
749:                                 <div class="grid-col grid-col-tc grid-col${gridCounter}">
750:                                     <h3 id="team-comparison-title" class="grid-title">
751:                                         Team Comparison<span class="close">x</span>
752:                                     </h3>
753:                                     <div class="grid-content clearfix">
754:                                         <div class="pt-team-compare clearfix">
755:                                             <table id="teamCompare">
756:                                                 <thead>
757:                                                     <tr>
758:                                                         <th><img src="" alt="" class="team-logo visitor-team-logo" /><br />
759:                                                             <span class="team-name visitor-team-name"></span></th>
760:                                                         <th> <span></span></th>
761:                                                         <th><img src="" alt="" class="team-logo home-team-logo" /><br />
762:                                                             <span class="team-name home-team-name"></span></th>
763:                                                     </tr>
764:                                                 </thead>
765: 
766:                                                 <tbody>
767:                                                     <tr class="stats-shots">
768:                                                         <td></td>
769:                                                         <td class="stats-cat">Shots</td>
770:                                                         <td></td>
771:                                                     </tr>
772: 
773:                                                     <tr class="stats-sog">
774:                                                         <td></td>
775:                                                         <td class="stats-cat">SOG</td>
776:                                                         <td></td>
777:                                                     </tr>
778: 
779:                                                     <tr class="stats-saves">
780:                                                         <td></td>
781:                                                         <td class="stats-cat">Saves</td>
782:                                                         <td></td>
783:                                                     </tr>
784: 
785:                                                     <tr class="stats-corners">
786:                                                         <td></td>
787:                                                         <td class="stats-cat">Corners</td>
788:                                                         <td></td>
789:                                                     </tr>
790: 
791:                                                     <tr class="stats-offsides">
792:                                                         <td></td>
793:                                                         <td class="stats-cat">Offsides</td>
794:                                                         <td></td>
795:                                                     </tr>
796: 
797:                                                     <tr class="stats-fouls">
798:                                                         <td></td>
799:                                                         <td class="stats-cat">Fouls</td>
800:                                                         <td></td>
801:                                                     </tr>
802: 
803:                                                     <tr class="stats-yc">
804:                                                         <td></td>
805:                                                         <td class="stats-cat">YC</td>
806:                                                         <td></td>
807:                                                     </tr>
808: 
809:                                                     <tr class="stats-rc">
810:                                                         <td></td>
811:                                                         <td class="stats-cat">RC</td>
812:                                                         <td></td>
813:                                                     </tr>
814:                                                 </tbody>
815: 
816:                                             </table>
817:                                         </div>
818:                                     </div>
819:                                     ## GRID CONTENT
820:                                 </div>
821:                                 ## TEAM COMPARE
822:                             </div>
823:                             ## GRID ROW ## GRID ROW
824:                             <div class="grid-row">
825: 								#set ($gridCounter = $gridCounter + 1)
826:                                 <div class="grid-col grid-col-is grid-col${gridCounter}">
827:                                     <h3 id="individual-stats-title" class="grid-title">
828:                                         Individual Stats<span class="close">x</span>
829:                                     </h3>
830:                                     <div class="grid-content clearfix">
831:                                         <div class="pt-team-stats clearfix">
832: 
833:                                             <div id="visitorTeamIndividualStats"
834:                                                 class="pt-team-col pt-stats-team active clearfix">
835: 
836:                                                 <div class="pt-team clearfix">
837:                                                     <img src="" alt=""
838:                                                         class="team-logo visitor-team-logo active" />
839:                                                     <h3 class="team-name visitor-team-name"></h3>
840:                                                 </div>
841: 
842:                                                 <div class="pt-stats-tabs clearfix">
843:                                                     <div class="pt-panes clearfix">
844:                                                         <div id="vOffenseTab" class="pt-pane pt-pane1 clearfix">
845: 
846:                                                             <div class="pt-row">
847:                                                                 <table class="goalieStats display"> <!-- goalies -->
848:                                                                     <thead>
849:                                                                         <tr>
850:                                                                             <th>#</th>
851:                                                                             <th>Goalkeepers</th>
852:                                                                             <th>SOG</th>
853:                                                                             <th>GA</th>
854:                                                                             <th>SV</th>
855:                                                                             <th>MIN</th>
856:                                                                         </tr>
857:                                                                     </thead>
858:                                                                     <tbody>
859: 
860:                                                                     </tbody>
861:                                                                 </table>
862:                                                             </div>
863: 
864:                                                             <div class="pt-row">
865:                                                                 <table class="startersStats display"> <!-- starters -->
866:                                                                     <thead>
867:                                                                         <tr>
868:                                                                             <th>#</th>
869:                                                                             <th>Starters</th>
870:                                                                             <th>Pos</th>
871:                                                                             <th>Sh</th>
872:                                                                             <th>Sog</th>
873:                                                                             <th>G</th>
874:                                                                             <th>A</th>
875:                                                                             <th class="dsCell">DS</th>
876:                                                                         </tr>
877:                                                                     </thead>
878:                                                                     <tbody>
879: 
880:                                                                     </tbody>
881:                                                                 </table>
882:                                                             </div>
883:                                                             <div class="pt-row">
884:                                                                 <table class="substitutesStats display"> <!-- substitutes -->
885:                                                                     <thead>
886:                                                                         <tr>
887:                                                                             <th>#</th>
888:                                                                             <th>Substitutes</th>
889:                                                                             <th>Pos</th>
890:                                                                             <th>Sh</th>
891:                                                                             <th>Sog</th>
892:                                                                             <th>G</th>
893:                                                                             <th>A</th>
894:                                                                             <th class="dsCell">DS</th>
895:                                                                         </tr>
896:                                                                     </thead>
897:                                                                     <tbody>
898: 
899:                                                                     </tbody>
900:                                                                 </table>
901:                                                             </div>
902:                                                         </div>
903:                                                     </div>
904:                                                 </div>
905:                                             </div>
906: 
907:                                             <div id="homeTeamIndividualStats" class="pt-team-col pt-stats-team clearfix">
908: 
909:                                                 <div class="pt-team clearfix">
910:                                                     <img src="" alt=""
911:                                                         class="team-logo home-team-logo active" />
912:                                                     <h3 class="team-name home-team-name"></h3>
913:                                                 </div>
914: 
915:                                                 <div class="pt-stats-tabs clearfix">
916: 
917:                                                     <div class="pt-panes clearfix">
918:                                                         <div class="pt-pane clearfix">
919: 
920:                                                             <div class="pt-row">
921:                                                                 <table class="goalieStats display"> <!-- goalies -->
922:                                                                     <thead>
923:                                                                         <tr>
924:                                                                             <th>#</th>
925:                                                                             <th>Goalkeepers</th>
926:                                                                             <th>SOG</th>
927:                                                                             <th>GA</th>
928:                                                                             <th>SV</th>
929:                                                                             <th>MIN</th>
930:                                                                         </tr>
931:                                                                     </thead>
932:                                                                     <tbody>
933: 
934:                                                                     </tbody>
935:                                                                 </table>
936:                                                             </div>
937: 
938:                                                             <div class="pt-row">
939:                                                                 <table class="startersStats display"> <!-- starters -->
940:                                                                     <thead>
941:                                                                         <tr>
942:                                                                             <th>#</th>
943:                                                                             <th>Starters</th>
944:                                                                             <th>Pos</th>
945:                                                                             <th>Sh</th>
946:                                                                             <th>Sog</th>
947:                                                                             <th>G</th>
948:                                                                             <th>A</th>
949:                                                                             <th class="dsCell">DS</th>
950:                                                                         </tr>
951:                                                                     </thead>
952:                                                                     <tbody>
953: 
954:                                                                     </tbody>
955:                                                                 </table>
956:                                                             </div>
957:                                                             <div class="pt-row">
958:                                                                 <table class="substitutesStats display"> <!-- substitutes -->
959:                                                                     <thead>
960:                                                                         <tr>
961:                                                                             <th>#</th>
962:                                                                             <th>Substitutes</th>
963:                                                                             <th>Pos</th>
964:                                                                             <th>Sh</th>
965:                                                                             <th>Sog</th>
966:                                                                             <th>G</th>
967:                                                                             <th>A</th>
968:                                                                             <th class="dsCell">DS</th>
969:                                                                         </tr>
970:                                                                     </thead>
971:                                                                     <tbody>
972:                                                                     </tbody>
973:                                                                 </table>
974:                                                             </div>
975: 
976:                                                         </div>
977:                                                     </div>
978:                                                 </div>
979:                                             </div>
980: 
981:                                         </div>
982:                                     </div>
983:                                     ## GRID CONTENT
984:                                 </div>
985:                                 ## INDIVISUAL STATS
986:                             </div>
987:                             ## GRID ROW ## GRID ROW
988:                             <div class="grid-row">
989: 								#set ($gridCounter = $gridCounter + 1)
990:                                 <div class="grid-col grid-col-gi grid-col${gridCounter}">
991:                                     <h3 id="game-info-title" class="grid-title">
992:                                         Game Information<span class="close">x</span>
993:                                     </h3>
994:                                     <div class="grid-content clearfix">
995:                                         <div class="pt-game-information clearfix">
996: 
997:                                             <div class="pt-row clearfix">
998:                                                 <center>
999:                                                 <div class="date-time pt-col">
1000:                                                     <span id="gameInformationDate" class="date"></span>
1001:                                                     <span id="gameInformationTime" class="time"></span>
1002:                                                     <h3>Date & Time</h3>
1003:                                                 </div>
1004: 
1005:                                                 <div class="game-location pt-col">
1006:                                                     <span id="gameInformationLocation" class="location"></span>
1007:                                                     <h3>Location</h3>
1008:                                                 </div>
1009: 
1010:                                                 <div class="game-venue pt-col">
1011:                                                     <span id="gameInformationVenue" class="venue"></span>
1012:                                                     <h3>Venue</h3>
1013:                                                 </div>
1014: 
1015:                                                 <div class="weather pt-col">
1016: 
1017:                                                     <div class="weather-condition">
1018:                                                         <span id="gameInformationTemperature"
1019:                                                             class="temp"></span>
1020:                                                         <span id="gameInformationCondition" class="condition"></span>
1021:                                                     </div>
1022:                                                     <h3>Weather</h3>
1023:                                                 </div>
1024:                                                 </center>
1025:                                             </div>
1026: 
1027:                                         </div>
1028:                                     </div>
1029:                                     ## GRID CONTENT
1030:                                 </div>
1031:                                 ## GENERAL INFORMATION
1032:                             </div>
1033:                             ## GRID ROW
1034: 
1035:                         </div>
1036: 
1037:                         ## PLAY BY PLAY TABS
1038:                         <div id="pbp-tabs" class="pt-tabs-pane clearfix">
1039: 
1040:                             ## GRID ROW
1041:                             <div class="grid-row">
1042: 								#set ($gridCounter = $gridCounter + 1)
1043:                                 <div class="grid-col grid-col-ds grid-col${gridCounter}">
1044: 								<h3 id="play-by-play-title" class="grid-title">
1045: 									Play by Play<span class="close">x</span>
1046: 								</h3>                                	
1047:                                     <div class="grid-content clearfix">
1048:                                         <div id="playByPlay" class="clearfix">
1049:                                             <select id="filterPeriod" class="dropdownFilter">
1050:                                                 <option value="" selected>ALL PERIODS</option>
1051:                                             </select>
1052:                                             <select id="filterTeam" class="dropdownFilter">
1053:                                                 <option value="" selected>BOTH TEAMS</option>
1054:                                                 <option value="" class="team-name visitor-team-name"></option>
1055:                                                 <option value="" class="team-name home-team-name"></option>
1056:                                             </select>
1057:                                             <select id="filterPlayType" class="dropdownFilter">
1058:                                                 <option value="" selected>ALL PLAYS</option>
1059:                                                 <option value="GOAL">Goal</option>
1060:                                                 <option value="SHOT">Shot</option>
1061:                                                 <option id="headerOption" value="HDR">Header</option>
1062:                                                 <option id="cornerOption" value="CORNER">Corner</option>
1063:                                                 <option value="FOUL">Foul</option>
1064:                                                 <option id="offsideOption" value="OFFSIDE">Offside</option>
1065:                                                 <option value="YC">Yellow Card</option>
1066:                                                 <option value="RC">Red Card</option>
1067:                                                 <option id="greenCardOption" value="GC">Green Card</option>
1068:                                                 <option value="SUB">Substitution</option>
1069:                                             </select>
1070:                                         </div>
1071:                                         <div class="pt-play-by-play clearfix">
1072:                                             <table>
1073:                                                 <thead>
1074:                                                     <tr>
1075:                                                         <th><span class="team-name visitor-team-name"></span><span>&nbsp;PLAYS</span></th>
1076:                                                         <th>TIME</th>
1077:                                                         <th>ACTION</th>
1078:                                                         <th><span class="team-name home-team-name"></span><span>&nbsp;PLAYS</span></th>
1079:                                                     </tr>
1080:                                                 </thead>
1081:                                                 <tbody>
1082:                                                 </tbody>
1083:                                             </table>
1084:                                         </div>
1085:                                     </div>
1086:                                     ## GRID CONTENT
1087:                                 </div>
1088:                                 ## DRIVE SUMMARY
1089:                             </div>
1090:                             ## GRID ROW
1091: 
1092:                         </div>
1093:                         ## PLAY BY PLAY TABS
1094:                     </div>
1095:                     ## PT TABS PANES
1096:                 </div>
1097:                 ## PRIME TIME GAME INFO 
1098: 
1099: 				</div> 
1100: 				## GRID ROW CONTAINER
1101: 
1102:                 ## FOOTER
1103:                 <div id="primetime-footer" class="grid-row">
1104:                     <div class="grid-col grid-col-ftr">
1105:                         <a href="/"></a>
1106:                     </div>
1107:                 </div>
1108: 
1109:             </div>
1110:             ## PRIMTE TIME OVERFLOW
1111:         </div>
1112:         ## PRIME TIME WRAPPER
1113:     #end
1114:     
1115:     #set ($showWiki = true)
1116:     #set ($showWiki = $showWikiVar)
1117:     #if ($showWiki == true)
1118:         $wiki.su 
1119:     #end
1120:     ## END OF PRIMETIME	    
1121: 
1122: #else
1123: ## SOCCER BOX SCORE
1124: 
1125: ## DEFAULT VALUES
1126: #set ($showPlayerMin = false)
1127: 
1128: ## PICK UP OPTIONS
1129: #if ($website && $stats.view != "pdf")
1130:     $website.include("options")
1131: #end
1132: #set ($options = $request.getAttribute("options"))
1133: 
1134: ## SET VARIABLES FROM OPTIONS
1135: #set ($showPlayerMin = $options.get("boxscore_so_player_min"))
1136: #if ($showPlayerMin == "show")
1137: 	#set ($showPlayerMin = true)
1138: #end
1139: 
1140: #set ($hasScoringSummary = false)
1141: #if ($document.selectNodes("sogame/scores/score").size() > 0)
1142: 	#set ($hasScoringSummary = true)
1143: #end
1144: 
1145: #set ($showWiki = true)
1146: #set ($showWiki = $showWikiVar)
1147: 
1148: #if ($showWiki == true)
1149: 	$!wiki.su 
1150: #end
1151: 
1152: #if ($document.valueOf("sogame/@source") == 'DakStats Soccer')
1153: 	#set ($isDakStats = true)
1154: #else
1155: 	#set ($isDakStats = false)
1156: #end
1157: 
1158: #set ($showGoalDesc = $document.valueOf("sogame/venue/show/@goaldesc") == "1")
1159: #set ($showFieldHockey = $document.valueOf("sogame/venue/show/@fhk") == "1")
1160: #set ($shootoutScores = {"V" : 0, "H" : 0})
1161: #set ($shootouts = $document.selectNodes("sogame/shootouts/shootout"))
1162: #set ($penalties = $document.selectNodes("sogame/penalties/pen"))
1163: 
1164: #set ($linkPlayers = $stats.linkPlayers)
1165: #set ($linkPlayersBase = $stats.linkPlayersBase)
1166: #set ($linkTeams = $stats.linkTeams)
1167: #set ($linkTeamsBase = $stats.linkTeamsBase)
1168: 
1169: #set ($home = $document.valueOf("sogame/team[@vh='H']/@name"))
1170: #set ($visitor = $document.valueOf("sogame/team[@vh='V']/@name"))
1171: #set ($homeNode = $document.selectSingleNode("sogame/team[@vh='H']"))
1172: #set ($visitorNode = $document.selectSingleNode("sogame/team[@vh='V']"))
1173: 
1174: ## RULES
1175: #set ($periodRule = $document.valueOf("sogame/venue/rules/@periods"))
1176: #set ($periodLength = $document.valueOf("sogame/venue/rules/@minutes"))
1177: #set ($otPeriodLength = $document.valueOf("sogame/venue/rules/@minutesot"))
1178: 
1179: ## STATUS
1180: #set ($status = $document.valueOf("sogame/status/@period"))
1181: #set ($clock = $document.valueOf("sogame/status/@clock"))
1182: #set ($compClock = $document.valueOf("sogame/status/@complementClock"))
1183: 
1184: ## FOULS
1185: #set ($showFouls = false)
1186: #if($showFieldHockey)
1187: 	#set ($homeFouls =  $tool.math.toInteger($document.valueOf("sogame/team[@vh='H']/totals/penalty/@fouls")))
1188: 	#set ($visitorFouls =  $tool.math.toInteger($document.valueOf("sogame/team[@vh='V']/totals/penalty/@fouls")))
1189: 
1190: 	#if($homeFouls > 0 || $visitorFouls > 0)
1191: 		#set ($showFouls = true)
1192: 	#end
1193: #else 
1194: 	#set ($showFouls = true) ## ALWAYS SHOW FOR SOCCER
1195: #end
1196: 
1197: #if ($clock.length() > 0 && $clock != "90:00")
1198:   #if ($periodRule.length() > 0 && $periodLength.length() > 0 && $otPeriodLength.length() > 0)
1199:     #set ($normalTime = $tool.math.mul($periodRule, $periodLength))
1200: 	#set ($extraTime = $tool.math.mul($otPeriodLength, 2))
1201: 	#set ($totalTime = "$tool.math.mul($normalTime, $extraTime):00")
1202: 	$totalTime
1203:   #end
1204: #end
1205: 
1206: #set ($periodRange = [1..$document.selectNodes("sogame/team[1]/linescore/lineprd").size()])
1207: #set ($isNeutralGame = $documnt.valueOf("sogame/venue/@neutralgame"))
1208: #if ($isNeutralGame.length() > 0 && $isNeutralGame.equals("Y"))
1209:   #set ($isNeutralGame = true)
1210: #else
1211:   #set ($isNeutralGame = false)
1212: #end
1213: 
1214: #set ($hasPeriods = $document.selectNodes("sogame/plays/period").size() > 0)
1215: 
1216: #set ($homeTeam = $homeNode.valueOf("@name"))
1217: #set ($homeScore = $tool.math.toInteger($homeNode.valueOf("linescore/@score")))
1218: #set ($homename = $document.valueOf("sogame/venue/@homename"))
1219: #set ($visitorTeam = $visitorNode.valueOf("@name"))
1220: #set ($visScore = $tool.math.toInteger($visitorNode.valueOf("linescore/@score")))
1221: #set ($visname = $document.valueOf("sogame/venue/@visname"))
1222: #set ($location = $document.valueOf("sogame/venue/@location"))
1223: #set ($stadium = $document.valueOf("sogame/venue/@stadium"))
1224: #set ($dateVal = $document.valueOf("sogame/venue/@date"))
1225: #set ($date = $tool.date.toDate("MM/dd/yyyy", $dateVal))
1226: #set ($time = $document.valueOf("sogame/venue/@time"))
1227: 
1228: #set ($duration = $document.valueOf("sogame/venue/@duration"))
1229: #set ($schedNote = $document.valueOf("sogame/venue/@schednote"))
1230: #set ($attendance = $document.valueOf("sogame/venue/@attend"))
1231: #set ($homeTotals = $homeNode.selectSingleNode("totals"))
1232: #set ($visitorTotals = $visitorNode.selectSingleNode("totals"))
1233: 
1234: #if ($stats.pageUrl.length() > 0 && !$stats.pageUrl.contains("?"))
1235:     #set ($paramSep = "?")
1236: #else
1237:     #set ($paramSep = "&")
1238: #end
1239: 
1240: #set ($showWiki = true)
1241: #set ($showWiki = $showWikiVar)
1242: 
1243: ## MACROS
1244: #macro (printPdfHeader $title)
1245: <div class="stats-fullbox clearfix">
1246:     <table>
1247:         <tr>
1248:             <td class="align-center"><h4>$title</h4></td>
1249:         </tr>
1250:     </table>
1251: </div>
1252: #end
1253: 
1254: #macro (printPeriods $attr)
1255:     #foreach ($prd in $document.selectNodes("sogame/team[1]/linescore/lineprd"))
1256:     <th scope="col" $attr>
1257:         #if ($velocityCount >= 3)
1258:             #if ($velocityCount == 3)
1259:                 OT
1260:             #elseif ($velocityCount == 5)
1261:                 SO
1262:             #else
1263:                 ${tool.math.sub($velocityCount, 2)}OT
1264:             #end
1265:         #else
1266:             $!velocityCount
1267:         #end
1268:     </th>
1269:     #end
1270: #end
1271: 
1272: #macro (shootout $shootouts $t)
1273: 	#set ($printVal = "")
1274: 	#foreach ($shot in $shootouts)
1275: 		#if ($shot.valueOf("@vh") == $t)
1276: 			#set ($player = $shot.valueOf("@name"))
1277: 			#set ($shotResult = ${shot.valueOf("@result")})
1278: 			#set ($singlePrintVal = "$player - $shotResult")
1279: 			#if ($shot.valueOf("@result") == "MADE")
1280: 				#set ($score = $shootoutScores.get($t))
1281: 				#set ($score = $tool.math.add($score, 1))
1282: 				#set ($score = $shootoutScores.put($t, $score))
1283: 			#end ## result
1284: 			#if ($printVal.length() > 0) #set ($printVal = "${printVal}; ") #end
1285: 			#set ($printVal = "${printVal} ${singlePrintVal}")			
1286: 		#end ## if
1287: 	#end ## foreach
1288: 	$printVal
1289: #end
1290: 
1291: #macro (period $p)
1292: 	#if ($p == 1) 1st
1293: 	#elseif ($p == 2) 2nd
1294: 	#elseif ($p == 3) OT
1295: 	#elseif ($p == 4) 2OT
1296: 	#elseif ($p == 5) SO
1297: 	#else $p
1298: 	#end
1299: #end
1300: 
1301: #macro (showTeam $team)
1302:     #if ($team.attributeValue("link").length() > 0 &&  $linkTeams)
1303:         <a href="$!linkTeamsBase?id=${team.attributeValue('teamId')}">$team.attributeValue("name")</a>
1304:     #else
1305:     	$team.attributeValue("name")
1306:     #end
1307: #end
1308: 
1309: ## GOALIE SHOTS
1310: #macro (shots $ga $saves)
1311: 	#if ($saves.length() > 0)
1312:  		$tool.math.add($ga, $saves)
1313: 	#end
1314: #end
1315: 	    
1316: ## PLAY BY PLAY
1317: #macro (printPlayByPlay)
1318: 	<div class="stats-wrap clearfix">	
1319: 	    <div class="stats-box full">
1320: 	    	#if ($stats.view != "pdf")
1321: 	    		<div class="periods-links clearfix">
1322: 	    			<span class="label">Periods:</span>
1323: 	    			<ul>
1324: 	    				#foreach ($p in [1..$document.selectNodes("sogame/plays/period").size()])
1325: 	    					<li><a href="#prd${p}">#period($p)</a></li>
1326: 	    				#end
1327: 	    			</ul>
1328: 	    		</div>
1329: 	    	#end
1330: 	    	#set ($vscore = 0)
1331: 	    	#set ($hscore = 0)
1332: 	    	#foreach ($playPeriod in $document.selectNodes("sogame/plays/period"))
1333: 	    		#set ($prdCount = $playPeriod.valueOf("@number"))
1334: 				<table>
1335: 					<caption class="caption">
1336: 						<h2><span id="prd${prdCount}">#period($prdCount)</span></h2>
1337: 					</caption>
1338: 				    #set ($score = "")
1339: 				    #set ($playNodes = $playPeriod.selectNodes("*"))
1340: 				    #foreach ($play in $playNodes)
1341: 				        #set ($nodeName = $play.getName())
1342: 				        #set ($rowClass = "row")
1343: 				    	#set ($playText = "")
1344: 				    	#set ($isVisitorPlay = $play.valueOf('@vh') == "V")
1345: 				    	#set ($isHomePlay = $play.valueOf('@vh') == "H")
1346: 				    	#set ($playAction = $play.valueOf("@action"))
1347: 				    	#set ($playTime = $play.valueOf("@clock"))
1348: 				            								                
1349: 				        #if ($nodeName == "play" && !$playAction.equalsIgnoreCase("goalmsg"))
1350: 							#if ($playAction.equalsIgnoreCase("foul"))
1351: 								#set ($rowClass = "${rowClass} foul")
1352: 							#end
1353: 				            #if ($playAction.equalsIgnoreCase("goal"))
1354: 				            	#set ($rowClass = "${rowClass} goal accent-bg")
1355: 				                #set ($playText = "<span class='action-title'>Goal!</span>${play.valueOf('@text')}")
1356: 				                #if ($isVisitorPlay)
1357: 		                            #set ($vscore = $play.valueOf("@vscore"))
1358: 		                        #else
1359: 		                            #set ($hscore = $play.valueOf("@hscore"))
1360: 		                        #end
1361: 		                        #set ($score = "<span class='v-score'>${vscore}</span><span class='sep'> - </span><span class='h-score'>${hscore}</span>")
1362: 				                #if ($playNodes.size() > $tool.math.add($velocityCount, 1) && $playNodes.get($tool.math.add($velocityCount, 1)).valueOf("@action").equalsIgnoreCase("goalmsg"))
1363: 				                    #set ($goalMsg = $playNodes.get($tool.math.add($velocityCount, 1)).valueOf("@text"))
1364: 				                    #set ($playText = "${playText} ${goalMsg}")
1365: 				                #end
1366: 								#set ($score = "<span class='v-score'>${vscore}</span><span class='sep'> - </span><span class='h-score'>${hscore}</span>")
1367: 								#set ($playText = "${playText} <br/> <strong>( ${score} )</strong>")	
1368: 				            #elseif ($playAction.equalsIgnoreCase("shootout"))
1369: 				            	#set ($playText = $play.valueOf("@text"))
1370: 				                #if(!$shootoutHeader)
1371: 				                	#set ($playText = "<span class='action-title'>Shootout!</span>${playText}")
1372: 				                	#set($shootoutHeader = "true")
1373: 				                #end
1374: 				            #elseif ($playAction.equalsIgnoreCase("sub"))
1375: 								#set ($rowClass = "${rowClass} substitute")
1376: 								#set ($playText = "<span class='action-title'>Substitution!</span>${play.valueOf('@text')}")
1377: 							#else
1378: 				                #set ($playText = $play.valueOf("@text"))
1379: 				            #end
1380: 				        
1381: 				        	#if($isHomePlay || $isVisitorPlay)
1382: 						        <tr class="$rowClass">
1383: 					                <td class="time">$playTime</td>
1384: 									<td class="play">$playText</td>                   
1385: 					            </tr>
1386: 							#end
1387: 			            #end ## node name check
1388: 				    #end ## play foreach
1389: 				    #if ($stats.view != "pdf")
1390: 				    	<tr class="back-to-top"><td colspan="4"><a href="#pbp">back to top <span class="gicon-up"></span></a></td></tr>
1391: 				    #end
1392: 			    </table>
1393: 	    	#end ## play period foreach
1394: 	    </div>
1395:     </div> ## stats-wrap
1396: #end ## ends printPlayByPlay
1397: 
1398: ## PENALTY STATS
1399: #macro (printPenaltyStats)
1400: 	<table class="striped">
1401: 		<caption class="caption"><h2>Penalty Summary</h2></caption>
1402:     	<thead>
1403: 			<tr>
1404: 				<th class="col-head" scope="col">Period</th>
1405: 				<th class="col-head" scope="col">Time</th>
1406: 				<th class="col-head text" scope="col">Fouls</th>
1407: 			</tr>
1408: 		</thead>
1409: 		<tbody>
1410: 			#foreach ($penalty in $document.selectNodes("sogame/penalties/pen"))
1411: 				<tr>
1412: 					#set ($vh = $penalty.valueOf("@vh"))
1413: 					#set ($prd = $penalty.valueOf("@prd"))
1414: 					<th class="row-head nowrap period" scope="row">
1415: 						#if ($vh == "V" && $stats.view != "pdf")
1416: 							#set ($visitorScore = $tool.math.add($visitorScore, 1))
1417: 							<div class="team-logo" style="background-image:url($stats.visitorTeamLogo)"><span class="offscreen">$teamName</span></div>
1418: 						#elseif ($vh == "H" && $stats.view != "pdf")
1419: 							#set ($homeScore = $tool.math.add($homeScore, 1))
1420: 							<div class="team-logo" style="background-image:url($stats.homeTeamLogo)"><span class="offscreen">$teamName</span></div>
1421: 						#end
1422: 						<span class="period">#period($prd)</span>
1423: 					</th>
1424: 					<td class="time">$penalty.valueOf("@time")</td>
1425: 					<td class="text">
1426: 						#if ($penalty.valueOf("@type").length() > 0)
1427: 							#if ($penalty.valueOf("@type").contains('GREEN'))<span>Green card - </span>#end
1428: 							#if ($penalty.valueOf("@type").contains('YELLOW'))<span>Yellow card - </span>#end
1429: 							#if ($penalty.valueOf("@type").contains('RED'))<span>Red card - </span>#end
1430: 						#end
1431: 						$penalty.valueOf("@name")#if ($!penalty.valueOf("@desc").length() > 0): $!penalty.valueOf("@desc")#end
1432: 					</td>	
1433: 				</tr>				
1434: 			#end
1435: 		</tbody>
1436: 	</table>
1437: #end
1438: 
1439: ## PENALTY SUMMARY
1440: #macro (printPenaltySummary $boxWidth)
1441: 	#if ($penalties.size() > 0)
1442: 		#if ($boxWidth == "full") 
1443: 			<div class="stats-wrap">
1444: 				<div class="stats-box ${boxWidth} penalty-summary clearfix">
1445: 					#printPenaltyStats
1446: 				</div>
1447: 			</div>
1448: 		#else
1449: 			<div class="stats-box ${boxWidth} penalty-summary clearfix">
1450: 				#printPenaltyStats
1451: 			</div>
1452: 		#end
1453: 	#end
1454: #end
1455: 
1456: ## SCORING SUMMARY
1457: #macro (printScoringSummary)
1458:     <div class="stats-wrap clearfix">
1459: 		#if ($hasScoringSummary)
1460:         <div class="stats-box half scoring-summary clearfix">
1461:             #set ($visitorScore = 0)
1462:             #set ($homeScore = 0)
1463:             <table class="striped">
1464:                 <caption class="caption"><h2>Scoring Summary</h2></caption>
1465:                 <thead>
1466:     				<tr>
1467: 						<th class="col-head" scope="col">Period</th>
1468: 						<th class="col-head" scope="col">Time</th>
1469: 						<th class="col-head text" scope="col">Play</th>
1470: 						<th class="col-head" scope="col">V - H</th>
1471: 					</tr>
1472:                 </thead>
1473:                 <tbody>
1474: 	                #foreach ($pd in $periodRange)
1475: 		                #foreach ($score in $document.selectNodes("sogame/scores/score"))
1476: 					        #set ($teamName = "")
1477: 					    	#set ($scoreText = "")
1478: 					    	#set ($scoreDesc = "")
1479: 					    	#set ($scorePlayer = $!score.valueOf("@playerId"))
1480: 					    	#set ($scoreTime = $score.valueOf("@time"))
1481: 					    	#set ($isVisitorScore = $score.valueOf('@vh') == "V")
1482: 					    	#set ($isHomeScore = $score.valueOf('@vh') == "H")
1483: 					            					
1484: 					    	#if($isVisitorScore)
1485: 				                #set ($teamName = $visitorTeam)
1486: 				            #else
1487: 				                #set ($teamName = $homeTeam)                                        
1488: 				            #end
1489: 				            
1490: 		                    #if ($pd == $score.valueOf("@prd"))
1491: 	                            #if ($scorePlayer.length() > 0 and $linkPlayers)
1492: 	                            	#set ($scoreText = "<a href='${!linkPlayersBase}?id=${scorePlayer}'>")
1493: 	                            #end
1494: 	                            #if($score.valueOf("@name").equalsIgnoreCase("team") && $hasPeriods)
1495: 	                                #if($isHomeScore) #set ($scoreText = "${scoreText} ${visitorNode.attributeValue('name')}")#elseif($isVisitorScore) #set ($scoreText = "${scoreText} ${homeNode.attributeValue('name')}")#end
1496: 	                                #set ($scoreText = "${scoreText} Own goal")
1497: 	                            #else
1498: 	                                #set ($scoreText = "${scoreText} ${score.valueOf('@name')}")
1499: 	                            #end
1500: 	                            #if ($scorePlayer.length() > 0 and $linkPlayers)
1501: 	                            	#set ($scoreText = "${scoreText} </a>")
1502: 	                            #end
1503: 	
1504: 	                            #if ($score.valueOf("@seasong").length() > 0) #set ($scoreText = "${scoreText} (${score.valueOf('@seasong')})") #end
1505: 	
1506: 	                            #if($score.valueOf("@assist1").length() > 0)
1507: 	                                #if ($score.valueOf("@assist1Id").length() > 0 and $linkPlayers)#set ($scoreText = "${scoreText} <a href='${!linkPlayersBase}?id=${score.valueOf('@assist1Id')}'>")#end
1508: 	                                #if ($score.valueOf("@assist2").length() > 0)
1509: 	                                    #set ($scoreText = "${scoreText} (${score.valueOf('@assist1')}")
1510: 	                                #else
1511: 	                                    #set ($scoreText = "${scoreText} (${score.valueOf('@assist1')})")
1512: 	                                #end
1513: 	                                #if ($score.valueOf("@assist1Id").length() > 0 and $linkPlayers)#set ($scoreText = "${scoreText}</a>")#end
1514: 	                            #elseif ($score.valueOf("@name") != "Team")
1515: 	                                #set ($scoreText = "${scoreText} (unassisted)")
1516: 	                            #end
1517: 	                            #if($score.valueOf("@assist2").length() > 0)
1518: 	                                #set ($scoreText = "${scoreText} &amp;")
1519: 	                                #if ($score.valueOf("@assist2Id").length() > 0 and $linkPlayers)#set ($scoreText = "${scoreText} <a href='${!linkPlayersBase}?id=${score.valueOf('@assist2Id')}'>")#end
1520: 	                                #set ($scoreText = "${scoreText} ${score.valueOf('@assist2')})")
1521: 	                                #if ($score.valueOf("@assist2Id").length() > 0 and $linkPlayers)#set ($scoreText = "${scoreText}</a>")#end
1522: 	                            #end
1523: 	                            
1524: 	                            #if ($showGoalDesc)
1525: 	                                #if($!score.valueOf("@desc").length() > 0)
1526: 	                                    #set ($scoreText = "${scoreText} - $!{score.valueOf('@desc')}")
1527: 	                                #else
1528: 	                                    #foreach ($play in $document.selectNodes("sogame/plays/period/play"))
1529: 	                                        #if(($play.valueOf("@action") == "PENSHOT") && ($play.valueOf("@clock") == $scoreTime))
1530: 	                                            #if ($showFieldHockey)
1531: 	                                            	#set ($scoreText = "${scoreText} - Penalty Stroke")
1532: 	                                            #else 
1533: 	                                            	#set ($scoreText = "${scoreText} - Penalty Kick") 
1534: 	                                            #end
1535: 	                                        #end
1536: 	                                    #end
1537: 	                                #end
1538: 	                            #end
1539: 	                            
1540: 	                            <tr>
1541: 	                            	<th class="row-head nowrap period" scope="row">
1542: 		                            	#if ($isVisitorScore && $stats.view != "pdf")
1543: 		                            		#set ($visitorScore = $tool.math.add($visitorScore, 1))
1544: 		                            		<div class="team-logo" style="background-image:url($stats.visitorTeamLogo)"><span class="offscreen">$teamName</span></div>
1545: 		                            	#elseif ($isHomeScore && $stats.view != "pdf")
1546: 		                            		#set ($homeScore = $tool.math.add($homeScore, 1))
1547: 		                            		<div class="team-logo" style="background-image:url($stats.homeTeamLogo)"><span class="offscreen">$teamName</span></div>
1548: 		                            	#end
1549: 		                            	<span class="period">#period($pd)</span>
1550: 	                            	</th>
1551: 					                <td class="time">$!scoreTime</td>
1552: 					                <td class="text">$scoreText</td>
1553: 					                <td class="total">$visitorScore - $homeScore</td>
1554: 				            	</tr> ## row
1555: 	                            
1556: 		                    #end ## if
1557: 		                #end ## scoring foreach
1558: 		            #end ## period range
1559:                 </tbody>
1560:             </table>
1561:         </div> ## stats-box
1562:         #end
1563: 
1564: 		## PENALTY / SCORING SUMMARY
1565: 		#if ($shootouts.size() > 0)        
1566: 			#printShootoutSummary
1567: 		#else
1568: 			#printPenaltySummary("half")
1569: 		#end
1570: 
1571: 	</div>
1572: #end ## SCORING SUMMARY MACRO END
1573: 
1574: #macro(printShootoutSummary)
1575: 	#set ($visitorPenaltyMade = $document.selectNodes("sogame/shootouts/shootout[@vh='V'][@result='MADE']"))
1576: 	#set ($homePenaltyMade = $document.selectNodes("sogame/shootouts/shootout[@vh='H'][@result='MADE']"))
1577: 	<div class="stats-box half shootout-summary clearfix">
1578: 		<table>
1579:                	<caption class="caption"><h2>Shootout</h2></caption>
1580: 				<tr>
1581: 					<th scope="col" class="col-head" colspan="2">$visitor</th>
1582: 					<th scope="col" class="col-head" colspan="2">$home</th>
1583:                 </tr>
1584:         		#set ($penaltyCount = 0)
1585:         		#foreach ($shootout in $shootouts)
1586:         			#if ($shootout.valueOf("@vh") == "V")
1587:         				#set ($visPenaltyShooter  = $shootout.valueOf("@name"))
1588:         				#set ($visPenaltyResult = $shootout.valueOf("@result"))
1589:         			#end
1590:         			#if ($shootout.valueOf("@vh") == "H")
1591:         				#set ($homePenaltyShooter = $shootout.valueOf("@name"))
1592:         				#set ($homePenaltyResult = $shootout.valueOf("@result"))
1593:         			#end
1594:         			#if ($velocityCount % 2 == 0 || $velocityCount == $shootouts.size())
1595:         				#set ($penaltyCount = $penaltyCount + 1)
1596:         				<tr>
1597:         					<td #if ($visPenaltyResult == "MISSED") class="visitor shot-missed" #else class="visitor shot-made" #end><span class="icon"></span>$visPenaltyShooter</td>
1598:         					<th class="row-head" colspan="2">Pen$penaltyCount</th>
1599:         					<td #if ($homePenaltyResult == "MISSED") class="home shot-missed" #else class="home shot-made" #end>$homePenaltyShooter<span class="icon"></span></td>
1600:         				</tr>
1601:         			#end
1602:         		#end
1603:         		<tr class="totals">
1604:         			<td colspan="4"><strong>Final:</strong> $visitorPenaltyMade.size() - $homePenaltyMade.size()</td>
1605:         		</tr>
1606: 		</table>	
1607: 	</div>          
1608: #end
1609: 
1610: #macro (printPlayerStats $team)
1611: 
1612: 	<thead>
1613: 	    <tr>
1614: 	        <th scope="col" class="col-head text">PLAYER</th>
1615: 	        <th scope="col" class="col-head">SH</th>
1616: 	        <th scope="col" class="col-head">SOG</th>
1617: 	        <th scope="col" class="col-head">G</th>
1618: 	        <th scope="col" class="col-head">A</th>
1619: 	        #if ($showFieldHockey)<th scope="col" class="col-head">DS</th>#end
1620: 	        #if ($showPlayerMin == true)<th scope="col" class="col-head">MIN</th>#end
1621: 	    </tr>
1622: 	</thead>
1623: 	
1624: 	<tbody>
1625: 	    #foreach ($statNode in $team.selectNodes("player[@gp='1']/shots"))
1626: 	        <tr>
1627: 	        	<th scope="row" class="row-head text">
1628: 	            	<span class="uniform">$!statNode.valueOf("../@uni") - </span>
1629: 	            
1630: 	                #if ($statNode.valueOf("../@playerId").length() > 0 && $linkPlayers && $team.attributeValue("link").length() > 0)
1631: 	                	<a href="$!linkPlayersBase?id=${statNode.valueOf("../@playerId")}" class="player-name">$statNode.valueOf("../@name")</a>
1632: 	                #else
1633: 	                	<span class="player-name">$statNode.valueOf("../@name")</span>
1634: 	                #end
1635: 	                
1636: 	                #if($statNode.valueOf("../@pos").length() > 0)<span class="position" style="text-transform:lowercase"> - $statNode.valueOf("../@pos")</span>#end
1637: 	                
1638: 	                #foreach ($penalty in $document.selectNodes("sogame/penalties/pen"))
1639: 	                	#if ($penalty.valueOf("@name").equals($statNode.valueOf("../@name")))	
1640: 	                        #if ($penalty.valueOf("@type").length() > 0)
1641: 	                            #if ($penalty.valueOf("@type").contains('YELLOW'))<span class="penalty-card yellow">- Yellow card <span class="time">$penalty.valueOf("@time")</span></span>#end
1642: 	                            #if ($penalty.valueOf("@type").contains('RED'))<span class="penalty-card red">- Red card <span class="time">$penalty.valueOf("@time")</span></span>#end
1643: 	                        #end
1644: 	                	#end
1645: 	                #end ## penalty foreach
1646: 	            </th>
1647: 		        <td>$!statNode.valueOf("@sh")</td>
1648: 	            <td>$!statNode.valueOf("@sog")</td>
1649: 	            <td>$!statNode.valueOf("@g")</td>
1650: 	            <td>$!statNode.valueOf("@a")</td>
1651: 	            #if ($showFieldHockey)<td>$!statNode.valueOf("../misc/@dsave")</td>#end
1652: 	            #if ($showPlayerMin == true)<td>$!statNode.valueOf("../misc/@minutes")</td>#end
1653: 	        </tr>
1654: 	    #end
1655: 	</tbody>
1656: 	
1657: 	<tbody>
1658: 	    <tr class="totals">
1659: 	        <th scope="rowgroup" class="row-head text">TOTALS</th>
1660: 	        #set ($statTotals = $team.selectSingleNode("totals/shots"))
1661: 	        <td>$!statTotals.valueOf("@sh")</td>
1662: 	        <td>$!statTotals.valueOf("@sog")</td>
1663: 	        <td>$!statTotals.valueOf("@g")</td>
1664: 	        <td>$!statTotals.valueOf("@a")</td>
1665: 	        #if ($showFieldHockey)<td>$!statTotals.valueOf("../misc/@dsave")</td>#end
1666: 	        #if ($showPlayerMin == true)<td>$!statTotals.valueOf("../misc/@minutes")</td>#end
1667: 	    </tr>
1668:     </tbody> 
1669: #end ## printPlayerStats
1670: 
1671: #macro (printTeamGoalies $team)
1672:     
1673: 	<thead>
1674: 	    <tr>
1675: 	        <th scope="col" class="col-head text">GOALIES</th>
1676: 	        <th scope="col" class="col-head">&#160;</th>
1677: 	        #if ($showPlayerMin == true)<th scope="col" class="col-head">&#160;</th>#end
1678: 	        <th scope="col" class="col-head">SOG</th>
1679: 	        <th scope="col" class="col-head">GA</th>
1680: 	        <th scope="col" class="col-head">SV</th>
1681: 	        #if ($showFieldHockey)<th scope="col" class="col-head">&#160;</th>#end
1682: 	        <th scope="col" class="col-head">Min</th>
1683: 	    </tr>
1684:     </thead>
1685: 
1686: 	<tbody>
1687: 	    #foreach ($stat in $team.selectNodes("player/goalie"))
1688: 	        <tr>
1689: 	            <th scope="row" class="row-head text">
1690: 	            	<span class="uniform">$!stat.valueOf("../@uni") - </span>
1691: 	            	
1692: 	                #if ($stat.valueOf("../@playerId").length() > 0 && $linkPlayers && $team.attributeValue("link").length() > 0)
1693: 	                	<a href="$!linkPlayersBase?id=${stat.valueOf("../@playerId")}" class="player-name">$stat.valueOf("../@name")</a>
1694: 	                #else
1695: 	                	<span class="player-name">$stat.valueOf("../@name")</span>
1696: 	                #end
1697: 	
1698: 					#if ($isDakStats)
1699: 						#if($tool.math.toInteger($stat.valueOf("@win")) > 0)<span>(W, $stat.valueOf("@win"))</span>#end
1700: 						#if($tool.math.toInteger($stat.valueOf("@loss")) > 0)<span>(L, $stat.valueOf("@loss"))</span>#end
1701: 						#if($tool.math.toInteger($stat.valueOf("@tie")) > 0)<span>(T, $stat.valueOf("@tie"))</span>#end
1702: 					#else
1703: 						#if($stat.valueOf("@win").length() > 0)<span>(W, $stat.valueOf("@win"))</span>#end
1704: 						#if($stat.valueOf("@loss").length() > 0)<span>(L, $stat.valueOf("@loss"))</span>#end
1705: 						#if($stat.valueOf("@tie").length() > 0)<span>(T, $stat.valueOf("@tie"))</span>#end
1706: 					#end
1707: 					
1708: 	            </th>
1709: 	            <td>$!formatter.formatNumber($ga, "#")</td>
1710: 	            #if ($showPlayerMin == true)<td>&#160;</td>#end
1711: 	            <td>#shots($stat.valueOf("@ga") $stat.valueOf("@saves"))</td>
1712: 	            <td>$stat.valueOf("@ga")</td>
1713: 	            <td>$!stat.valueOf("@saves")</td>
1714: 	            #if ($showFieldHockey)<td>&#160;</td>#end
1715: 	            <td>$!stat.valueOf("@minutes")</td>
1716: 	        </tr>
1717: 	    #end
1718:     </tbody>
1719: 
1720: 	<tbody>
1721: 	    #if ($team.selectNodes("player/goalie").size() > 1) ## if more than one goalie appeared show totals
1722: 	        <tr class="totals">
1723: 	            <th scope="rowgroup" class="row-head text">TOTALS</th>
1724: 	            #set ($goalieTotals = $team.selectSingleNode("totals/goalie"))
1725: 	            <td>$!formatter.formatNumber($goalieTotals.valueOf("@ga"), "#")</td>
1726: 	            #if ($showPlayerMin == true)<td>&#160;</td>#end
1727: 	            <td>#shots($goalieTotals.valueOf("@ga") $goalieTotals.valueOf("@saves"))</td>
1728: 	            <td>$!goalieTotals.valueOf("@ga")</td>
1729: 	            <td>$!goalieTotals.valueOf("@saves")</td>
1730: 	            #if ($showFieldHockey)<td>&#160;</td>#end
1731: 	            <td>$!goalieTotals.valueOf("@minutes")</td>
1732: 	        </tr>
1733: 	    #end
1734:     </tbody>
1735:     
1736: #end ## print team goalies
1737: 
1738: #macro (printTabControl $teamNode $id)
1739: 	#set ($vh = $teamNode.valueOf("@vh").toLowerCase())
1740: 	#set ($inputClass = "home")
1741: 	#if ($vh == "v")
1742: 		#set ($inputClass = "visitor")
1743:                                         #end
1744: 	#if ($stats.view != "pdf")
1745: 	   	<input class="radio ${inputClass}" type="radio" id="${vh}-${id}" name="team-${id}" #if ($vh == "v")checked="checked"#end>
1746: 	   	<label class="label ${inputClass}" for="${vh}-${id}">$teamNode.valueOf("@name")</label>
1747:     #end
1748: #end
1749: 
1750: ## PRINT BOX SCORE
1751: #macro (printBoxScore)   
1752: 	#printTabControl($visitorNode, "lineup")
1753: 	#printTabControl($homeNode, "lineup")
1754: 	<div class="stats-wrap clearfix">
1755: 	#foreach ($teamNode in $document.selectNodes("sogame/team"))
1756: 		#set ($teamName = $teamNode.valueOf("@name"))
1757:        	#set ($teamId = $teamNode.valueOf("@teamId"))
1758: 		#set ($vh = $teamNode.valueOf("@vh").toLowerCase())
1759: 		<div class="stats-box half lineup ${vh} clearfix">
1760: 			<table class="striped">
1761: 				<caption class="caption">
1762: 					<h2><span class="team-name">$teamName</span></h2>
1763: 				</caption>
1764: 				#printPlayerStats($teamNode)
1765: 			</table>
1766: 		</div>
1767: 	#end
1768: 	</div> ## stats-wrap
1769: #end ## print box score
1770: 
1771: ## PRINT BOX SCORE
1772: #macro (printGoalies)    
1773: 	<div class="stats-wrap clearfix">        
1774: 		#foreach ($teamNode in $document.selectNodes("sogame/team"))
1775: 			#set ($teamName = $teamNode.valueOf("@name"))
1776: 			#set ($teamId = $teamNode.valueOf("@teamId"))
1777: 			#set ($vh = $teamNode.valueOf("@vh").toLowerCase())
1778: 			<div class="stats-box half lineup ${vh} clearfix">
1779: 				<table class="striped">
1780: 					<caption class="caption"><h2>$teamName <span class="offscreen">Goalies</span></h2></caption>
1781: 					#printTeamGoalies($teamNode)
1782: 				</table>
1783: 			</div>
1784: 		#end
1785: 	</div> ## stats-wrap
1786: #end ## print goalies
1787: 
1788: ## TEAM SUMMARY STATISTICS
1789: #macro (printTeamStats)
1790: 
1791: 	<div class="stats-wrap clearfix">
1792: 		<div class="stats-box full team-stats clearfix">
1793: 	        <table  class="striped"><tbody><tr>
1794: 	            <th style="width:33%">#showTeam($visitorNode)</th>
1795: 	            <th style="width:34%">Team Statistics</th>
1796: 	            <th>#showTeam($homeNode)</th>
1797: 	        </tr>
1798: 	        <tr>
1799: 	            <td >$visitorNode.valueOf('totals/shots/@sh')</td>
1800: 	            <td class="totals">SHOTS</td>
1801: 	            <td>$homeNode.valueOf('totals/shots/@sh')</td>
1802: 	        </tr>
1803: 	        <tr>
1804: 	            <td>$visitorNode.valueOf("totals/goalie/@saves")</td>
1805: 	            <td class="totals">SAVES</td>
1806: 	            <td>$homeNode.valueOf("totals/goalie/@saves")</td>
1807: 	        </tr>
1808: 	        <tr>
1809: 	            <td>#totalCorners($visitorNode)</td>
1810: 	            <td class="totals">#if ($showFieldHockey) PENALTY CORNERS #else CORNER KICKS #end</td>
1811: 	            <td>#totalCorners($homeNode)</td>
1812: 	        </tr>
1813: 	            #if ($showFouls)
1814: 	            <tr>
1815: 	                <td>$visitorNode.valueOf("totals/penalty/@fouls")</td>
1816: 	                <td class="totals">FOULS</td>
1817: 	                <td>$homeNode.valueOf("totals/penalty/@fouls")</td>
1818: 	            </tr>
1819: 	            #end
1820: 	        </tbody></table>
1821: 	    </div>
1822:     </div> ## stats-wrap
1823: 
1824: #end ## print team stats
1825: 
1826: ## Game Information
1827: #macro (printGameInfo)
1828:     <div class="stats-wrap clearfix">
1829:         <div class="stats-box game-info">
1830:         	<table class="table-inline">
1831:         		<caption class="caption"><h2>Game Information</h2></caption>
1832:         		#if ($date)<tr><th class="row-head text" scope="row">Date/Time: </th><td class="text">$formatter.formatLongDate($date) #if ($time.length() > 0) - $!time #end</td></tr>#end
1833:         		#if ($location.length() > 0)<tr><th class="row-head text" scope="row">Location: </th><td class="text">$location</td></tr>#end
1834:             	#if ($stadium.length() > 0)<tr><th class="row-head text" scope="row">Stadium: </th><td class="text">$document.valueOf("sogame/venue/@stadium")</td></tr>#end
1835:             	#if ($duration.length() > 0)<tr><th class="row-head text" scope="row">Game Length: </th><td class="text">$document.valueOf("sogame/venue/@duration")</td></tr>#end
1836:             	#if ($attendance.length() > 0)<tr><th class="row-head text" scope="row">Attendance: </th><td class="text">$document.valueOf("sogame/venue/@attend")</td></tr>#end
1837:             	#foreach ($official in $document.selectNodes("sogame/venue/officials/official"))
1838:                 	<tr><th class="row-head text" scope="row">$official.valueOf("@title"): </th><td class="text">$official.valueOf("@name")</td></tr>
1839:             	#end
1840:         	</table>
1841:     	</div> 
1842:     </div>
1843: #end ## print game info
1844: 
1845: #macro (printStatsBox $colTitle $nodeAttr)
1846: 	<table>
1847: 		<tr>
1848: 			<th scope="col" class="col-head text">$colTitle</th>
1849: 			#printPeriods('class="col-head" style="width:40px"')
1850: 			<th scope="col" class="col-head" style="width:50px">TOTAL</th>
1851: 		</tr>
1852: 		
1853: 		#foreach ($team in $document.selectNodes("sogame/team"))
1854: 			#set ($total = 0)
1855: 			<tr>
1856: 				<th scope="row" class="row-head text">$team.valueOf("@name")</th>
1857: 				#foreach ($prd in $team.selectNodes("linescore/lineprd"))
1858: 					<td>$prd.valueOf("${nodeAttr}")</td>
1859: 					#set ($total = $tool.math.add($total, $prd.valueOf("${nodeAttr}")))
1860: 				#end
1861: 				<td>$total</td>
1862: 			</tr>
1863: 		#end
1864: 	</table>
1865: #end ## print stats box
1866: 
1867: #macro (printTabBoxscore)
1868: 
1869: 	<div class=" stats-wrap clearfix">
1870: 	
1871: 		## SHOTS BY PERIOD
1872:         <div class="stats-box half team-stats">
1873: 			#printStatsBox ("SHOTS" "@shots")
1874: 		</div>
1875: 		
1876: 		## SAVES
1877: 		<div class="stats-box half team-stats">
1878: 			#printStatsBox ("SAVES" "@saves")
1879: 		</div>
1880: 		
1881: 	</div> ## stats wrap
1882: 
1883: 	<div class=" stats-wrap clearfix">
1884: 	
1885: 		## PENALTY CORNERS / CORNER KICKS
1886:         <div class="stats-box half team-stats">
1887: 	        #if ($showFieldHockey)
1888: 	        	#printStatsBox ("PENALTY CORNERS" "@corners")
1889: 	        #else
1890: 				#printStatsBox ("CORNER KICKS" "@corners")
1891: 			#end
1892: 		</div>
1893: 
1894: 		## FOULS BY PERIOD
1895: 		#if ($showFouls)
1896: 			<div class="stats-box half team-stats">
1897: 				#printStatsBox ("FOULS" "@fouls")
1898: 			</div>
1899: 		#end
1900: 		
1901: 	</div> ## stats wrap
1902: 
1903: #end ## print tab boxscore
1904: 
1905: <head>
1906:     <title>$visname #if($isNeutralGame)vs.#else at #end $homename | Box Score #if($date.length() > 0)| $date #end</title>
1907:     #if ($stats.inProgress)
1908:         <meta http-equiv="refresh" content="60"/>
1909:     #end
1910:     #if ($stats.view == "pdf")
1911:         #include("statcrew-pdf-css-template")
1912:     #end
1913: </head>
1914: 
1915: #if ($stats.view == "pdf")
1916:     
1917: <div class='footer-left'>$visname vs. $homename</div>
1918: <div class='footer-right'><span id="pagenumber"></span> of <span id="pagecount"></span></div>		    
1919: <div class="stats-wrapper">
1920: 	#printPdfHeader("Box score")
1921: 	#parse("soxml-monospace-template")
1922: 	#if ($hasPeriods)
1923: 		<p class="pagebreak">&nbsp;</p>
1924: 		#printPdfHeader("Play by Play")
1925: 		<div class="stats-fullbox">#printPlayByPlay()</div>
1926: 	#end                
1927: </div> ## stats-wrapper               
1928: 
1929: #else
1930: ## FULL BOXSCORE
1931: 
1932: #if ($showWiki == true)
1933: 	$!wiki.su
1934: #end
1935: 
1936: <article class="game-boxscore soc-fh clearfix">	
1937: 
1938: 	## BOX SCORE HEADER
1939: 	<div class="head">
1940: 		<h1>$visitorTeam #if ($isNeutralGame) vs. #else at #end $homeTeam #if ($dateVal.length() > 0)<span>$formatter.formatLongDate($date)</span>#end</h1>
1941: 	
1942: 		#set ($visClass = "")
1943:         #set ($homeClass = "")	    
1944: 	    #if ($visScore && $homeScore)
1945:             #if ($visScore > $homeScore)
1946:                 #set ($visClass = "winner")
1947:                 #set ($homeClass = "loser")
1948:             #elseif ($homeScore > $visScore)
1949:                 #set ($visClass = "loser")
1950:                 #set ($homeClass = "winner")
1951:             #end
1952: 	    #end
1953: 	    
1954:     	<div class="teams clearfix">
1955:     	
1956: 	    	#foreach ($teamNode in $document.selectNodes("sogame/team"))
1957: 				#set ($teamName = $teamNode.valueOf("@name"))
1958: 	        	#set ($teamId = $teamNode.valueOf("@teamId"))
1959: 				#set ($vh = $teamNode.valueOf("@vh"))
1960: 	        	#if ($vh == "V")
1961: 	        		#set ($teamClass = "visitor ${visClass}")
1962: 	        		#set ($teamLogo = $stats.visitorTeamLogo) 
1963: 	        	#else
1964: 	        		#set ($teamClass = "home ${homeClass}")
1965: 	        		#set ($teamLogo = $stats.homeTeamLogo)		                	
1966: 	        	#end
1967: 	        	    	
1968: 	    		<div class="team ${teamClass} clearfix">                                                   
1969: 	    			<div class="team-logo"><img src="$teamLogo" alt="${teamNode.valueOf("@name")}" role="presentation" /></div>
1970: 	    			#if ($teamNode.valueOf("@record").length() > 0)<span class="team-record">($teamNode.valueOf("@record"))</span>#end
1971: 	    			<div class="team-score">$teamNode.valueOf("linescore/@score")</div>
1972: 	    		</div>
1973: 		    		
1974: 		    #end
1975:     	   	
1976: 			## Mini boxscore
1977: 			<div class="linescore">
1978: 			<table>
1979: 				<tr>
1980: 					<th scope="col" class="col-head text">
1981: 						#if ($stats.final)
1982:                             Final
1983:                         #elseif ($stats.inProgress)
1984:                             #period($!status)- $!compClock
1985:                         #end
1986: 					</th>
1987: 					#printPeriods('class="col-head score"')
1988: 					<th scope="col" class="col-head score total" aria-label="Total">T</th>
1989: 				</tr>
1990: 
1991: 				## TEAM SCORES
1992: 				#foreach ($team in $document.selectNodes("sogame/team"))
1993: 				<tr #if($velocityCount == 1) class="$visClass" #else class="$homeClass" #end>
1994:                     <th scope="row" class="name row-head text">#showTeam($team)</th>                 
1995:                     #foreach ($prd in $team.selectNodes("linescore/lineprd"))
1996:                     	<td class="score">$prd.valueOf("@score")</td>
1997:                     #end
1998:                     <td class="score total">$team.valueOf("linescore/@score")</td>
1999: 				</tr>
2000: 				#end
2001: 			</table>
2002: 			</div> ## linescore
2003:     	</div> ## teams
2004:     </div> ## head
2005: 
2006:     ## TABS
2007:     <div class="tab-container primary clearfix" data-module="stats/tabs" data-type="primary">
2008:     	
2009: 		<div class="tab-nav" data-module="jscroll" data-momentum="false">
2010:     		<div class="clearfix">
2011:     			<ul class="clearfix">
2012:         			<li #if (!($stats.view.length() > 0) || $stats.view == "boxscore")class="active"#end><a href="${stats.pageUrl}" data-view="boxscore">Box Score</a></li>
2013:         			#if ($hasPeriods)
2014:           				<li #if ($stats.view == "plays")class="active"#end><a href="${stats.pageUrl}${paramSep}view=plays" data-view="plays" id="pbp">Play by Play</a></li>
2015:         			#end
2016:         			#if ($isDakStats)
2017:         				<li #if ($stats.view == "teamstats")class="active"#end><a href="${stats.pageUrl}${paramSep}view=teamstats" data-view="teamstats">Team Stats</a></li>
2018:         			#end
2019: 					<li data-skip="true"><a href="$stats.pageUrl${paramSep}tmpl=soxml-monospace-template" target="_blank">Coach's View</a></li>
2020:     			</ul>
2021:     		</div>
2022:     	</div>
2023:     	<div class="tab-panels">
2024:     	
2025:     		## FULL BOX SCORE
2026: 			#set ($class = "tab-panel boxscore clearfix")
2027: 			#if (!($stats.view.length() > 0) || $stats.view == "boxscore")
2028: 				#set ($class = "${class} active")
2029: 			#end								
2030: 			<section class="${class}">
2031: 				<h1 class="offscreen">Box Score</h1>
2032: 				<div class="player-stats">
2033: 					#printBoxScore
2034: 					#printGoalies
2035: 				</div>
2036: 				#printScoringSummary		
2037: 				#if ($isDakStats)
2038: 					#printTeamStats
2039: 				#else
2040: 					#printTabBoxscore
2041: 				#end
2042: 				#if ($shootouts.size() > 0 && $penalties.size() > 0)        
2043: 					#printPenaltySummary("full")
2044: 				#end
2045: 				#printGameInfo		
2046: 			</section>
2047:             
2048:             ## PAY BY PLAY
2049: 			#if ($hasPeriods)
2050: 				#set ($class = "tab-panel plays clearfix")
2051: 				#if ($stats.view == "plays")
2052: 					#set ($class = "${class} active")
2053: 				#end
2054: 				<section class="${class}">
2055: 					<h1 class="offscreen">Play By Play</h1>
2056: 					#printPlayByPlay
2057: 				</section>
2058: 			#end
2059:             
2060:             ## TEAM STATS
2061:             #if ($isDakStats)
2062: 	            #set ($class = "tab-panel team-stats clearfix")
2063: 	            #if ($stats.view == "teamstats")
2064: 	                #set ($class = "${class} active")
2065: 	            #end
2066: 	            <section class="${class}">
2067: 					<h1 class="offscreen">Team Statistics</h1>
2068: 					#printTeamStats
2069: 	            </section>
2070:             #end
2071:     	</div> ## tab panels
2072:     </div>
2073:     ## TABS END  
2074:     	
2075: </article> ## game-boxscore
2076: 
2077: #end ## pdf check
2078: 
2079: #set ($showWiki = true)
2080: #set ($showWiki = $showWikiVar)
2081: 
2082: #if ($showWiki == true)
2083:     $!wiki.su
2084: #end
2085: 
2086: #end ## pt check