Page source: |
1: #if ($stats.view == 'pt')
2: #set ($pregame = $stats.pregame)
3: #set ($startTime = $document.getRootElement().valueOf("network/@startTime"))
4: #if ($document.getRootElement().valueOf("network/@tba") == 'Y')
5: #set ($tba = true)
6: #else
7: #set ($tba = false)
8: #end
9: #set ($location = $document.getRootElement().valueOf("network/@location"))
10: #set ($localDate = $document.getRootElement().valueOf("network/@localDate"))
11: #set ($localTime = $document.getRootElement().valueOf("network/@localTime"))
12: #set ($notAvailable = true)
13: #if ($location != '')
14: #set ($neutral = true)
15: #else
16: #set ($neutral = false)
17: #end
18: #if ($request.getParameter("paused") == 'y')
19: #set ($paused = true)
20: #else
21: #set ($paused = false)
22: #end
23: #if ($pregame)
24: #set ($visitorTeamId = $document.getRootElement().valueOf("team[@vh='V']/@teamId"))
25: #set ($homeTeamId = $document.getRootElement().valueOf("team[@vh='H']/@teamId"))
26:
27: #if ($!options.get("primetime_preview_hide").equalsIgnoreCase("hide"))
28: #set ($shouldStatsShow = false)
29: #else
30: #set ($shouldStatsShow = $preview.shouldStatsShow($homeTeamId,$visitorTeamId))
31: #end
32: #end
33:
34: <head>
35: <script type="text/javascript" src='$website.cdn("/info/jquery-2.1.1.js")'></script>
36: <script type="text/javascript" src='$website.cdn("/info/notifications/jquery.noty.packaged.min.js")'></script>
37: <script type="text/javascript" src='$website.cdn("/info/dataTables/js/jquery.dataTables.js")'></script>
38: <script type="text/javascript" src='$website.cdn("/info/momentjs/moment.js")'></script>
39: <script type="text/javascript" src='$website.cdn("/info/primetime3/js/full_screen_api.js")'></script>
40: <script type="text/javascript" src='$website.cdn("/info/primetime3/js/flipclock.min.js")'></script>
41:
42: $website.addCss($website.cdn("/info/dataTables/css/jquery.dataTables.css"))
43: $website.addCss($website.cdn("/info/primetime3/css/flipclock.css"))
44:
45: <script type="text/javascript" src="/info/primetime3/js/pt3-embed.js"></script>
46:
47: <script type="text/javascript">var jQuery_2_1 = $.noConflict(true);</script>
48: <script type="text/javascript" src="/info/primetime3/js/add-ons.js"></script>
49: <script type="text/javascript" src="/info/primetime3/js/pt3-util.js"></script>
50:
51: <script src="/info/primetime3/js/highcharts.js"></script>
52: <script src="/info/primetime3/js/highcharts-more.js"></script>
53: <script src="/info/primetime3/js/solid-gauge.js"></script>
54:
55: <script type="text/javascript" src="/info/primetime3/js/pt3-preview-charts.js"></script>
56:
57: $website.addCss("/info/primetime3/css/pt3-styles.css")
58: $website.addCss("/info/primetime3/css/pt3-baseball-icons.css")
59:
60: $website.addCss("/info/primetime3/css/pt3-responsive.css")
61:
62: <script type="text/javascript" src="/info/primetime3/js/restive.js"></script>
63: <script type="text/javascript" src="/info/primetime3/js/pt3-restive.js"></script>
64:
65: <script type="text/javascript">
66: var conf = new Object();
67: conf.locale = '${locale}';
68: conf.videoProvider = '${videoProvider}';
69: conf.videoId = '${videoId}';
70: conf.eventId = '$document.getRootElement().valueOf("network/@eventId")';
71: conf.eventIdHashCode = '$eventIdHashCode';
72: conf.visitorTeamLogo = '$stats.visitorTeamLogo';
73: conf.homeTeamLogo = '$stats.homeTeamLogo';
74: conf.visitorTeamColor = '#121212';
75: conf.homeTeamColor = '#6D6D6D';
76: conf.startTime = '$startTime';
77: conf.pregame = $pregame;
78: conf.tba = $tba;
79: conf.localDate = '$localDate';
80: conf.localTime = '$localTime';
81: conf.visitor = '${tool.esc.javascript($document.getRootElement().valueOf("team[@vh='V']/@name"))}';
82: conf.home = '${tool.esc.javascript($document.getRootElement().valueOf("team[@vh='H']/@name"))}';
83: conf.currentDate = new Date();
84: conf.statusFinal = $stats.final;
85: conf.neutral = $neutral;
86: conf.paused = $paused;
87: conf.gamedayServiceEntryPointUrl = '$gamedayServiceEntryPointUrl';
88:
89: conf.visitorTeamLighterColor = $.fn.increase_brightness(conf.visitorTeamColor, 30);
90: conf.homeTeamLighterColor = $.fn.increase_brightness(conf.homeTeamColor, 30);
91: </script>
92:
93: <script type="text/javascript" src="/info/primetime3/js/pt3-boxscore-client.js"></script>
94: <script type="text/javascript" src="/info/primetime3/js/pt3-baseball-template.js"></script>
95: </head>
96:
97: #if ($pregame && !$shouldStatsShow)
98: <div id="primetime-wrapper" class="primetime-pre-game primetime-baseball clearfix">
99: <div class="primetime-overflow clearfix">
100: <div id="primetime-header" class="grid-row">
101: <div class="grid-col grid-col-hdr">
102:
103: <div class="pt-header clearfix">
104: <div class="pt-team pt-team-away visitor-team-color" style="background: $document.getRootElement().valueOf("team[@vh='V']/@color")">
105: <img src="$stats.visitorTeamLogo" alt="" class="team-logo visitor-team-logo" />
106: <h3 class="team-name visitor-team-name">$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
107: </div>
108:
109: <div class="pt-team pt-team-home home-team-color" style="background: $document.getRootElement().valueOf("team[@vh='H']/@color")">
110: <img src="$stats.homeTeamLogo" alt="" class="team-logo home-team-logo" />
111: <h3 class="team-name home-team-name">$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
112: </div>
113:
114: <div class="pt-match-scoreboard clearfix">
115: <div class="pt-mtach-info pt-pregame">
116: <center>
117: <div>
118: $localDate <br>
119: #if ($tba)
120: TBA
121: #else
122: $localTime
123: #end
124: </div>
125: </center>
126: </div>
127: </div>
128: </div>
129: </div>
130: </div>
131: <div class="grid-row-container clearfix">
132: <div class="grid-row">
133: <div class="content">
134: <div class="pt-last-play clearfix" style="display: none">
135: <span class="pt-label clearfix" style="text-align: center !important; width: 100% ">
136: This event doesn't have a set start time, but PrimeTime will be available once the event begins.
137: </span>
138: </div>
139: <div class="text">
140: <h3>
141: Live statistics will be available at the start of the event in:
142: </h3>
143: <center>
144: <div class="clock"></div><br/>
145: #if ($tba)
146: Days
147: #end
148: </center>
149: </div>
150: </div>
151: </div>
152: <div class="pt-game-info grid-row clearfix">
153: <div class="pt-tabs-panes clearfix">
154: <div id="stats-tabs" class="pt-tabs-pane clearfix">
155: <div id="divGameInformation" class="grid-row">
156: <div class="grid-col grid-col-gi grid-col1">
157: <h3 class="grid-title">
158: Game Information
159: </h3>
160: <div class="grid-content clearfix">
161: <div class="pt-game-information clearfix">
162: <div class="pt-row clearfix">
163: <center>
164: <div class="game-location pt-col">
165: <span class="date">
166: $localDate<br />
167: #if ($tba)
168: TBA
169: #else
170: $localTime
171: #end
172: </span>
173: <h3>Date & Time</h3>
174: </div>
175: #if ($location != '')
176: <div class="game-venue pt-col">
177: <span class="venue">
178: $location<br />
179: (Neutral)
180: </span>
181: <h3>Location</h3>
182: </div>
183: #end
184: </center>
185: </div>
186: </div>
187: </div>
188: </div>
189: </div>
190: </div>
191: </div>
192: </div>
193: </div>
194: ## FOOTER
195: $website.include("primetime-footer")
196: </div>
197: ## GENERAL INFORMATION
198: </div>
199: #elseif ($pregame && $shouldStatsShow)
200: #set ($visitorTeamId = $document.getRootElement().valueOf("team[@vh='V']/@teamId"))
201: #set ($homeTeamId = $document.getRootElement().valueOf("team[@vh='H']/@teamId"))
202:
203: #set ($teamStats = ["avg", "obp", "slg", "r", "h", "hr", "rbi", "era"])
204: #set ($teamStatsLabels = {"avg": "Batting Average", "obp": "On Base %", "slg": "Slugging %", "r": "Runs", "h": "Hits", "hr": "Home Runs", "rbi": "Runs Batted In", "era": "Earned Run Average"})
205:
206: #set ($topStats = ["avg", "h", "bb", "r", "hd", "ht", "hr", "rbi", "sb", "pw", "sv", "pk", "era"])
207: #set ($topStatsLabels = {"avg": "Batting Average", "h": "Hits", "bb": "Walks", "r": "Runs", "hd": "Doubles", "ht": "Triples", "hr": "Home Runs", "rbi": "Runs Batted In", "sb": "Stolen Bases", "pw": "Wins", "sv": "Saves", "pk": "Strikeouts", "era": "Earned Run Average"})
208:
209: #set ($visitorStats = $preview.getTeam($visitorTeamId).setTeamStats($teamStats).setTopStats($topStats).calculate())
210: #set ($homeStats = $preview.getTeam($homeTeamId).setTeamStats($teamStats).setTopStats($topStats).calculate())
211:
212: <div id="primetime-wrapper" class="primetime-pre-game primetime-baseball clearfix">
213: <div class="primetime-overflow clearfix">
214: <div id="primetime-header" class="grid-row">
215: <div class="grid-col grid-col-hdr">
216:
217: <div class="pt-header clearfix">
218: <div class="pt-team pt-team-away visitor-team-color" style="background: $document.getRootElement().valueOf("team[@vh='V']/@color")">
219: <img src="$stats.visitorTeamLogo" alt="" class="team-logo visitor-team-logo" />
220: <h3 class="team-name visitor-team-name">$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
221: </div>
222:
223: <div class="pt-team pt-team-home home-team-color" style="background: $document.getRootElement().valueOf("team[@vh='H']/@color")">
224: <img src="$stats.homeTeamLogo" alt="" class="team-logo home-team-logo" />
225: <h3 class="team-name home-team-name">$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
226: </div>
227:
228: <div class="pt-match-scoreboard clearfix">
229: <div class="pt-mtach-info pt-pregame">
230: <center>
231: <div>
232: $localDate <br>
233: #if ($tba)
234: TBA
235: #else
236: $localTime
237: #end
238: </div>
239: </center>
240: </div>
241: </div>
242: </div>
243: </div>
244: </div>
245: <div class="grid-row-container clearfix">
246: <div class="grid-row preview">
247: <div class="content grid-col grid-col-e">
248: <h3>
249: Live statistics will be available in:
250: </h3>
251: <div class="pt-last-play clearfix" style="display: none">
252: <span class="pt-label clearfix" style="text-align: center !important; width: 100% ">
253: This event doesn't have a set start time, but PrimeTime will be available once the event begins.
254: </span>
255: </div>
256: <div class="text">
257: <br>
258: <center>
259: <div class="clock"></div><br/>
260: #if ($tba)
261: Days
262: #end
263: </center>
264: </div>
265: </div>
266: </div>
267:
268: <!-- Team Overview -->
269: <div class="grid-row pt-overview">
270: <h2>Overview</h2>
271: <div class="grid-col grid-col-e grid-col2 background-black">
272: <h3>$document.getRootElement().valueOf("team[@vh='V']/@name")</h3>
273: <div class="container clearfix pt-live-action">
274: <table>
275: <thead>
276: <tr>
277: <th>Team Record</th>
278: <th>Conf. Record</th>
279: <th>Last Game</th>
280: </tr>
281: </thead>
282: <tbody>
283: <tr>
284: <td>${visitorStats.overallRecord}</td>
285: <td>${visitorStats.conferenceRecord}</td>
286: <td style="text-align: center">
287: ${visitorStats.lastGame.APResult}
288: <span>
289: #if ($visitorStats.lastGame.neutralSite.length() > 0 || $visitorStats.lastGame.home)
290: vs.
291: #else
292: at
293: #end
294: ${visitorStats.lastGame.opponent.name}
295: </span>
296: </td>
297: </tr>
298: </tbody>
299: </table>
300: </div>
301: <br />
302: </div>
303: <div class="grid-col grid-col-e grid-col2 background-gray">
304: <h3>$document.getRootElement().valueOf("team[@vh='H']/@name")</h3>
305: <div class="pt-live-action">
306: <table>
307: <thead>
308: <tr>
309: <th>Team Record</th>
310: <th>Conf. Record</th>
311: <th>Last Game</th>
312: </tr>
313: </thead>
314: <tbody>
315: <tr>
316: <td>${homeStats.overallRecord}</td>
317: <td>${homeStats.conferenceRecord}</td>
318: <td style="text-align: center">
319: ${homeStats.lastGame.APResult}
320: <span>
321: #if ($homeStats.lastGame.neutralSite.length() > 0 || $homeStats.lastGame.home)
322: vs.
323: #else
324: at
325: #end
326: ${homeStats.lastGame.opponent.name}
327: </span>
328: </td>
329: </tr>
330: </tbody>
331: </table>
332: </div>
333: <br />
334: </div>
335: </div>
336:
337: <!-- Team Comaprison -->
338: <div class="grid-row">
339: <div class="grid-col team-compare">
340: <h2>Team Comparison</h2>
341: <div class="charts-line">
342: <div class="charts-inner">
343: #foreach ($statsKey in $teamStats)
344: #if ($visitorStats.teamStats[$statsKey] && $homeStats.teamStats[$statsKey])
345: <div class="chart-container">
346: <h3>${teamStatsLabels[$statsKey]}</h3>
347: <div class="stats-chart ts-${statsKey}"></div>
348: <div class="stats-values">
349: <div class="stats-value visitor">${formatter.formatNumber($visitorStats.teamStats[$statsKey], $formats.get($statsKey))}</div>
350: <div class="stats-value home">${formatter.formatNumber($homeStats.teamStats[$statsKey], $formats.get($statsKey))}</div>
351: </div>
352: </div>
353: #end
354: #end
355: </div>
356: </div>
357:
358: <div class="legend grid-col clearfix">
359: <div class="stats-value visitor">$document.getRootElement().valueOf("team[@vh='V']/@name") (based on ${visitorStats.gamesPlayed} games)</div>
360: <div class="stats-value home">$document.getRootElement().valueOf("team[@vh='H']/@name") (based on ${homeStats.gamesPlayed} games)</div>
361: </div>
362: </div>
363: </div>
364:
365: <!-- Key Contributors -->
366: <div class="grid-row">
367: <div class="grid-col grid-col1 game-leaders grid-col">
368: <h2>Key Contributors</h2>
369: #macro (gameLeaders $category $label $visitorPlayers $homePlayers $quantityPlayers)
370: #set ($quantityPlayers = $quantityPlayers - 1)
371: <div class="game-leaders player-game-leaders">
372: <br/>
373: <h3>$label</h3>
374: <div class="grid-col top1">
375: <div class="grid-col charts">
376: #foreach ($i in [0..$quantityPlayers])
377: #set ($visitorChartVisible = $visitorPlayers.size() > $i)
378: #set ($homeChartVisible = $homePlayers.size() > $i)
379: #if ($visitorChartVisible || $homeChartVisible)
380: ## Using the format '#' directly since the stats has set 0.0 as format on the stats metadata object
381: #set ($format = $formats.get($category))
382: <div class="grid-col chart">
383: <div class="stats-player visitor">
384: #if ($visitorChartVisible)
385: #set ($visitorTopPlayer = $visitorPlayers[$i])
386: <div class="player-name">${visitorTopPlayer.firstName} ${visitorTopPlayer.lastName}</div>
387: <div class="stats-chart visitor ${category}-top${i}"></div>
388: #end
389: </div>
390: <div class="label">
391: <span>
392: #if ($visitorChartVisible)
393: ${formatter.formatNumber($visitorTopPlayer.stats[$category], $format)}
394: #end
395: </span>
396: <span class="title"></span>
397: <span>
398: #if ($homeChartVisible)
399: #set ($homeTopPlayer = $homePlayers[$i])
400: ${formatter.formatNumber($homeTopPlayer.stats[$category], $format)}
401: #end
402: </span>
403: </div>
404: <div class="stats-player home">
405: #if ($homeChartVisible)
406: <div class="player-name">${homeTopPlayer.firstName} ${homeTopPlayer.lastName}</div>
407: <div class="stats-chart home ${category}-top${i}"></div>
408: #end
409: </div>
410: </div>
411: #end
412: #end
413: </div>
414: </div>
415: </div>
416: #end
417:
418: #foreach ($statKey in $topStats)
419: #gameLeaders($statKey $topStatsLabels[$statKey] $visitorStats.topStats[$statKey] $homeStats.topStats[$statKey] 2)
420: #end
421:
422: <div class="legend grid-col clearfix">
423: <div class="stats-value visitor">$document.getRootElement().valueOf("team[@vh='V']/@name") (based on ${visitorStats.gamesPlayed} games)</div>
424: <div class="stats-value home">$document.getRootElement().valueOf("team[@vh='H']/@name") (based on ${homeStats.gamesPlayed} games)</div>
425: </div>
426: </div>
427: </div>
428:
429: <!-- Game Information -->
430: <div class="pt-game-info grid-row clearfix">
431: <div class="pt-tabs-panes clearfix">
432: <div id="stats-tabs" class="pt-tabs-pane clearfix">
433: <div id="divGameInformation" class="grid-row">
434: <div class="grid-col grid-col-gi grid-col1">
435: <h2 class="grid-title">
436: Game Information
437: </h2>
438: <div class="grid-content clearfix">
439: <div class="pt-game-information clearfix">
440: <div class="pt-row clearfix">
441: <center>
442: <div class="game-location pt-col">
443: <span class="date">
444: $localDate<br />
445: #if ($tba)
446: TBA
447: #else
448: $localTime
449: #end
450: </span>
451: <h3>Date & Time</h3>
452: </div>
453: #if ($location != '')
454: <div class="game-venue pt-col">
455: <span class="venue">
456: $location<br />
457: (Neutral)
458: </span>
459: <h3>Location</h3>
460: </div>
461: #end
462: </center>
463: </div>
464: </div>
465: </div>
466: </div>
467: </div>
468: </div>
469: </div>
470: </div>
471: </div>
472:
473: ## FOOTER
474: $website.include("primetime-footer")
475: </div>
476:
477: <script type="text/javascript">
478: $(document).ready(function() {
479: // Radialize the colors
480: Highcharts.setOptions({
481: colors: [conf.homeTeamColor, conf.visitorTeamColor]
482: });
483:
484: #foreach ($stats in $visitorStats.teamStats.entrySet())
485: #if ($stats.value && $homeStats.teamStats[$stats.key])
486: $.fn.buildDonutChart('.stats-chart.ts-${stats.key}', ${stats.value}, ${homeStats.teamStats[$stats.key]});
487: #end
488: #end
489:
490: // Key Contributors
491: #macro (playerStatsScript $category $visitorPlayers $homePlayers $visitorLimit $homeLimit $playersLimit)
492: #set ($playersLimit = $playersLimit - 1)
493: #foreach ($i in [0..$playersLimit])
494: #if ($visitorPlayers.size() > $i)
495: #set ($visitorTopPlayer = $visitorPlayers[$i])
496: $.fn.buildVisitorBarChart('.${category}-top${i}.visitor', ${visitorTopPlayer.stats[$category]}, $visitorLimit, conf.visitorTeamLighterColor);
497: #end
498: #if ($homePlayers.size() > $i)
499: #set ($homeTopPlayer = $homePlayers[$i])
500: $.fn.buildHomeBarChart('.${category}-top${i}.home', ${homeTopPlayer.stats[$category]}, $homeLimit, conf.homeTeamLighterColor);
501: #end
502: #end
503: #end
504:
505: #playerStatsScript('avg' $visitorStats.topStats['avg'] $homeStats.topStats['avg'] 1 1 2)
506: #playerStatsScript('h' $visitorStats.topStats['h'] $homeStats.topStats['h'] 100 100 2)
507: #playerStatsScript('bb' $visitorStats.topStats['bb'] $homeStats.topStats['bb'] 50 50 2)
508: #playerStatsScript('r' $visitorStats.topStats['r'] $homeStats.topStats['r'] 75 75 2)
509: #playerStatsScript('hd' $visitorStats.topStats['hd'] $homeStats.topStats['hd'] 35 35 2)
510: #playerStatsScript('ht' $visitorStats.topStats['ht'] $homeStats.topStats['ht'] 15 15 2)
511: #playerStatsScript('hr' $visitorStats.topStats['hr'] $homeStats.topStats['hr'] 25 25 2)
512: #playerStatsScript('rbi' $visitorStats.topStats['rbi'] $homeStats.topStats['rbi'] 100 100 2)
513: #playerStatsScript('sb' $visitorStats.topStats['sb'] $homeStats.topStats['sb'] 50 50 2)
514: #playerStatsScript('pw' $visitorStats.topStats['pw'] $homeStats.topStats['pw'] 15 15 2)
515: #playerStatsScript('sv' $visitorStats.topStats['sv'] $homeStats.topStats['sv'] 20 20 2)
516: #playerStatsScript('pk' $visitorStats.topStats['pk'] $homeStats.topStats['pk'] 120 120 2)
517: #playerStatsScript('era' $visitorStats.topStats['era'] $homeStats.topStats['era'] 5 5 2)
518:
519: $('.stats-value.visitor').css("background-color", conf.visitorTeamColor);
520: $('.stats-value.visitor.light').css("background-color", conf.visitorTeamLighterColor);
521: $('.stats-value.home').css("background-color", conf.homeTeamColor);
522: $('.stats-value.home.light').css("background-color", conf.homeTeamLighterColor);
523: });
524: </script>
525: </div>
526:
527:
528: #else
529: <div id="primetime-wrapper" class="primetime-baseball primetime-wrapper clearfix">
530:
531: <div class="primetime-overflow clearfix">
532: ## HEADER
533: <div id="primetime-header" class="grid-row">
534: <div class="grid-col grid-col-hdr">
535:
536: <div class="primetime-screen-controls clearfix">
537: <a href="#" class="full-screen-button pt-icon-resize-full"><span class="text">Switch</span></a>
538: <a href="#" class="normal-screen-button pt-icon-resize-small"><span class="text">Switch</span></a>
539: <a href="#" class="expand-button pt-icon-link-ext"><span class="text">Switch</span></a>
540: </div>
541:
542: <div class="pt-header clearfix">
543:
544: <div class="pt-team pt-team-away visitor-team-color"><img src="$stats.visitorTeamLogo" alt="" class="team-logo visitor-team-logo" /><span
545: class="team-record visitor-team-record"></span>
546: <h3 class="team-name visitor-team-name"></h3>
547: </div>
548:
549: <div class="pt-team pt-team-home home-team-color">
550: <span class="team-record home-team-record"></span>
551: <img src="$stats.homeTeamLogo" alt="" class="team-logo home-team-logo" />
552: <h3 class="team-name home-team-name"></h3>
553: </div>
554:
555: <div class="pt-match-scoreboard clearfix">
556: <p class="team-score visitor-team-score"></p>
557: <p class="team-score home-team-score"></p>
558:
559: <div class="pt-mtach-info">
560: <div class="bases"></div>
561: <div class="outs">
562: <div class="label"></div>
563: <div class="image"></div>
564: </div>
565: </div>
566:
567: <div class="pt-team-fouls">
568: <span class="visitor-team-fouls"></span>
569: <span class="home-team-fouls"></span>
570: <div class="pt-timeout clearfix" style="display: none">
571: <div class="timeout-qtr visitor-timeout-qtr">
572: <h3 class="timeout-label">Timeout</h3>
573:
574: </div>
575: <div class="timeout-qtr home-timeout-qtr">
576: <h3 class="timeout-label">Timeout</h3>
577:
578: </div>
579: </div>
580: </div>
581:
582: </div>
583:
584: <div id="pt-page-nav" class="pt-page-nav">
585: <a href="#" class="pt-menu">Menu</a>
586: <ul class="clearfix">
587: <li><a href="#live-action-title" data-stroke="1" data-id="#live-action-title">Live Action</a></li>
588: <li><a href="#line-score-title" data-stroke="2" data-id="#line-score-title">Line Score</a></li>
589: <li><a href="#lineups-title" data-stroke="3" data-id="#lineups-title">Lineups</a></li>
590: <li><a href="#scoring-plays-title" data-stroke="4" data-id="#scoring-plays-title">Scoring Plays</a></li>
591: <li><a href="#individual-stats-title" data-stroke="5" data-id="#individual-stats-title" data-tab-id="#stats-tabs">Individual Stats</a></li>
592: <li><a href="#team-comparison-title" data-stroke="6" data-id="#team-comparison-title" data-tab-id="#stats-tabs">Team Comparison</a></li>
593: <li><a href="#game-info-title" data-stroke="7" data-id="#game-info-title" data-tab-id="#stats-tabs">Game Information</a></li>
594: <li><a href="#play-by-play-title" data-stroke="8" data-id="#play-by-play-title" data-tab-id="#pbp-tabs">Play by Play</a></li>
595: </ul>
596: </div>
597:
598: </div>
599:
600: </div>
601: </div>
602: ## PRIMETIME HEADER
603:
604: ## GRID ROW CONTAINER
605: <div class="grid-row-container clearfix">
606: ## GRID ROW
607: #set ($gridRowClass = "grid-row no-video")
608: #if ($hasVideo)
609: #set ($gridRowClass = "grid-row")
610: #end
611:
612: <div id="firstPanelRow" class="$gridRowClass">
613:
614: #set ($gridCounter = 0)
615:
616: #set ($gridCounter = $gridCounter + 1)
617: <div id="pt-live-action-container" class="grid-col grid-col-v grid-liveaction grid-col${gridCounter}">
618: <h3 class="grid-title">
619: Recent Plays<span class="close">x</span>
620: </h3>
621: <div class="grid-content clearfix">
622: <span class="inning"></span>
623: <div class="clearfix">
624: <div class="container clearfix pt-live-action">
625: <table>
626: <thead>
627: <tr>
628: <th>Icon</th>
629: <th>Play</th>
630: </tr>
631: </thead>
632: <tbody>
633: </tbody>
634: </table>
635: </div>
636: </div>
637: </div>
638: </div>
639:
640: #set ($gridCounter = $gridCounter + 1)
641: <div class="bs-live-action grid-col grid-col-cd grid-col${gridCounter}">
642: <h3 id="live-action-title" class="grid-title">
643: Live Action <span class="close">x</span>
644: </h3>
645: <div class="grid-content clearfix">
646: <div class="top-text">
647: <span class="action-text inning"></span>
648: <span class="action-text balls"></span> <span class="label balls-label">Balls</span>
649: <span class="action-text strikes"></span> <span class="label strikes-label">Strikes</span>
650: <span class="action-text outs"></span> <span class="label">Outs</span>
651: </div>
652: <div class="clearfix on-field">
653:
654: </div>
655: </div>
656: </div>
657: </div>
658:
659: <div class="grid-row">
660: #set ($gridCounter = $gridCounter + 1)
661: <div class="grid-col grid-col${gridCounter}">
662: <h3 id="line-score-title" class="grid-title">
663: Line Score<span class="close">x</span>
664: </h3>
665: <div class="grid-content clearfix">
666: <div class="pt-line-score clearfix">
667: <table id="scoreByPeriod">
668: <thead>
669: <tr>
670: <th> </th>
671: </tr>
672: </thead>
673: <tbody>
674: <tr class="visitor">
675: <td><img src="" alt=""
676: class="team-logo visitor-team-logo" />
677: <span class="team-name visitor-team-name"></span></td>
678: </tr>
679: <tr class="home">
680: <td><img src="" alt=""
681: class="team-logo home-team-logo" />
682: <span class="team-name home-team-name"></span></td>
683: </tr>
684: </tbody>
685: </table>
686:
687: </div>
688: </div>
689: ## GRID CONTENT
690: </div>
691: ## LINE SCORE
692: </div>
693:
694: <div class="grid-row">
695: <div class="grid-col lineups clearfix">
696: <h3 id="lineups-title" class="grid-title">Lineups<span class="close">x</span></h3>
697: <div class="grid-content clearfix">
698: <div class="clearfix pt-team-stats">
699: <div class="pt-team-col pt-stats-team active clearfix">
700: <div class="pt-team clearfix">
701: <img src="" alt=""
702: class="team-logo visitor-team-logo" />
703: <h3 class="team-name visitor-team-name"></h3>
704: </div>
705: <div class="pt-stats-tabs clearfix">
706: <div class="pt-panes clearfix">
707: <div class="pt-row">
708: <table class="visitor-lineup display">
709: <thead>
710: <tr>
711: <th>Spot</th>
712: <th>Pos</th>
713: <th>#</th>
714: <th style="text-align: left">Player</th>
715: <th>Bats</th>
716: <th>Today</th>
717: </tr>
718: </thead>
719: <tbody></tbody>
720: </table>
721: </div>
722: </div>
723: </div>
724: </div>
725:
726: <div class="pt-team-col pt-home-team clearfix pt-stats-team">
727: <div class="pt-team clearfix">
728: <img src="" alt=""
729: class="team-logo home-team-logo" />
730: <h3 class="team-name home-team-name"></h3>
731: </div>
732: <div class="pt-stats-tabs clearfix">
733: <div class="pt-panes clearfix">
734: <div class="pt-row">
735: <table class="home-lineup display">
736: <thead>
737: <tr>
738: <th>Spot</th>
739: <th>Pos</th>
740: <th>#</th>
741: <th style="text-align: left">Player</th>
742: <th>Bats</th>
743: <th>Today</th>
744: </tr>
745: </thead>
746: <tbody></tbody>
747: </table>
748: </div>
749: </div>
750: </div>
751: </div>
752: </div>
753: </div>
754: </div>
755: </div>
756:
757: ## GRID ROW ## TABS
758: <div class="pt-game-info clearfix">
759:
760: <ul class="pt-tabs clearfix">
761: <li class="current"><a href="#stats-tabs">Statistics</a></li>
762: <li><a href="#pbp-tabs">Play By Play</a></li>
763: </ul>
764:
765: <div class="pt-tabs-panes clearfix">
766: <div id="stats-tabs" class="pt-tabs-pane clearfix">
767: <div class="grid-row">
768: <div class="grid-col">
769: <h3 id="scoring-plays-title" class="grid-title">
770: Scoring Plays<span class="close">x</span>
771: </h3>
772: <div class="grid-content clearfix ">
773: <div id="scoringPlayList" class="pt-scoring-plays clearfix ">
774:
775: </div>
776: </div>
777: </div>
778: </div>
779:
780: ## GRID ROW ## GRID ROW
781: <div class="grid-row">
782: #set ($gridCounter = $gridCounter + 1)
783: <div class="grid-col grid-ind-stats grid-col-is grid-col${gridCounter}">
784: <h3 id="individual-stats-title" class="grid-title">
785: Individual Stats<span class="close">x</span>
786: <span>
787: <img class="switchStats horizontal active" src="/info/primetime3/images/horizontal_view.png" />
788:
789: <img class="switchStats vertical " src="/info/primetime3/images/vertical_view.png" />
790: </span>
791: </h3>
792: <div class="grid-content clearfix">
793: <div class="pt-team-stats clearfix">
794:
795: <div id="visitorTeamIndividualStats" class="active pt-team-col clearfix pt-stats-team">
796:
797: <div class="pt-team clearfix">
798: <img src="" alt=""
799: class="team-logo visitor-team-logo active" />
800: <h3 class="team-name visitor-team-name"></h3>
801: </div>
802:
803: <div class="pt-stats-tabs clearfix">
804: <div class="pt-panes clearfix">
805: <div id="vOffenseTab" class="pt-pane pt-pane1 clearfix">
806: <div class="pt-row">
807: <table class="playerStats display"> <!-- starters -->
808: <thead>
809: <tr>
810: <th>Spot</th>
811: <th>#</th>
812: <th>Player, Pos</th>
813: <th>AB</th>
814: <th>R</th>
815: <th>H</th>
816: <th>RBI</th>
817: <th class="toHide">2B</th>
818: <th class="toHide">3B</th>
819: <th class="toHide">HR</th>
820: <th>BB</th>
821: <th>K</th>
822: <th class="toHide">LOB</th>
823: <th class="toHide">SB</th>
824: <th class="toHide">CS</th>
825: <th class="toHide">PO</th>
826: <th class="toHide">A</th>
827: <th class="toHide">E</th>
828: <th class="toHide">AVG</th>
829: </tr>
830: </thead>
831: <tbody></tbody>
832: <tfoot></tfoot>
833: </table>
834:
835: <table class="pitcherStats display"> <!-- starters -->
836: <thead>
837: <tr>
838: <th>Spot</th>
839: <th>#</th>
840: <th>Pitcher</th>
841: <th>IP</th>
842: <th>H</th>
843: <th>R</th>
844: <th>ER</th>
845: <th>BB</th>
846: <th>K(L)</th>
847: <th class="toHide">BF</th>
848: <th class="toHide">2B</th>
849: <th class="toHide">3B</th>
850: <th class="toHide">HR</th>
851: <th class="toHide">FO</th>
852: <th class="toHide">GO</th>
853: <th class="toHide">TP</th>
854: <th class="toHide">ST</th>
855: <th class="toHide">ERA</th>
856: </tr>
857: </thead>
858: <tbody></tbody>
859: <tfoot></tfoot>
860: </table>
861: </div>
862: </div>
863: </div>
864: </div>
865: </div>
866:
867: <div id="homeTeamIndividualStats" class="clearfix pt-team-col pt-home-team pt-stats-team">
868:
869: <div class="pt-team clearfix">
870: <img src="" alt=""
871: class="team-logo home-team-logo active" />
872: <h3 class="team-name home-team-name"></h3>
873: </div>
874:
875: <div class="pt-stats-tabs clearfix">
876: <div class="pt-panes clearfix">
877: <div class="pt-pane clearfix">
878: <div class="pt-row">
879: <table class="playerStats display"> <!-- starters -->
880: <thead>
881: <tr>
882: <th>Spot</th>
883: <th>#</th>
884: <th>Player, Pos</th>
885: <th>AB</th>
886: <th>R</th>
887: <th>H</th>
888: <th>RBI</th>
889: <th class="toHide">2B</th>
890: <th class="toHide">3B</th>
891: <th class="toHide">HR</th>
892: <th>BB</th>
893: <th>K</th>
894: <th class="toHide">LOB</th>
895: <th class="toHide">SB</th>
896: <th class="toHide">CS</th>
897: <th class="toHide">PO</th>
898: <th class="toHide">A</th>
899: <th class="toHide">E</th>
900: <th class="toHide">AVG</th>
901: </tr>
902: </thead>
903: <tbody></tbody>
904: <tfoot></tfoot>
905: </table>
906:
907: <table class="pitcherStats display"> <!-- starters -->
908: <thead>
909: <tr>
910: <th>Spot</th>
911: <th>#</th>
912: <th>Pitcher</th>
913: <th>IP</th>
914: <th>H</th>
915: <th>R</th>
916: <th>ER</th>
917: <th>BB</th>
918: <th>K(L)</th>
919: <th class="toHide">BF</th>
920: <th class="toHide">2B</th>
921: <th class="toHide">3B</th>
922: <th class="toHide">HR</th>
923: <th class="toHide">FO</th>
924: <th class="toHide">GO</th>
925: <th class="toHide">TP</th>
926: <th class="toHide">ST</th>
927: <th class="toHide">ERA</th>
928: </tr>
929: </thead>
930: <tbody></tbody>
931: <tfoot></tfoot>
932: </table>
933: </div>
934:
935: </div>
936: </div>
937: </div>
938: </div>
939:
940: </div>
941: </div>
942: ## GRID CONTENT
943: </div>
944: ## INDIVIDUAL STATS
945: </div>
946:
947: ## GRID ROW ##GRID ROW
948: <div class="grid-row">
949: #set ($gridCounter = $gridCounter + 1)
950: <div class="grid-col grid-col-tc grid-col${gridCounter}">
951: <h3 id="team-comparison-title" class="grid-title">
952: Team Comparison<span class="close">x</span>
953: </h3>
954: <div class="grid-content clearfix">
955: <div class="pt-team-compare clearfix">
956: <table id="teamCompare">
957: <thead>
958: <tr>
959: <th><img src="" alt="" class="team-logo visitor-team-logo" /><br />
960: <span class="team-name visitor-team-name"></span></th>
961: <th> <span>Hitting</span></th>
962: <th><img src="" alt="" class="team-logo home-team-logo" /><br />
963: <span class="team-name home-team-name"></span></th>
964: </tr>
965: </thead>
966:
967: <tbody>
968: <tr class="stats-w2outs">
969: <td></td>
970: <td class="stats-cat">with two outs</td>
971: <td></td>
972: </tr>
973:
974: <tr class="stats-rbi2-outs">
975: <td></td>
976: <td class="stats-cat">2-out RBIs</td>
977: <td></td>
978: </tr>
979:
980: <tr class="stats-wrunners">
981: <td></td>
982: <td class="stats-cat">with runners on</td>
983: <td></td>
984: </tr>
985:
986: <tr class="stats-wrbiops">
987: <td></td>
988: <td class="stats-cat">with runners in scoring pos</td>
989: <td></td>
990: </tr>
991:
992: <tr class="stats-leadoff">
993: <td></td>
994: <td class="stats-cat">Lead off</td>
995: <td></td>
996: </tr>
997:
998: <tr class="stats-rbi3rd">
999: <td></td>
1000: <td class="stats-cat">With runners on, less than 2 outs</td>
1001: <td></td>
1002: </tr>
1003:
1004: <tr class="stats-wloaded">
1005: <td></td>
1006: <td class="stats-cat">With bases loaded</td>
1007: <td></td>
1008: </tr>
1009:
1010: </tbody>
1011:
1012: </table>
1013: </div>
1014: <br>
1015: <br>
1016: <div class="pt-team-compare clearfix">
1017: <table id="teamCompare">
1018: <thead>
1019: <tr>
1020: <th></th>
1021: <th> <span>Pitching</span><br></th>
1022: <th></th>
1023: </tr>
1024: </thead>
1025:
1026: <tbody>
1027: <tr class="stats-pitches">
1028: <td></td>
1029: <td class="stats-cat">total pitches</td>
1030: <td></td>
1031: </tr>
1032:
1033: <tr class="stats-strikes">
1034: <td></td>
1035: <td class="stats-cat">balls/strikes</td>
1036: <td></td>
1037: </tr>
1038:
1039: <tr class="stats-strikesp">
1040: <td></td>
1041: <td class="stats-cat">Strike percentage</td>
1042: <td></td>
1043: </tr>
1044:
1045: <tr class="stats-bf">
1046: <td></td>
1047: <td class="stats-cat">batters faced</td>
1048: <td></td>
1049: </tr>
1050:
1051: <tr class="stats-pitching-fly">
1052: <td></td>
1053: <td class="stats-cat">Ground Ball/Fly Ball</td>
1054: <td></td>
1055: </tr>
1056:
1057: <tr class="stats-pitching-leadoff">
1058: <td></td>
1059: <td class="stats-cat">vs. Leadoff</td>
1060: <td></td>
1061: </tr>
1062:
1063: <tr class="stats-pitching-wrunners">
1064: <td></td>
1065: <td class="stats-cat">With Runners on</td>
1066: <td></td>
1067: </tr>
1068:
1069: </tbody>
1070: </table>
1071: </div>
1072: </div>
1073: ## GRID CONTENT
1074: </div>
1075: ## TEAM COMPARE
1076: </div>
1077:
1078:
1079: ## GRID ROW ## GRID ROW
1080: <div class="grid-row">
1081: #set ($gridCounter = $gridCounter + 1)
1082: <div class="grid-col grid-col-gi grid-col${gridCounter}">
1083: <h3 id="game-info-title" class="grid-title">
1084: Game Information<span class="close">x</span>
1085: </h3>
1086: <div class="grid-content clearfix">
1087: <div class="pt-game-information clearfix">
1088:
1089: <div class="pt-row clearfix">
1090: <center>
1091: <div class="date-time pt-col">
1092: <span id="gameInformationDate" class="date"></span>
1093: <span id="gameInformationTime" class="time"></span>
1094: <h3>Date & Time</h3>
1095: </div>
1096:
1097: <div class="game-location pt-col">
1098: <span id="gameInformationLocation" class="location"></span>
1099: <h3>Location</h3>
1100: </div>
1101:
1102: <div class="game-venue pt-col">
1103: <span id="gameInformationVenue" class="venue"></span>
1104: <h3>Venue</h3>
1105: </div>
1106:
1107: <div class="weather pt-col">
1108:
1109: <div class="weather-condition">
1110: <span id="gameInformationTemperature" class="temp"></span>
1111: <span id="gameInformationCondition" class="condition"></span>
1112: </div>
1113: <h3>Weather</h3>
1114: </div>
1115: </center>
1116: </div>
1117:
1118: </div>
1119: </div>
1120: ## GRID CONTENT
1121: </div>
1122: ## GENERAL INFORMATION
1123: </div>
1124: ## GRID ROW
1125:
1126: </div>
1127:
1128: ## PLAY BY PLAY TABS
1129: <div id="pbp-tabs" class="pt-tabs-pane clearfix">
1130: ## GRID ROW
1131: <div class="grid-row">
1132: #set ($gridCounter = $gridCounter + 1)
1133: <div class="grid-col grid-col-ds grid-col${gridCounter}">
1134: <h3 id="play-by-play-title" class="grid-title">
1135: Play by Play<span class="close">x</span>
1136: </h3>
1137: <div class="grid-content clearfix pt-drive-summary">
1138:
1139: </div>
1140: ## GRID CONTENT
1141: </div>
1142: ## DRIVE SUMMARY
1143: </div>
1144: ## GRID ROW
1145: </div>
1146: ## PLAY BY PLAY TABS
1147: </div>
1148: ## PT TABS PANES
1149: </div>
1150: ## PRIME TIME GAME INFO
1151: </div>
1152: ## GRID ROW CONTAINER
1153:
1154: ## FOOTER
1155: $website.include("primetime-footer")
1156:
1157: </div>
1158: ## PRIME TIME OVERFLOW
1159: </div>
1160: ## PRIME TIME WRAPPER
1161: #end
1162:
1163: #set ($showWiki = true)
1164: #set ($showWiki = $showWikiVar)
1165: #if ($showWiki == true)
1166: $wiki.su
1167: #end
1168: ## END OF PRIMETIME
1169:
1170: #else
1171:
1172: ## BOX SCORE REPORT
1173: #set ($teamNodes = $document.selectNodes("bsgame/team"))
1174: #set ($home = $document.selectSingleNode("bsgame/team[@vh='H']"))
1175: #set ($visitor = $document.selectSingleNode("bsgame/team[@vh='V']"))
1176: #set ($homeTeam = $home.valueOf("@name"))
1177: #set ($visitorTeam = $visitor.valueOf("@name"))
1178: #set ($visname = $visitorTeam)
1179: #set ($homename = $homeTeam)
1180: #set ($homeScore = $tool.math.toInteger($home.valueOf("linescore/@runs")))
1181: #set ($visitorScore = $$tool.math.toInteger($visitor.valueOf("linescore/@runs")))
1182: #set ($linkPlayers = $stats.linkPlayers)
1183: #set ($linkPlayersBase = $stats.linkPlayersBase)
1184: #set ($linkTeams = $stats.linkTeams)
1185: #set ($linkTeamsBase = $stats.linkTeamsBase)
1186:
1187: #set ($isDakStats = false)
1188: #if ($document.valueOf("bsgame/@source") == "DakStats Baseball/Softball")
1189: #set ($isDakStats = true)
1190: #end
1191:
1192: #set ($dateVal = $document.valueOf("bsgame/venue/@date"))
1193: #set ($date = $tool.date.toDate("MM/dd/yyyy", $dateVal))
1194: #set ($time = $document.valueOf("bsgame/venue/@time"))
1195: #if ($time.length() == 0)
1196: #set ($time = $document.valueOf("bsgame/venue/@start"))
1197: #end
1198: #set ($location = $document.valueOf("bsgame/venue/@location").trim())
1199: #set ($stadium = $document.valueOf("bsgame/venue/@stadium").trim())
1200: #set ($attend = $document.valueOf("bsgame/venue/@attend").trim())
1201: #set ($duration = $document.valueOf("bsgame/venue/@duration").trim())
1202: #set ($weather = $document.valueOf("bsgame/venue/@weather").trim())
1203: #set ($temp = $document.valueOf("bsgame/venue/@temp").trim())
1204: #set ($wind = $document.valueOf("bsgame/venue/@wind").trim())
1205: #set ($umpHp = $document.valueOf("bsgame/venue/umpires/@hp").trim())
1206: #set ($umpFb = $document.valueOf("bsgame/venue/umpires/@first").trim())
1207: #set ($umpSb = $document.valueOf("bsgame/venue/umpires/@second").trim())
1208: #set ($umpTb = $document.valueOf("bsgame/venue/umpires/@third").trim())
1209:
1210: #set ($inningNodes = $document.selectNodes("bsgame/plays/inning"))
1211: #set ($hasPlayByPlay = $inningNodes.size() > 0)
1212: #set ($pldInnings = $tool.math.toInteger($home.selectNodes("linescore/lineinn").size()))
1213:
1214: #set ($hasScoringSummary = false)
1215: #if ($document.selectNodes("bsgame/plays/inning/batting/play/batter/@hr").size() > 0 ||
1216: $document.selectNodes("bsgame/plays/inning/batting/play/batter/@scored").size() > 0 ||
1217: $document.selectNodes("bsgame/plays/inning/batting/play/runner/@scored").size() > 0)
1218: #set ($hasScoringSummary = true)
1219: #end
1220:
1221: #if ($stats.pageUrl.length() > 0 && !$stats.pageUrl.contains("?"))
1222: #set ($paramSep = "?")
1223: #else
1224: #set ($paramSep = "&")
1225: #end
1226:
1227: ## MACROS STARTS HERE
1228: #macro (printPdfHeader $title)
1229: <div class="stats-fullbox clearfix">
1230: <table>
1231: <tr>
1232: <td class="align-center"><h4>$title</h4></td>
1233: </tr>
1234: </table>
1235: </div>
1236: #end
1237:
1238: #macro (printPlayerName $node $class)
1239: #if ($node.valueOf("@playerId").length() > 0 && $linkPlayers && $node.valueOf("../@link").length() > 0)
1240: <a href="$!linkPlayersBase?id=${node.valueOf("@playerId")}" class="player-name ${class}">$node.valueOf("@name")</a>
1241: #else
1242: <span class="player-name ${class}">$node.valueOf("@name")</span>
1243: #end
1244: #end
1245:
1246: #macro (printTeamName $team)
1247: #if ($team.valueOf("@link").length() > 0 && $linkTeams)
1248: <a href="$!linkTeamsBase?id=${team.valueOf("@teamId")}" class="team-name">
1249: $team.valueOf("@name")
1250: </a>
1251: #else
1252: <span class="team-name">$team.valueOf("@name")</span>
1253: #end
1254: #end
1255:
1256: #macro (printInningLabel $inning)
1257: #set ($inning = $tool.math.toInteger($inning))
1258: #if ($inning == 1)
1259: ${inning}st
1260: #elseif ($inning == 2)
1261: ${inning}nd
1262: #elseif ($inning == 3)
1263: ${inning}rd
1264: #else
1265: ${inning}th
1266: #end
1267: #end
1268:
1269: #macro (printInningStatus)
1270: #set ($currentInn = "")
1271: #set ($currentOuts = "")
1272: #if ($document.valueOf("bsgame/status/@inning").length() > 0)
1273: #set ($inning = $document.valueOf("bsgame/status/@inning"))
1274: #if ($document.valueOf("bsgame/status/@vh") == "H")
1275: #set ($currentInn = "BOT #printInningLabel($inning)")
1276: #elseif ($document.valueOf("bsgame/status/@vh") == "V")
1277: #set ($currentInn = "TOP #printInningLabel($inning)")
1278: #end
1279: #else
1280: #set ($currentInn = "In progress")
1281: #end
1282: #if ($document.valueOf("bsgame/status/@outs").length() > 0)
1283: #set ($outs = $document.valueOf("bsgame/status/@outs"))
1284: #set ($currentOuts = "${outs} Outs")
1285: #end
1286: <span>$!currentInn — $currentOuts</span>
1287: #end
1288:
1289: #macro (printPlays $battingNode $inning)
1290: <table role="presentation">
1291: #set ($vh = $battingNode.valueOf("@vh"))
1292: #foreach ($play in $battingNode.selectNodes("play"))
1293: #if ($velocityCount == 1)
1294: <tr><td>
1295: #if($vh == "V")
1296: <div class="caption">
1297: <h3>
1298: <span class="team-logo">
1299: #if ($stats.view != "pdf")
1300: <img class="team-logo" src="$stats.visitorTeamLogo" alt="" />
1301: #end
1302: <span class="offscreen">$visitorTeam</span>
1303: </span>
1304: Top of #printInningLabel($node.valueOf("@number"))Inning
1305: </h3>
1306: </div>
1307: #else
1308: <div class="caption">
1309: <h3>
1310: <span class="team-logo">
1311: #if ($stats.view != "pdf")
1312: <img class="team-logo" src="$stats.homeTeamLogo" alt="" />
1313: #end
1314: <span class="offscreen">$homeTeam</span>
1315: </span>
1316: Bottom of #printInningLabel($node.valueOf("@number"))Inning
1317: </h3>
1318: </div>
1319: #end
1320: </td></tr>
1321: #end
1322: <tr>
1323: <td class="text">
1324: #if ($play.valueOf("runner/@scored") == 1 ||
1325: $play.valueOf("batter/@hr") == 1 ||
1326: $play.valueOf("batter/@scored") == 1)
1327: <strong>$play.valueOf("narrative/@text")</strong>
1328: #else
1329: $play.valueOf("narrative/@text")
1330: ## print outs on play by play
1331: #set($outs = $play.valueOf("@outs"))
1332: #if($play.valueOf("batter/@out") == 1)
1333: #set($outs = $tool.math.add($outs, 1))
1334: #end
1335: #foreach ($runner in $play.selectNodes("runner"))
1336: #if($runner.valueOf("@out") == 1)
1337: #set($outs = $tool.math.add($outs, 1))
1338: #end
1339: #end
1340: #if(($play.valueOf("batter/@out") == 1) || ($play.valueOf("runner/@out") == 1))
1341: ($outs out)
1342: #end
1343: #end
1344: </td>
1345: </tr>
1346: #end ## foreach
1347:
1348: #set ($innsummaryCategories = {"innsummary/@r": "Runs", "innsummary/@h": "Hits", "innsummary/@e" :"Errors", "innsummary/@lob": "LOB"})
1349: #if ($battingNode.selectNodes("innsummary").size() > 0)
1350: <tr class="totals">
1351: <td class="text">
1352: <strong>Inning Summary: </strong>
1353: #foreach ($attr in $innsummaryCategories.entrySet())
1354: #set ($attrVal = $battingNode.valueOf($attr.key))
1355: #if ($velocityCount > 1), #end
1356: #if ($attrVal.length() > 0)
1357: $attrVal $attr.value
1358: #end
1359: #end
1360: </td>
1361: </tr>
1362: #end
1363: </table>
1364: #end
1365:
1366: #macro (printScoringSummary)
1367: <table class="striped">
1368: <caption class="caption"><h2>Scoring Summary</h2></caption>
1369: <thead>
1370: <th class="col-head text" scope="col">Innings</th>
1371: <th class="col-head text" scope="col">Play</th>
1372: <th class="col-head nowrap" scope="col">V - H</th>
1373: </thead>
1374: <tbody>
1375: #set ($visitorInningScore = 0)
1376: #set ($homeInningScore = 0)
1377: #foreach ($node in $inningNodes)
1378: #foreach ($battingNode in $node.selectNodes("batting"))
1379: #set ($vh = $battingNode.valueOf("@vh"))
1380: #set ($isScored = !($tool.math.toInteger($battingNode.valueOf("innsummary/@r")) == 0))
1381: #if ($isScored)
1382: #foreach ($play in $battingNode.selectNodes("play"))
1383: #if ($play.valueOf("runner/@scored") == 1 ||
1384: $play.valueOf("batter/@scored") == 1 ||
1385: $play.valueOf("batter/@hr") == 1)
1386: #set ($inningScore = 0)
1387: #foreach ($pitcher in $play.selectNodes("pitcher"))
1388: #set ($inningScore = $tool.math.add($inningScore, $pitcher.valueOf("@r")))
1389: #end
1390: <tr>
1391: #if($vh == "V")
1392: #set ($visitorInningScore = $tool.math.add($visitorInningScore, $inningScore))
1393: <th class="row-head nowrap text" scope="row">
1394: <div class="team-logo">
1395: #if ($stats.view != "pdf")
1396: <img class="team-logo" src="$stats.visitorTeamLogo" alt="" />
1397: #end
1398: <span class="offscreen">#printTeamName($visitor)</span>
1399: </div>
1400: <span class="inning"><span class="gicon gicon-up1"></span>#printInningLabel($node.valueOf("@number"))</span>
1401: </th>
1402: #else
1403: #set ($homeInningScore = $tool.math.add($homeInningScore, $inningScore))
1404: <th class="row-head nowrap text" scope="row">
1405: <div class="team-logo">
1406: #if ($stats.view != "pdf")
1407: <img class="team-logo" src="$stats.homeTeamLogo" alt="" />
1408: #end
1409: <span class="offscreen">#printTeamName($home)</span>
1410: </div>
1411: <span class="inning"><span class="gicon gicon-down1"></span>#printInningLabel($node.valueOf("@number"))</span>
1412: </th>
1413: #end
1414: <td class="text">$play.valueOf("narrative/@text")</td>
1415: <td class="total nowrap">$visitorInningScore - $homeInningScore</td>
1416: </tr>
1417: #end
1418: #end
1419: #end
1420: #end
1421: #end
1422: </tbody>
1423: </table>
1424: #end
1425:
1426: #macro (printPlayByPlay)
1427: #set ($containerElem = "section")
1428: #if ($stats.view == "pdf")
1429: #set ($containerElem = "div")
1430: #end
1431: <div class="stats-wrap clearfix">
1432: #if ($hasScoringSummary)
1433: <$containerElem class="stats-box half clearfix" role="region" aria-label="Scoring Summary">
1434: #printScoringSummary
1435: </$containerElem>
1436: #end
1437: <$containerElem class="stats-box half clearfix" role="region" aria-label="All Plays">
1438: <div class="caption"><h2>All Plays</h2></div>
1439: <div class="tab-container secondary vertical clearfix" data-module="stats/tabs" data-type="secondary">
1440: #if ($stats.view != "pdf")
1441: <div class="tab-nav" data-module="jscroll" data-momentum="false">
1442: <div class="clearfix">
1443: <ul class="clearfix">
1444: #set ($paramInning = 1)
1445: #set ($paramInning = $tool.math.toInteger($request.getParameter("inning")))
1446: #foreach ($inning in [1..$pldInnings])
1447: #set ($class = "")
1448: #if ($paramInning > 0 && $paramInning == $velocityCount)
1449: #set ($class = "active")
1450: #end
1451: <li class="${class}">
1452: <a href="${stats.pageUrl}${paramSep}view=plays&inning=${velocityCount}" title="#printInningLabel($velocityCount)Inning">$velocityCount</a>
1453: </li>
1454: #end
1455: </ul>
1456: </div>
1457: </div>
1458: #end
1459: <div class="tab-panels">
1460: #foreach ($node in $inningNodes)
1461: #set ($class = "tab-panel clearfix")
1462: #if ($paramInning > 0 && $paramInning == $velocityCount)
1463: #set ($class = "tab-panel active clearfix")
1464: #end
1465: <$containerElem class="${class}" role="region" aria-label="#printInningLabel($velocityCount) Inning">
1466: #printPlays($node.selectSingleNode("batting[@vh='V']"), $velocityCount)
1467: #printPlays($node.selectSingleNode("batting[@vh='H']"), $velocityCount)
1468: </$containerElem>
1469: #end
1470: </div>
1471: </div>
1472: </$containerElem>
1473: </div>
1474: #end
1475:
1476: #macro (printStatCols $node $attrList $hideSeason)
1477: #foreach ($attr in $attrList)
1478: #if($hideSeason && $attr.contains("season"))
1479: <td>-</td>
1480: #else
1481: #set ($attrVal = $node.valueOf($attr))
1482: #if ($attrVal.length() > 0)
1483: <td>$attrVal</td>
1484: #else
1485: <td>0</td>
1486: #end
1487: #end
1488: #end
1489: #end
1490:
1491: #macro (printActionSummary $nodes $attrList $caption $strPitchesStrikes)
1492: #set ($catMap = {})
1493: #foreach ($attr in $attrList.entrySet())
1494: #foreach ($node in $nodes)
1495: #set ($playerName = $node.valueOf("@name"))
1496:
1497: #set ($str = "")
1498: #set ($attrValue = "")
1499: #set ($attrValue = $tool.math.toInteger($node.valueOf($attr.key)))
1500: #if ($attrValue > 0)
1501: #if ($attrValue > 1)
1502: #set ($str = "${str}${playerName} (${attrValue})")
1503: #else
1504: #set ($str = "${str}${playerName}")
1505: #end
1506: #if ($catMap.containsKey($attr.value))
1507: #set ($ignore = $catMap.get($attr.value).add($str))
1508: #else
1509: #set ($ignore = $catMap.put($attr.value, [$str]))
1510: #end
1511: #end
1512: #end
1513: #end
1514:
1515: #if ($catMap.size() > 0 || $strPitchesStrikes.length() > 0)
1516: <div class="stats-summary">
1517: <div class="caption">$caption</div>
1518: #foreach ($entry in $catMap.entrySet())
1519: <div>
1520: <strong>$entry.key:</strong>
1521: <span>
1522: #foreach ($val in $entry.value)
1523: #if ($velocityCount > 1), #end
1524: $val
1525: #end
1526: </span>
1527: </div>
1528: #end
1529:
1530: #if ($strPitchesStrikes.length() > 0)
1531: <div><strong>Pitches-Strikes:</strong> $strPitchesStrikes</div>
1532: #end
1533: </div>
1534: #end
1535: #end
1536:
1537: #macro (printHittingStats $team)
1538: #set ($spotList = {})
1539: #set ($hitterList = [])
1540: #set ($starterPitcherSpot = 0)
1541: ## In scoresheet mode, we need to find the starter pitcher spot, to include pitcher subs in the same spot
1542: #if (!$hasPlayByPlay)
1543: #foreach ($node in $team.selectNodes("player/hitting"))
1544: #set ($playerNode = $node.selectSingleNode(".."))
1545: #if ($playerNode.valueOf("@gs") == 1 && $playerNode.valueOf("@pos") == "p")
1546: #set ($starterPitcherSpot = $tool.math.toInteger($playerNode.valueOf("@spot")))
1547: #end
1548: #end
1549: #end
1550: #foreach ($node in $team.selectNodes("player/bseason"))
1551: #if( $tool.math.toInteger($node.valueOf("@ab")) > 0)
1552: #set ($accumlatedStats = true)
1553: #break
1554: #end
1555: #end
1556: #foreach ($node in $team.selectNodes("player/hitting"))
1557: #set ($playerNode = $node.selectSingleNode(".."))
1558: #set ($spot = 0)
1559: #if ($playerNode.valueOf("@spot").length() > 0)
1560: #set ($spot = $tool.math.toInteger($playerNode.valueOf("@spot")))
1561: ## Only for scoresheet mode
1562: #if (!$hasPlayByPlay && $spot == 0)
1563: #if ($playerNode.valueOf("@pos") == "p")
1564: #set ($spot = $starterPitcherSpot) ## The pitcher player subs must come after starter pitcher with identation
1565: #else
1566: #set ($spot = 99) ## The position player subs must come after starters
1567: #end
1568: #end
1569: #end
1570:
1571: #if ($spotList.containsKey($spot)) ## for each spot, there can be multiple hitters
1572: #if ($playerNode.valueOf("@gs") == 1)
1573: #set ($ignore = $spotList.get($spot).add(0, $playerNode)) ## if game starter then it should come before subs in the list
1574: #else
1575: #set ($ignore = $spotList.get($spot).add($playerNode))
1576: #end
1577: #else
1578: #set ($ignore = $spotList.put($spot, [$playerNode]))
1579: #end
1580: #end
1581:
1582: #if ($spotList.size() > 0)
1583: #set ($spotList = $tool.sorter.sort($spotList.entrySet(), "key"))
1584: #foreach ($entry in $spotList)
1585: #set ($bool = $hitterList.addAll($entry.value))
1586: #end
1587: #end
1588:
1589: #set ($hittingCategories = {"hitting/@ab": "AB", "hitting/@r": "R", "hitting/@h" :"H", "hitting/@rbi": "RBI", "hitting/@bb": "BB", "hitting/@so": "SO", "hsitsummary/@lob": "LOB"})
1590: #if($accumlatedStats)
1591: #set ($ignore = $hittingCategories.put("bseason/@ba", "AVG"))
1592: #end
1593:
1594: <div class="scrollable">
1595: <div class="clearfix">
1596: <div class="lineup-table">
1597: <table class="striped">
1598: <caption class="caption"><h2>#printTeamName($team) <span class="offscreen">Batters</span></h2></caption>
1599: <thead>
1600: <tr>
1601: <th scope="col" class="text pinned-col col-head">Hitters</th>
1602: #foreach ($entry in $hittingCategories.entrySet())
1603: <th scope="col" class="col-head">$entry.value</th>
1604: #end
1605: </tr>
1606: </thead>
1607: <tbody>
1608: #foreach ($playerNode in $hitterList)
1609: <tr>
1610: <th scope="row" class="row-head pinned-col text">
1611: #set ($isSubstitute = $playerNode.valueOf("@sub").length() > 0)
1612: #set ($playerClass = "")
1613: #set ($batterPos = $playerNode.valueOf("@pos"))
1614: #if ($isSubstitute)
1615: #set ($playerClass = "sub")
1616: #set ($batterPos = $playerNode.valueOf("@atpos"))
1617: #end
1618: #printPlayerName($playerNode $playerClass)
1619: #if ($batterPos.length() > 0)<span>$batterPos</span>#end
1620: </th>
1621: #printStatCols($playerNode $hittingCategories.keySet() false)
1622: </tr>
1623: #end
1624: </tbody>
1625: #set ($totalNode = $team.selectSingleNode("totals"))
1626: <tbody>
1627: <tr class="totals">
1628: <th scope="row" class="row-head pinned-col text">Totals</th>
1629: #printStatCols($totalNode $hittingCategories.keySet() true)
1630: </tr>
1631: </tbody>
1632: </table>
1633: </div>
1634: </div>
1635: </div>
1636:
1637: ## HITTING SUMMARY
1638: #set ($battingAttrList = {"hitting/@double": "2B", "hitting/@triple": "3B", "hitting/@hr": "HR", "hitting/@rbi": "RBI", "hitting/@sh": "Sac", "hitting/@sf": "Sac Fly", "hitting/@gdp": "GIDP"})
1639: #printActionSummary($hitterList, $battingAttrList, "Batting", "")
1640:
1641: #set ($baseRunningAttrList = {"hitting/@sb": "SB", "hitting/@cs": "CS"})
1642: #printActionSummary($hitterList, $baseRunningAttrList, "Baserunning", "")
1643:
1644: #set ($fieldingAttrList = {"fielding/@e": "E", "fielding/@indp": "DP"})
1645: #printActionSummary($hitterList, $fieldingAttrList, "Fielding", "")
1646: #end
1647:
1648: #macro (printPitcherStat $pitcherNode)
1649: #set ($label = "")
1650: #set ($val = "")
1651:
1652: #set ($win = $pitcherNode.valueOf("pitching/@win"))
1653: #set ($loss = $pitcherNode.valueOf("pitching/@loss"))
1654: #set ($save = $pitcherNode.valueOf("pitching/@save"))
1655:
1656: #if ($win.length() > 0 && $win != "0")
1657: #set ($label = "W")
1658: #set ($val = $win)
1659: #elseif ($loss.length() > 0 && $loss != "0")
1660: #set ($label = "L")
1661: #set ($val = $loss)
1662: #elseif ($save.length() > 0 && $save != "0")
1663: #set ($label = "Sv")
1664: #set ($val = $save)
1665: #end
1666: #if ($label.length() > 0)
1667: ($label#if (!$isDakStats), $val#end)
1668: #end
1669: #end
1670:
1671: #macro (printPitchingStats $team)
1672: #set ($appearanceList = {})
1673: #set ($pitcherList = [])
1674: #foreach ($node in $team.selectNodes("player/pitching[@appear]"))
1675: #set ($appearance = -1)
1676: #set ($appearance = $tool.math.toInteger($node.valueOf("@appear")))
1677: #if ($appearance > 0)
1678: #set ($playerNode = $node.selectSingleNode(".."))
1679: #set ($ignore = $appearanceList.put($appearance, $playerNode))
1680: #end
1681: #end
1682:
1683: #if ($appearanceList.size() > 0)
1684: #set ($appearanceList = $tool.sorter.sort($appearanceList.entrySet(), "key"))
1685: #foreach ($entry in $appearanceList)
1686: #set ($bool = $pitcherList.add($entry.value))
1687: #end
1688: #end
1689:
1690: #foreach ($node in $team.selectNodes("player/pseason"))
1691: #if( $tool.math.toInteger($node.valueOf("@ip")) > 0)
1692: #set ($accumlatedStats = true)
1693: #break
1694: #end
1695: #end
1696:
1697: #set ($pitchingCategories = {"pitching/@ip": "IP", "pitching/@h": "H", "pitching/@r" :"R", "pitching/@er": "ER", "pitching/@bb": "BB", "pitching/@so": "SO", "pitching/@hr": "HR"})
1698: #if($accumlatedStats)
1699: #set ($ignore = $pitchingCategories.put("pseason/@era","ERA"))
1700: #end
1701:
1702: <div class="scrollable">
1703: <div class="clearfix">
1704: <div class="lineup-table">
1705: <table class="striped">
1706: <caption class="caption"><h2>#printTeamName($team) <span class="offscreen">Pitchers</span></h2></caption>
1707: <thead>
1708: <tr>
1709: <th scope="col" class="text pinned-col col-head">Pitchers</th>
1710: #foreach ($entry in $pitchingCategories.entrySet())
1711: <th scope="col" class="col-head">$entry.value</th>
1712: #end
1713: </tr>
1714: </thead>
1715: <tbody>
1716: #foreach ($playerNode in $pitcherList)
1717: <tr>
1718: <th scope="row" class="row-head pinned-col text">
1719: #printPlayerName($playerNode "")
1720: #printPitcherStat($playerNode)
1721: </th>
1722: #printStatCols($playerNode $pitchingCategories.keySet() false)
1723: </tr>
1724: #end
1725: </tbody>
1726: <tbody>
1727: #set ($totalNode = $team.selectSingleNode("totals"))
1728: <tr class="totals">
1729: <th scope="row" class="row-head pinned-col text">Totals</th>
1730: #printStatCols($totalNode $pitchingCategories.keySet() true)
1731: </tr>
1732: </tbody>
1733: </table>
1734: </div>
1735: </div>
1736: </div>
1737:
1738: #set ($strPitchesStrikes = "")
1739: #foreach ($playerNode in $pitcherList)
1740: #set ($playerName = $playerNode.valueOf("@name"))
1741:
1742: #set ($totalPitches = $playerNode.valueOf("pitching/@pitches"))
1743: #set ($totalStrikes = $playerNode.valueOf("pitching/@strikes"))
1744: #if ($totalPitches.length() <= 0 || $totalStrikes.length() <= 0)
1745: #set ($totalPitches = 0)
1746: #set ($totalStrikes = 0)
1747: #set ($playerShortName = $playerNode.valueOf("@shortname"))
1748: #foreach ($play in $document.selectNodes("//play[@pitcher]"))
1749: #if ($play.valueOf("@pitcher") == $playerShortName)
1750: #set ($pitchText = "")
1751: #set ($pitchText = $play.valueOf("pitches/@text")) ## this is in the format BBKF
1752: #if ($pitchText.length() > 0)
1753: #set ($totalPitches = $totalPitches + $pitchText.length())
1754: #set ($totalStrikes = $totalStrikes + $pitchText.replace("B", "").replace("H", "").length())
1755: #end
1756: #end
1757: #end
1758: #else
1759: #set ($totalPitches = $tool.math.toInteger($totalPitches))
1760: #set ($totalStrikes = $tool.math.toInteger($totalStrikes))
1761: #end
1762: #if ($totalPitches > 0 && $totalStrikes > 0)
1763: #if ($strPitchesStrikes.length() > 0)
1764: #set ($strPitchesStrikes = "${strPitchesStrikes}, ")
1765: #end
1766: #set ($strPitchesStrikes = "${strPitchesStrikes}$playerName (${totalPitches}-${totalStrikes})")
1767: #end
1768: #end
1769:
1770: ## PITCHING SUMMARY
1771: #set ($pitchingAttrList = {"pitching/@bf": "Batters faced", "pitching/@wp": "WP", "pitching/@bk": "BK","pitching/@hbp": "HBP", "pitching/@ibb": "IBB"})
1772: #printActionSummary($pitcherList, $pitchingAttrList, "Pitching", $strPitchesStrikes)
1773: #end
1774:
1775: #macro (printTabControl $teamName $id)
1776: #if ($stats.view != "pdf")
1777: <div class="tab-label" id="$id">$teamName</div>
1778: #end
1779: #end
1780:
1781: #macro (printBoxScore)
1782: <div class="player-stats" data-module="mod-team-tabs">
1783: <div class="tab-labels">
1784: #printTabControl($visitor.valueOf("@name"), "team-label-v")
1785: #printTabControl($home.valueOf("@name"), "team-label-h")
1786: </div>
1787: <div class="stats-wrap clearfix">
1788: #foreach ($teamNode in $teamNodes)
1789: #set ($vh = $teamNode.valueOf("@vh").toLowerCase())
1790: <div class="stats-box half" data-panel-for="team-label-${vh}">
1791: #printHittingStats($teamNode)
1792: </div>
1793: #end
1794: </div>
1795: <div class="stats-wrap clearfix">
1796: #foreach ($teamNode in $teamNodes)
1797: #set ($vh = $teamNode.valueOf("@vh").toLowerCase())
1798: <div class="stats-box half" data-panel-for="team-label-${vh}">
1799: #printPitchingStats($teamNode)
1800: </div>
1801: #end
1802: </div>
1803: </div>
1804:
1805: #if ($hasScoringSummary)
1806: <div class="stats-wrap clearfix">
1807: <div class="stats-box full scoring-summary clearfix">
1808: #printScoringSummary
1809: </div>
1810: </div>
1811: #end
1812:
1813: ## OTHER INFORMATION
1814: <div class="stats-wrap clearfix">
1815: <div class="stats-box full game-info clearfix">
1816: <div class="caption"><h2>Other Information</h2></div>
1817: <table class="table-inline" role="presentation">
1818: <tbody>
1819: #if ($location.length() > 0)<tr><td class="text"><strong>Location: </strong></td><td class="text"><span>$location</span></td></tr>#end
1820: #if ($stadium.length() > 0)<tr><td class="text"><strong>Stadium: </strong></td><td class="text"><span>$stadium</span></td></tr>#end
1821: #if ($attend.length() > 0)<tr><td class="text"><strong>Attendance: </strong></td><td class="text"><span>$attend</span></td></tr>#end
1822: #if ($duration.length() > 0)<tr><td class="text"><strong>Duration: </strong></td><td class="text"><span>$duration</span></td></tr>#end
1823: #if ($umpHp.length() > 0 || $umpFb.length() > 0 || $umpSb.length() > 0 || $umpTb.length() > 0)
1824: <tr>
1825: <td class="text"><strong>Umpires: </strong></td>
1826: <td class="text">
1827: #if ($umpHp.length() > 0)
1828: Home plate - $umpHp
1829: #end
1830: #if ($umpFb.length() > 0)
1831: , First base - $umpFb
1832: #end
1833: #if ($umpSb.length() > 0)
1834: , Second base - $umpSb
1835: #end
1836: #if ($umpTb.length() > 0)
1837: , Third base - $umpTb
1838: #end
1839: </td>
1840: </tr>
1841: #end
1842: #foreach ($note in $document.selectNodes("bsgame/venue/notes/note"))
1843: <tr><td class="text" colspan="2">$note.valueOf("@text")</td></tr>
1844: #end
1845: </tbody>
1846: </table>
1847: </div>
1848: </div>
1849: #end ## boxscore
1850:
1851: #set ($titleVA = "at")
1852: #if ($isNeutralGame)
1853: #set ($titleVA = "vs.")
1854: #end
1855:
1856: #set ($pageTitle = "$visname $titleVA $homename")
1857:
1858: #if ($date)
1859: #set ($pageTitle = "${pageTitle} - ${formatter.formatLongDate($date)}")
1860: #end
1861:
1862: #if ($time.length() > 0)
1863: #set ($pageTitle = "${pageTitle} - ${time}")
1864: #end
1865: <head>
1866: <title>$pageTitle - Box Score</title>
1867: #if ($stats.inProgress)
1868: <meta http-equiv="refresh" content="60">
1869: #end
1870: #if ($stats.view == "pdf")
1871: #include("statcrew-pdf-css-template")
1872: #end
1873: </head>
1874:
1875: #if ($stats.view == "pdf")
1876:
1877: <div class="stats-wrapper clearfix">
1878: <div class='footer-left'>$visname vs. $homename</div>
1879: <div class='footer-right'><span id="pagenumber"></span> of <span id="pagecount"></span></div>
1880: #printPdfHeader("Box score")
1881: #parse("bsxml-monospace-template")
1882: #if ($hasPlayByPlay)
1883: <p class="pagebreak"> </p>
1884: #printPdfHeader("Play by Play")
1885: #printPlayByPlay()
1886: #end
1887: </div>
1888:
1889: #else
1890:
1891: #set ($showWiki = !($showWikiVar == false))
1892: #if ($showWiki)
1893: $wiki.su
1894: #end
1895:
1896: ## FULL BOXSCORE
1897:
1898: #if ($page)
1899: $request.setAttribute("relatedLinksContentPage", $page)
1900: $website.includeAgain("related-links-template")
1901: #end
1902:
1903:
1904: <article class="game-boxscore bsb clearfix">
1905: ## BOX SCORE HEADER
1906: <div class="head">
1907: <h1>#if ($dateVal.length() > 0)<span class="date">$formatter.formatLongDate($date)</span>#end $visitorTeam #if ($isNeutralGame) vs. #else at #end $homeTeam</h1>
1908: <div class="teams clearfix">
1909: #if ($visitorScore > $homeScore)
1910: #set ($visitorClass = "winner")
1911: #set ($homeClass = "loser")
1912: #elseif ($homeScore > $visitorScore)
1913: #set ($visitorClass = "loser")
1914: #set ($homeClass = "winner")
1915: #end
1916: #foreach ($teamNode in $teamNodes)
1917: #if ($teamNode.valueOf("@vh") == "V")
1918: #set ($teamClass = "visitor ${visitorClass}")
1919: #set ($teamLogo = $stats.visitorTeamLogo)
1920: #else
1921: #set ($teamClass = "home ${homeClass}")
1922: #set ($teamLogo = $stats.homeTeamLogo)
1923: #end
1924:
1925: #set ($conf = $teamNode.valueOf("@conf"))
1926: #if ($conf.length() > 0) #set ($conf = " ${conf}") #end
1927: #set ($record = $teamNode.attributeValue("record"))
1928: #set ($confRecord = $teamNode.valueOf("@confrecord"))
1929: <div class="team ${teamClass} clearfix">
1930: <div class="team-logo"><img src="$teamLogo" alt="" /></div>
1931: #if ($record.length() > 0 && $confRecord.length() > 0)
1932: <div class="team-record">($record, $confRecord$conf)</div>
1933: #elseif ($record.length() > 0)
1934: <div class="team-record">($record$conf)</div>
1935: #end
1936: <div class="team-score">$teamNode.valueOf("linescore/@runs")</div>
1937: </div>
1938: #end
1939:
1940: ## Mini boxscore
1941: <div class="linescore">
1942: <table>
1943: <caption class="offscreen">Line Score</caption>
1944: <thead>
1945: <tr>
1946: <th scope="col" class="pinned-col col-head text">
1947: #if ($stats.final)
1948: Final
1949: #else
1950: #printInningStatus
1951: #end
1952: </th>
1953: #foreach ($inning in [1..$pldInnings])
1954: <th scope="col" class="col-head score">$inning</th>
1955: #end
1956: <th scope="col" class="col-head score total" aria-label="Runs">R</th>
1957: <th scope="col" class="col-head score total" aria-label="Hits">H</th>
1958: <th scope="col" class="col-head score total" aria-label="Errors">E</th>
1959: </tr>
1960: </thead>
1961: <tbody>
1962: ## TEAM SCORES
1963: #foreach ($teamNode in $teamNodes)
1964: <tr #if ($velocityCount == 1) class="$visitorClass" #else class="$homeClass" #end>
1965: <th scope="row" class="name pinned-col row-head text">$teamNode.valueOf("@name")</th>
1966: #foreach ($inning in [1..$pldInnings])
1967: <td class="score">$teamNode.valueOf("linescore/lineinn[$inning]/@score")</td>
1968: #end
1969: <td class="score total">$teamNode.valueOf("linescore/@runs")</td>
1970: <td class="score total">$teamNode.valueOf("linescore/@hits")</td>
1971: <td class="score total">$teamNode.valueOf("linescore/@errs")</td>
1972: </tr>
1973: #end
1974: </tbody>
1975: </table>
1976: </div> ## linescore
1977: </div> ## teams
1978: </div> ## head
1979:
1980: <div class="tab-container primary clearfix" data-module="stats/tabs" data-type="primary">
1981: <div class="tab-nav" data-module="jscroll" data-momentum="false">
1982: <div class="clearfix">
1983: <ul class="clearfix">
1984: <li #if (!($stats.view.length() > 0) || $stats.view == "boxscore")class="active"#end><a data-view="boxscore" href="${stats.pageUrl}">Box Score</a></li>
1985: #if ($hasPlayByPlay)
1986: <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>
1987: #end
1988: <li data-skip="true"><a href="$stats.pageUrl${paramSep}tmpl=bsxml-monospace-template" target="_blank">Coach's View</a></li>
1989: </ul>
1990: </div>
1991: </div>
1992: <div class="tab-panels">
1993:
1994: ## FULL BOX SCORE
1995: #set ($class = "tab-panel boxscore clearfix")
1996: #if (!($stats.view.length() > 0) || $stats.view == "boxscore")
1997: #set ($class = "${class} active")
1998: #end
1999: <section class="${class}" role="region" aria-label="Box Score">
2000: <h1 class="offscreen">Box Score</h1>
2001: #printBoxScore
2002: </section>
2003:
2004: ## PAY BY PLAY
2005: #if ($hasPlayByPlay)
2006: #set ($class = "tab-panel plays clearfix")
2007: #if ($stats.view == "plays")
2008: #set ($class = "${class} active")
2009: #end
2010: <section class="${class}" role="region" aria-label="Play By Play">
2011: <h1 class="offscreen">Play By Play</h1>
2012: #printPlayByPlay
2013: </section>
2014: #end
2015: </div>
2016: </div>
2017: </article> ## full boxscore
2018:
2019: #if ($showWiki)
2020: $wiki.su
2021: #end
2022: #end ## pdf check
2023: #end ## pt check
2024:
2025: ## GLOBAL ADS SERVER
2026: #if ($website.ads.isAdvertisingEnabled('BOX_SCORES'))
2027: $website.includeAgain("global-adserver-slots?adSlot=box_scores")
2028: #end
|