Skip to navigation Skip to content Skip to footer
There was a problem with a Velocity script
Pagesports/fball/2019-20/bios/bio-template
ErrorInvocation of method 'include' in class com.prestosports.render.ContentEngineInvoker threw exception java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: No operations allowed after connection closed. at ee42pfho4kp6wu2vsports/fball/2019-20/bios/bio-template[line 4, column 10]
Page source:
1: <script src="${website.cdn("/info/klass.min.js")}"></script>
2: 
3: ## PICK UP OPTIONS
4: $website.include("options")
5: #set ($options = $request.getAttribute("options"))
6: #set ($locale = "en_us")
7: #set ($locale = $options.get("locale"))
8: 
9: ## HACK TO GET STATS URL FROM RENDERER... NEEDS SERVER CHANGE
10: #set ($bioObject = $page.getDataAsObject())
11: #set ($statsURL = $bioObject.statsURL)
12: #if ($statsURL.length() > 0)
13:   $website.includeAgain("${statsURL}?tmpl=bio-stats-template")
14:   ## various settings to get the variables set
15:   #set ($events = $request.getAttribute("bio_events"))
16:   #set ($seasons = $request.getAttribute("bio_seasons"))
17:   #set ($career = $request.getAttribute("bio_career"))
18:   #set ($labels = $request.getAttribute("bio_labels"))
19:   #set ($briefs = $request.getAttribute("bio_briefs"))
20:   #set ($gamelogs = $request.getAttribute("bio_gamelogs"))
21:   #set ($splits = $request.getAttribute("bio_splits"))
22:   #set ($statPosition = $request.getAttribute("bio_position"))
23:   #set ($positions = $request.getAttribute("bio_positions"))
24:   #set ($playerId = $request.getAttribute("bio_player_id"))
25:   #set ($highlights = $request.getAttribute("bio_highlights"))
26:   #set ($formats = $request.getAttribute("bio_formats"))
27:   #set ($gamelogsCategoriesLabels = $request.getAttribute("bio_gamelogs_labels"))
28:   #set ($briefsCategoriesLabels = $request.getAttribute("bio_briefs_labels"))
29:   #set ($gamesResults = $request.getAttribute("bio_games_results"))
30:   #set ($monthsPlayed = $request.getAttribute("bio_months_played"))
31:   #set ($rosterTransactions = $request.getAttribute("roster_transactions"))
32: #end
33: 
34: #set ($pos = "")
35: #if($attributes.get("position_stat"))
36:     #set ($pos = $attributes.get("position_stat"))
37: #else
38:     #set ($pos = $attributes.get("position"))
39:     #set ($pos = $statPosition)
40:     #set ($posVec = $pos.split("/"))
41:     #set ($pos = $posVec[0])
42: #end
43: #set ($pos = $pos.toLowerCase())
44: #set ($statPos = $positions.get($pos))
45: #set ($paramPos = $request.getParameter("pos"))
46: 
47: #set ($playerId = $attributes.get("playerId"))
48: #set ($stats = $splits.overall)
49: #set ($highlights = $highlights.get($statPos))
50: 
51: #set ($showHighlights = true)
52: #if ($options.get("bio_show_highlights") && $options.get("bio_show_highlights") == false)
53: 	#set ($showHighlights = false)
54: #end
55: 
56: #set ($enhancedLayout = false)
57: #if (($options.get("bio_enhanced_layout") == "yes") || ($request.getParameter("bio_enhanced_layout") == true))
58: 	#set ($enhancedLayout = true)
59: #end
60: 
61: #set ($showActionShots = true)
62: #if ($options.get("bio_show_action_shots") && $options.get("bio_show_action_shots") == false)
63: 	#set ($showActionShots = false)
64: #end
65: 
66: #set ($actionShotsLimit = 5)
67: #set ($actionShotsLimit = $tool.math.toInteger($options.get("bio_action_shots_limit")))
68: 
69: #set ($showCareer = $wiki.valid() && $seasons)
70: #if ("yes" == $options.get("stats_show_career") && $seasons)
71:   #set ($showCareer = true)
72: #end
73: 
74: #set ($hasEvents = $events.size() > 0)
75: #set ($hasSynopsis = $synopsis.trim().length() > 0)
76: #set ($htmlStatsURL = "${page.url}-stats")
77: #set ($hasHTMLStats = $website.exists($htmlStatsURL))
78: #set ($bioBriefURL = "${page.url}-brief")
79: #set ($hasBioBrief = $website.exists("$bioBriefURL"))
80: #set ($showRoster = ($page.contentType == "loki/bio" && $page.headlinesFeatured.size() > 0) || ($page.contentType == "loki/bio-network" && $page.sectionPage.children.size() > 1))
81: #if ($options.get("bio_hide_roster") == true)
82:   #set ($showRoster = false)
83: #end
84: 
85: #if ($hasEvents)
86:     $request.setAttribute("icl-dataTables-script", true)
87: #end
88: 
89: #set ($view = "")
90: #if ($hasSynopsis || $hasBioBrief)
91:   #set ($view = "bio")
92: #elseif ($statsURL.length() > 0)
93:   #set ($view = "profile")
94: #elseif ($hasHTMLStats)
95:   #set ($view = "htmlstats")
96: #elseif ($releases.size() > 0)
97:   #set ($view = "news")
98: #elseif ($playerPhotos.size() > 0)
99:   #set ($view = "photos")
100: #elseif ($playerVideos.size() > 0)
101:   #set ($view = "videos")
102: #end
103: 
104: #if ($options.get("bio_default_view").length() > 0)
105:     #set ($checkView = $options.get("bio_default_view"))
106: #else
107:     ## THIS ESTABLISHES A DEFAULT TAB FOR NEW BOOTSTRAP THEMES
108:     #if ($hasSynopsis || $hasBioBrief)
109:         #set ($checkView = "bio")
110:     #elseif ($statsURL.length() > 0)
111:         #set ($checkView = "profile")
112:     #elseif ($releases.size() > 0)
113:         #set ($checkView = "news")
114:     #end
115: #end
116: 
117: #if ($request.getParameter("view"))
118:   #set ($checkView = $request.getParameter("view"))
119: #end
120: 
121: #if ($checkView == "profile" && $statsURL.length() > 0)
122:   #set ($view = "profile")
123: #elseif ($checkView == "bio" && ($hasSynopsis || $hasBioBrief))
124:   #set ($view = "bio")
125: #elseif ($checkView == "gamelog" && $statsURL.length() > 0)
126:   #set ($view = "gamelog")
127: #elseif ($checkView == "career" && $showCareer)
128:   #set ($view = "career")
129: #elseif ($checkView == "splits" && $statsURL.length() > 0)
130:   #set ($view = "splits")
131: #elseif ($checkView == "htmlstats" && $hasHTMLStats)
132:   #set ($view = "htmlstats")
133: #elseif ($checkView == "news" && $releases.size() > 0)
134:   #set ($view = "news")
135: #elseif ($checkView == "photos" && $playerPhotos.size() > 0)
136:   #set ($view = "photos")
137: #elseif ($checkView == "videos" && $playerVideos.size() > 0)
138:     #set ($view = "videos")
139: #elseif ($checkView == "weplayed")
140:     #set ($view = "weplayed")
141: #end
142: 
143: #macro (printResultAriaLabel $event)
144:     #set ($ariaLabel = "${event.sport} event: ${formatter.formatDate($event.date, 'MMMM d hh:mm a:')}")
145:     #if ($event.neutralSite.length() > 0 || $event.home)
146:     	#set ($ariaLabel = "${ariaLabel} vs.")
147:     #else
148:     	#set ($ariaLabel = "${ariaLabel} at")
149:     #end
150:     #set ($ariaLabel = "${ariaLabel} ${event.opponent.name}:")
151:     #if ($event.neutralSite.length() > 0)
152:     	#set ($ariaLabel = "${ariaLabel} @ ${event.neutralSite}:")
153:     #end
154:     #set ($ariaLabel = "${ariaLabel} Box Score")
155:     aria-label="$ariaLabel"
156: #end
157: 
158: #macro (printGrid $items $type)
159:     <div class="bio-news-mentions">
160:         <div class="card-columns d-flex flex-wrap justify-content-start">
161:             #foreach ($item in $items)
162:                 #if ($item.title.length() > 0)
163:                     <div class="col-12 col-sm-6 col-md-4 col-lg-3 d-flex align-items-stretch">
164:                         <div class="card m-2 position-relative flex-fill ${type}">
165:                             <a href="$item.url">
166:                                 #if ($item.thumbnailURL)
167:                                     <img src="${item.thumbnailURL}?max_width=510" alt="$item.thumbnailAlt" class="card-img-top img-fluid" />
168:                                 #elseif ($item.contentType == "loki/youtube")
169:                                     <img src="http://img.youtube.com/vi/${item.dataAsString}/mqdefault.jpg" alt="$item.thumbnailAlt" class="card-img-top img-fluid" />
170:                                 #else
171:                                     #if ($website.exists("/images/setup/default-article-thumbnail.png"))
172:                                         <img src="/images/setup/default-article-thumbnail.png?max_width=510&max_height=287" class="card-img-top img-fluid" alt="$item.thumbnailAlt" />
173:                                     #else
174:                                         <img src="$website.cdn("/info/images/default-article-thumbnail.png?max_width=510&max_height=287")" class="card-img-top img-fluid" alt="$item.thumbnailAlt" />
175:                                     #end
176:                                 #end
177:                             </a>
178:                             <div class="card-body">
179:                                 <h5 class="card-title"><a href="$item.url">$item.title</a></h5>
180:                                 #if ($item.leadIn.length() > 0)
181:                                     <p class="card-text">$formatter.limitLen(146, $item.leadIn)</p>
182:                                 #end
183:                                 #if ($item.date)
184:                                     <p class="card-text"><small class="text-muted">$formatter.formatLongDate($item.date)</small></p>
185:                                 #end
186:                             </div>
187:                         </div>
188:                     </div>
189:                 #end
190:             #end ## foreach
191:         </div>
192:     </div>
193: #end ## ends macro
194: 
195: #macro (gamelogData $p)
196: 
197: #set ($p = $positions.get($p))
198: #set ($gamelogs = $gamelogs.get($p))
199: 
200: #if ($hasEvents)
201: <div class="stats-box full clearfix">
202:     <div class="table-responsive-via-datatables">
203:         <table class="table table-hover nowrap w-100" data-searching="false" data-ordering="false" data-paging="false" data-info="false" data-filtering="false" data-module="https://theme-assets.prestosports.com/theme-assets/generic/assets/js/table-sort-bs.js">
204:             <thead class="thead-dark">
205:                 <tr>
206:                     <th scope="col">Date</th>
207:                     <th scope="col" class="text-start">Opponent</th>
208:                     <th scope="col" class="">Score</th>
209:                     #foreach ($gamelog in $gamelogs)
210:                       <th scope="col" class="text-uppercase text-center">$gamelog</th>
211:                     #end
212:                 </tr>
213:             </thead>
214:             <tbody>
215:                 #foreach ($event in $events)
216:                   <tr>
217:                     <td scope="row">$formatter.formatDate($event.event.date, "MMM d")</td>
218:                     <td class="text-start">
219:                       #if ($event.event.neutralSite.length() > 0) vs. #elseif (!$event.event.home) at #end
220:                       $event.event.opponent.name
221:                     </td>
222:                     <td class="">
223:                     #if ($event.event.statusCode >= 0)
224:                       #if ($event.event.eventId.length() > 0 && $event.stats.size() > 0)
225:                           <a #printResultAriaLabel($event.event) href="../boxscores/${formatter.formatBoxScoreLink($event.event)}">${event.event.APResult}</a>
226:                       #else
227:                       ${event.event.APResult}
228:                       #end
229:                     #else &nbsp; #end
230:                     </td>
231:                     #foreach ($gamelog in $gamelogs.keySet())
232:                       #set ($value = "-")
233:                       #set ($value = $formatter.formatNumber($event.stats.get($gamelog), $formats.get($gamelog)))
234:                       <td class="text-center">$value</td>
235:                     #end
236:                   </tr>
237:                 #end
238:             </tbody>
239:         </table>
240:     </div> ## table-responsive
241: </div> ## stats-box
242: #end
243: 
244: #end ## macro gamelogData
245: 
246: #macro (splitWithLabels $statPosBriefs $label $stats $rowSpan $colspan $rowSpanLabel)
247:     #if ($tool.math.toInteger($rowSpan) > 0)
248:         <tr class="group" data-rowspan="$rowSpan" data-colspan="$colspan">
249:             <td class="text-start">$rowSpanLabel</td>
250:             #foreach ( $i in [0..$tool.math.sub($colspan, 0)])
251:                 <td class="text-center">&nbsp;</td>
252:             #end
253:         </tr>
254:     #end
255:     <tr data-rowspan="$rowSpan" data-colspan="$colspan">
256:         <th scope="row" class="text-end">${label}</th>
257: 
258:         #if($rosterTransactions && $v == "career")
259:             #set($keys =  $stats.names())
260:             #set($array = $keys.toString().replace('"','').split(","))
261:             #foreach ($brief in $statPosBriefs.keySet())
262:                 #set ($value = "-")
263:                 #if($array.contains($brief))
264:                     #set ($value = $!formatter.formatNumber($tool.math.toDouble($stats.get($brief)), $formats.get($brief)))
265:                  #end
266:                 <td class="text-center">#if ($value.length() > 0) $value #else - #end</td>
267:             #end
268:         #else
269:             #foreach ($brief in $statPosBriefs.keySet())
270:                 #set ($value = "-")
271:                 #set ($value = $!formatter.formatNumber($stats.get($brief), $formats.get($brief)))
272:                 <td class="text-center">#if ($value.length() > 0) $value #else - #end</td>
273:             #end
274:         #end
275: 
276:     </tr>
277: #end
278: 
279: #macro (careerData $p)
280: #set ($p = $positions.get($p))
281: #set ($statPosBriefs = $briefs.get($p))
282: 
283: <div class="stats-box full clearfix">
284:     <div class="table-responsive-via-datatables table-responsive-webkit-overflow-scroll-fix">
285:         <table class="table table-hover nowrap w-100" data-searching="false" data-ordering="false" data-paging="false" data-info="false" data-filtering="false" data-module="https://theme-assets.prestosports.com/theme-assets/generic/assets/js/table-sort-bs.js">
286:             <thead class="thead-dark">
287:                 <tr>
288:                     <th scope="col" class="pinned-col">&nbsp;</th>
289:                     #foreach ($brief in $statPosBriefs)
290:                         <th scope="col" class="text-center text-uppercase">$brief</th>
291:                     #end
292:                 </tr>
293:             </thead>
294:             <tbody>
295:                 #if($rosterTransactions)
296:                     #set ($seasonLength = $career.seasons.length())
297:                     #foreach ($index in [0..$tool.math.sub($seasonLength, 1)])
298:                         #set($season = $career.seasons[$index])
299:                         #if($season.seasonStatsURL != "null")
300:                             #set ($label = "<a href='${season.seasonStatsURL}?view=profile'>$season.seasonName.replaceAll('^[^0-9-]*','') - $season.team.teamName</a>")
301:                         #else
302:                             #set ($label = "$season.seasonName.replaceAll('^[^0-9-]*','') - $season.team.teamName ")
303:                         #end
304:                         #splitWithLabels($statPosBriefs, $label, $season.player.stats, "", "", "")
305:                     #end
306:                     #splitWithLabels($statPosBriefs, "Total", $career.totals, "", "", "")
307:                 #else
308:                     #set ($careerTotals = $request.getAttribute("careerTotals"))
309:                     #set ($careerMap = $request.getAttribute("careerMap"))
310:                     #foreach ($season in $seasons)
311:                         ## Check if we did not get stats for this season
312:                         #if ($careerMap.get($season.seasonName))
313:                             #set ($label = "<a href='${season.path}?view=profile'>$season.seasonName</a>")
314:                             #splitWithLabels($statPosBriefs, $label, $careerMap[$season.seasonName], "", "", "")
315:                         #elseif ($wiki.valid())
316:                             <tr>
317:                                 <td scope="row" class="text-end">
318:                                     ${season.seasonName}
319:                                     <span class="d-inline-block" tabindex="0" data-bs-toggle="tooltip" data-bs-placement="right" title="We could not find the 'players' page in the ${season.seasonName} section.">
320:                                         <span class="fa fa-light fa-circle-info"></span>
321:                                     </span>
322:                                 </td>
323:                                 #foreach ( $i in [0..$tool.math.sub($statPosBriefs.size(), 1)])
324:                                     <td class="text-center">&nbsp;</td>
325:                                 #end
326:                             </tr>
327:                         #end
328:                     #end
329:                     #splitWithLabels($statPosBriefs, "Total", $request.getAttribute("careerTotals").overall, "", "", "")
330:                 #end
331:             </tbody>
332:         </table>
333:     </div> ## table-responsive
334: </div> ## stats-box
335: 
336: #end ## macro careerData
337: 
338: #macro (splitsData $p)
339: 
340: #set ($p = $positions.get($p))
341: #set ($statPosBriefs = $briefs.get($p))
342: #set ($colspan = $tool.math.sub($statPosBriefs.size(), 1))
343: 
344: #if ($statPosBriefs.size() > 0)
345: <div class="stats-box full clearfix">
346:     <div class="table-responsive-via-datatables">
347:         <table class="table table-hover nowrap w-100" data-searching="false" data-ordering="false" data-paging="false" data-info="false" data-filtering="false" data-module="https://theme-assets.prestosports.com/theme-assets/generic/assets/js/table-sort-bs.js">
348:             <thead class="thead-dark">
349:                 <tr data-colspan="$colspan">
350:                     <th scope="col">&nbsp;</th>
351:                     #foreach ($brief in $statPosBriefs)
352:                         <th scope="col" class="text-center text-uppercase">$brief</th>
353:                     #end
354:                 </tr>
355:             </thead>
356: 
357:             <tbody>
358:                 <tr class="group" data-colspan="$colspan">
359:                     <td class="text-start">Event</td>
360:                     #foreach ( $i in [0..$tool.math.sub($colspan, 0)])
361:                         <td class="text-center">&nbsp;</td>
362:                     #end
363:                 </tr>
364:                 #splitWithLabels($statPosBriefs, "Total", $splits.overall, "", "", "")
365:                 #splitWithLabels($statPosBriefs, "Conference", $splits.conference, "", "", "")
366:                 #splitWithLabels($statPosBriefs, "Exhibition", $splits.exhibition, "", "", "")
367: 
368:                 <tr class="group" data-colspan="$colspan">
369:                     <td class="text-start">Location</td>
370:                     #foreach ( $i in [0..$colspan])
371:                         <td class="text-center">&nbsp;</td>
372:                     #end
373:                 </tr>
374:                 #splitWithLabels($statPosBriefs, "Home", $splits.home, "", "", "")
375:                 #splitWithLabels($statPosBriefs, "Away", $splits.away, "", "", "")
376:                 #splitWithLabels($statPosBriefs, "Neutral", $splits.neutral, "", "", "")
377: 
378:                 #set ($rowSpan = $gamesResults.entrySet().size())
379:                 #set ($rowSpanLabel = "Result")
380: 
381:                 #foreach($gameResult in $gamesResults.entrySet())
382:                     #if ($gameResult.key == "wins")
383:                       #set ($splitGameResult = $splits.inWins)
384:                     #elseif ($gameResult.key == "losses")
385:                       #set ($splitGameResult = $splits.inLosses)
386:                     #elseif ($gameResult.key == "ties")
387:                       #set ($splitGameResult = $splits.inTies)
388:                     #end
389: 
390:                     #splitWithLabels($statPosBriefs, $gameResult.value, $splitGameResult, $rowSpan, $colspan, $rowSpanLabel)
391: 
392:                     #set ($rowSpan = "")
393:                 #end
394: 
395: 
396:             #if ($monthsPlayed and $monthsPlayed.size() > 0)
397: 
398:                     #set ($rowSpan = $monthsPlayed.size())
399:                     #set ($rowSpanLabel = "Month")
400: 
401:                     #foreach($month in $monthsPlayed)
402:                         #if ($month == 'January')
403:                           #set ($splitMonth = $splits.january)
404:                         #elseif ($month == 'February')
405:                           #set ($splitMonth = $splits.february)
406:                         #elseif ($month == 'March')
407:                           #set($splitMonth = $splits.march)
408:                         #elseif ($month == 'April')
409:                           #set($splitMonth = $splits.april)
410:                         #elseif ($month == 'May')
411:                           #set ($splitMonth = $splits.may)
412:                         #elseif ($month == 'June')
413:                           #set ($splitMonth = $splits.june)
414:                         #elseif ($month == 'July')
415:                           #set($splitMonth = $splits.july)
416:                         #elseif ($month == 'August')
417:                           #set ($splitMonth = $splits.august)
418:                         #elseif ($month == 'September')
419:                           #set($splitMonth = $splits.september)
420:                         #elseif ($month == 'October')
421:                           #set($splitMonth = $splits.october)
422:                         #elseif ($month == 'November')
423:                           #set ($splitMonth = $splits.november)
424:                         #elseif ($month == 'December')
425:                           #set($splitMonth = $splits.december)
426:                         #end
427: 
428:                         #splitWithLabels($statPosBriefs, $month, $splitMonth, $rowSpan, $colspan, $rowSpanLabel)
429: 
430:                         #set ($rowSpan = "")
431: 
432:                     #end ## foreach
433: 
434:             #end
435:             </tbody>
436:         </table>
437:     </div> ## table-responsive
438: </div> ## stats-box
439: #end
440: 
441: #end ## macro splitsData
442: 
443: #macro (printRecentGames)
444: #if ($hasEvents)
445:     <div class="table-responsive-via-datatables">
446:         <table class="table table-hover nowrap w-100" data-searching="false" data-ordering="false" data-paging="false" data-info="false" data-filtering="false" data-module="https://theme-assets.prestosports.com/theme-assets/generic/assets/js/table-sort-bs.js">
447:             <thead class="thead-dark">
448:                 <tr>
449:                     <th scope="col text-start">Date</th>
450:                     <th scope="col text-start">Opponent</th>
451:                     <th scope="col">Result</th>
452:                 </tr>
453:             </thead>
454:             <tbody>
455:                 #set ($eventEnd = -1)
456:                 #foreach ($event in $events)
457:                   #if ($event.event.result.resolved)
458:                     #set ($eventEnd = $velocityCount)
459:                   #end
460:                 #end
461: 
462:                 #set ($eventStart = $eventEnd - 5)
463:                 #if ($eventStart < 0) #set ($eventStart = 0) #end
464: 
465:                 #foreach ($event in $events)
466:                     #if ($velocityCount >= $eventStart and $velocityCount <= $eventEnd)
467:                         <tr>
468:                             <td scope="row" class="text-start">$formatter.formatDate($event.event.date, "MMM d")</td>
469:                             <td class="text-start">
470:                                 #if ($event.event.neutralSite.length() > 0) vs.
471:                                 #elseif (!$event.event.home) at
472:                                 #else ## nothing for a home game
473:                                 #end
474:                                 $event.event.opponent.name
475:                             </td>
476:                             <td>
477:                                 #if ($event.event.statusCode >= 0)
478:                                     #if ($event.event.eventId.length() > 0 && $event.stats.size() > 0)
479:                                         <a #printResultAriaLabel($event.event) href="../boxscores/${formatter.formatBoxScoreLink($event.event)}">${event.event.APResult}</a>
480:                                     #else
481:                                         ${event.event.APResult}
482:                                     #end
483:                                 #end
484:                             </td>
485:                         </tr>
486:                     #end ## if
487:                 #end
488:             </tbody>
489:         </table>
490:     </div>
491: #end
492: #end ## macro printRecentGames
493: 
494: #macro (printCategories $briefCategoryLabels $v $ariaLabel)
495:     <div class="$classTabPaneContent has-child-tabs">
496:         <div class="$classBioTabChildrenWrapper" data-momentum="false">
497:             <div class="jscroll-inner">
498:                 <ul class="$classBioTabChildren" id="bio-tabs-$v" role="tablist">
499:                     #foreach($briefCat in $briefCategoryLabels.entrySet())
500:                         #set ($briefCatLabel = $briefCat.value)
501:                         #set ($briefCatKey = $briefCat.key)
502:                         #if ($locale == "en_gb" && $briefCatLabel == "Defense")
503:                             #set ($briefCatLabel = "Defence")
504:                         #end
505:                         <li class="nav-item">
506:                             <a data-bs-toggle="tab" id="${v}-tab-pos-${briefCatKey}" class="nav-link#if ($activePos == $briefCatKey) active#end" data-bs-target="#${v}-tab-pos-${briefCatKey}-content" href="${page.url}?view=${v}&pos=${briefCatKey}" aria-label="${ariaLabel}: ${briefCatLabel}">${briefCatLabel}</a>
507:                         </li>
508:                     #end
509:                 </ul>
510:             </div>
511:         </div>
512:         <div class="tab-content" id="${v}-tab-content">
513:             #foreach ($briefCat in $briefCategoryLabels.entrySet())
514:                 #set ($briefCatLabel = $briefCat.value)
515:                 #set ($briefCatKey = $briefCat.key)
516:                 #set ($class = "tab-panel")
517:                 #if ($briefCat.key == $activePos)
518:                    #set ($class = "tab-panel active show")
519:                 #end
520:                 <div class="tab-pane fade ${class}" id="${v}-tab-pos-${briefCatKey}-content" role="tabpanel" aria-labelledby="${v}-tab-pos-${briefCatKey}">
521:                     <div class="stats-wrap $classTabPaneContent">
522:                         <h4 class="bio-tabbed-content-heading sr-only">$ariaLabel - <small class="text-muted"> $briefCatLabel</small></h4>
523:                         #if ($v == "splits")
524:                             #splitsData($briefCat.key)
525:                         #elseif ($v == "career")
526:                             #careerData($briefCat.key)
527:                         #end
528:                     </div>
529:                 </div>
530:             #end
531:         </div>
532:     </div>
533: #end ## macro printCategories
534: 
535: #macro (printHeadshot)
536:         #if ($enhancedLayout)
537:             #set ($classPlayerPhoto = "img-fluid img-thumbnail")
538:         #else
539:             #set ($classPlayerPhoto = "img-fluid img-thumbnail")
540:         #end
541: 
542:         #if ($headshot.url)
543:             #set ($src = $headshot.url)
544:         #elseif ($website.exists("/images/setup/default-headshot.png"))
545:             #set ($src = "/images/setup/default-headshot.png")
546:         #elseif ($website.exists("/images/setup/headshot_default.jpg"))
547:             #set ($src = "/images/setup/headshot_default.jpg")
548:         #else
549:             #set ($src = "/info/images/default-headshot.png")
550:         #end
551: 
552:         #if ($src.trim().length() > 0)
553:             <img src="$src?max_width=510&max_height=600" class="$classPlayerPhoto" alt="$fullName" />
554:         #end
555: #end ## macro printHeadshot
556: 
557: #set ($socialBrands = ["facebook", "twitter", "instagram", "youtube", "twitch", "tiktok"])
558: 
559: #macro (buildSocialLink $brand $handle $icons $class)
560:     #if($brand == "facebook")
561:         #set($socialHost = "https://www.facebook.com")
562:     #elseif($brand == "twitter")
563:         #set($socialHost = "https://twitter.com")
564:     #elseif($brand == "instagram")
565:         #set($socialHost = "https://www.instagram.com")
566:     #elseif($brand == "tikTok")
567:         #set($socialHost = "https://www.tiktok.com")
568:     #elseif($brand == "twitch")
569:         #set($socialHost = "https://www.twitch.tv")
570:     #elseif($brand == "youtube")
571:         #set($socialHost = "https://www.youtube.com")
572:     #end
573: 
574:     #if($socialHost.length() > 0 )
575:         #set($url = "${socialHost}/${handle}")
576:     #else
577:         #set($url = "")
578:     #end
579: 
580:     #set($icons = $Boolean.parseBoolean($icons))
581:     #if($icons == true)
582:         <a href="$url" class="$class" target="_blank"><span aria-label="$brand" class="fa fa-brands #if($brand == 'twitter') fa-x-twitter #else fa-$brand.toLowerCase() #end"></span></a>
583:     #else
584:         <a href="$url" class="$class" target="_blank">$handle</a>
585:     #end
586: #end
587: 
588: #macro(playerHeading)
589:     <div class="player-heading h3 bg-primary d-flex align-content-stretch text-white position-relative z-index-1">
590:         #if ($!attributes.get("number").length() > 0)<span class="number bg-secondary inline-block text-white p-3">$!attributes.get("number")</span>#end
591:         <span class="name inline-block w-100 flex-fill p-3">$fullName</span>
592:         <span class="social-handle-link inline-block p-3">
593:             <ul class="d-flex align-content-center h-100 gap-3 list-unstyled m-0">
594:                 #foreach ($field in $fields)
595:                     #if ($socialBrands.contains($field.key.toLowerCase()) && $attributes.get($field.key).length() > 0)
596:                         <li class="d-flex flex-column align-content-center justify-content-center">
597:                             #buildSocialLink($field.value.toLowerCase(), $!attributes.get($field.key), true, "btn btn-lg btn-link text-white p-0")
598:                         </li>
599:                     #end
600:                 #end
601:             </ul>
602:         </span>
603:     </div>
604: #end
605: 
606: #macro (printBioInfo)
607:     #if ($enhancedLayout)
608:         #set ($classListItems = "col-12 col-lg-6 px-3")
609:         #set ($classListItems = "col-12 col-lg-6 px-3")
610:         #set ($definitionListItems = "border-bottom m-0 p-2 h-100")
611:     #else
612:         #set ($classListItems = "col-12 px-2")
613:         #set ($definitionListItems = "d-flex flex-row border-bottom m-0 p-2")
614:     #end
615: 
616: #if ($enhancedLayout)
617:     #playerHeading
618: #end
619: 
620:     <div class="roster-player-fields">
621:         <ul class="d-flex flex-row flex-wrap justify-content-between list-unstyled">
622:             #foreach ($i in [1..10])
623:                 #set ($stickyKey = "bio_custom${i}_sticky")
624:                 #if ($options.get($stickyKey).length() > 0 && $attributes.get("custom${i}").length() > 0)
625:                     <li class="$classListItems bio-field-custom-sticky">
626:                         <dl class="${definitionListItems}">
627:                             <dt class="label p-0 me-2">$options.get($stickyKey): </dt>
628:                             <dd class="value p-0 m-0 text-muted">$!attributes.get("custom${i}")</dd>
629:                         </dl>
630:                     </li>
631:                 #end
632:             #end
633: 
634:             #foreach ($field in $fields)
635:                 #if (!$field.key.startsWith("custom"))
636:                     #if ($attributes.get($field.key).length() > 0 && ($field.key != "first_name" && $field.key != "last_name" && $field.key != "number" && $field.key != "full_name"))
637:                         #if ($field.key == "phone1" || $field.key == "phone2")
638:                             <li class="$classListItems bio-field-standard">
639:                                 <dl class="${definitionListItems}">
640:                                     <dt class="label p-0 me-2 d-inline">Phone: </dt>
641:                                     <dd class="value p-0 m-0 d-inline text-muted">$!attributes.get($field.key)</dd>
642:                                 </dl>
643:                             </li>
644:                         #elseif ($field.key == "email_address")
645:                             <li class="$classListItems bio-field-standard">
646:                                 <dl class="${definitionListItems}">
647:                                     #set ($emailAdd = $attributes.get($field.key))
648:                                     <dt class="label p-0 me-2 d-inline">Email: </dt>
649:                                     <dd class="value p-0 m-0 text-truncate d-inline text-muted"><a href="mailto:${emailAdd}">$emailAdd</a></dd>
650:                                 </dl>
651:                             </li>
652:                         #elseif ($field.key == "weight_class")
653:                             <li class="$classListItems bio-field-standard">
654:                                 <dl class="${definitionListItems}">
655:                                     <dt class="label p-0 me-2 d-inline">Class: </dt>
656:                                     <dd class="value p-0 m-0 d-inline text-muted">$!attributes.get($field.key)</dd>
657:                                 </dl>
658:                             </li>
659:                         #elseif ($socialBrands.contains($field.value.toLowerCase()))
660:                             <li class="$classListItems bio-field-standard">
661:                                 <dl class="${definitionListItems}">
662:                                     <dt class="label p-0 me-2 d-inline">$field.value: </dt>
663:                                     <dd class="value p-0 m-0  d-inline text-muted">#buildSocialLink($field.value.toLowerCase(), $!attributes.get($field.key), false, "")</dd>
664:                                 </dl>
665:                             </li>
666:                         #elseif ($field.key != "position_abbr")
667:                             <li class="$classListItems bio-field-standard">
668:                                 <dl class="${definitionListItems}">
669:                                     <dt class="label p-0 me-2 d-inline">$field.value: </dt>
670:                                     <dd class="value p-0 m-0  d-inline text-muted">$!attributes.get($field.key)</dd>
671:                                 </dl>
672:                             </li>
673:                         #end
674:                     #end
675:                 #end
676:             #end
677: 
678:             #foreach ($i in [1..10])
679:               #set ($customKey = "bio_custom${i}")
680:               #if ($options.get($customKey).length() > 0 && $attributes.get("custom${i}"))
681:                 <li class="$classListItems bio-field-custom">
682:                     <dl class="${definitionListItems}">
683:                         <dt class="label p-0 me-2 d-inline">$options.get($customKey): </dt>
684:                         <dd class="value p-0 m-0 d-inline text-muted">$!attributes.get("custom${i}")</dd>
685:                     </dl>
686:                 </li>
687:               #end
688:             #end
689:         </ul>
690:     </div>
691: #end ## macro printBioInfo
692: 
693: #macro (printActionShots)
694: #if ($showActionShots)
695:     ## FILTERS OUT THE NUMBER OF ACTION PHOTOS
696:     #set ($totalPhotoAvaiable = $playerPhotos.size())
697:     #set ($playerPhotosFiltered = $playerPhotos)
698:     #if ($actionShotsLimit < $totalPhotoAvaiable)
699:         #set ($playerPhotosFiltered = $playerPhotos.subList(0, $actionShotsLimit))
700:     #end
701:     #set ($playerPhotosFiltered = $tool.sorter.sort($playerPhotosFiltered, "lastUpdated:desc"))
702:     <div class="action-shots clearfix mb-md-n5 d-none d-sm-none d-md-block">
703:         <div id="action-shots-carousel" class="carousel slide carousel-fade" data-interval="12000" data-ride="carousel">
704:             <ol class="carousel-indicators pb-sm-3 mb-sm-5">
705:                 #foreach($photo in $playerPhotosFiltered)
706:                     <li data-bs-target="#action-shots-carousel" data-slide-to="$foreach.index" class="#if ($foreach.index == 0)active#end"></li>
707:                 #end
708:             </ol>
709:             <div class="carousel-inner">
710:                 #foreach($photo in $playerPhotosFiltered)
711:                     #set ($imgAlt = "Large featured action photo of $fullName - Image $foreach.count")
712:                     #if ($photo.altText.length() > 0)
713:                         #set ($imgAlt = $photo.altText)
714:                     #elseif( $photo.title.length() > 0 )
715:                         #set ($imgAlt = $photo.title)
716:                     #end
717:                     <div class="carousel-item#if ($foreach.index == 0) active#end">
718:                         <img src="${photo.url}?max_width=1200" alt="$imgAlt" class="d-block w-100" data-lastupdated="$photo.lastUpdated" />
719:                     </div>
720:                 #end
721:             </div>
722:         </div>
723:     </div>
724: #end
725: #end ## macro printActionShots
726: 
727: #macro (printHighlights)
728: #if ($highlights && $showHighlights)
729:     <div class="roster-bio-highlights bg-white text-dark w-100">
730:         <ul class="d-flex flex-row flex-wrap justify-content-between list-unstyled m-0">
731:             #foreach ($highlight in $highlights.keySet())
732:                 #set ($value = "-")
733:                 #set ($value = $formatter.formatNumber($stats.get($highlight), $formats.get($highlight)))
734:                 <li class="flex-fill text-center border border">
735:                     <dl class="stat d-block m-0 p-3">
736:                         <dt class="d-block label p-0 m-0 text-uppercase fw-normal text-muted">$!highlights.get($highlight)</dt>
737:                         <dd class="d-block value p-0 m-0 fs-4 fw-bold">$value</dd>
738:                     </dl>
739:                 </li>
740:             #end
741:         </ul>
742:     </div>
743: #end
744: #end ## macro printHighlights
745: 
746: #macro (printRoster)
747: #if ($enhancedLayout)
748:     $website.includeAgain("${page.url}?tmpl=roster-switcher-template&id=roster-list")
749: #else
750:     #set ($id = "roster-switcher")
751:     #if ($request.getParameter("id").length() > 0)
752:         #set ($id = $request.getParameter("id"))
753:     #end
754: 
755:     #if ($page.contentType == "loki/bio")
756:         #set ($headlinesFeaturedSize = 0)
757:         #foreach ($featuredPage in $page.headlinesFeatured)
758:             #if ($featuredPage.contentType == "loki/headlines")
759:                 #set ($headlinesFeaturedSize = $headlinesFeaturedSize + 1)
760:             #end
761:         #end
762:         #if ($headlinesFeaturedSize > 0)
763:             <div id="$id" class="float-sm-end roster-switcher-template">
764:                 <span class="input-group">
765:                     <span class="input-group-text" id="${id-options}-group-text">Related Bios</span>
766:                     <select class="form-select" id="$id-options" aria-describedby="${id-options}-group-text" onchange="location=this.value;">
767:                         #foreach ($featuredPage in $page.headlinesFeatured)
768:                             #if ($featuredPage.contentType == "loki/headlines")
769:                                 $website.includeAgain("${featuredPage.url}?tmpl=roster-list-template&current_url=${page.url}")
770:                             #end
771:                         #end
772:                     </select>
773:                 </div>
774:             </div>
775:         #end
776:     #elseif ($page.contentType == "loki/bio-network")
777:         #set ($relatedPlayers = $page.sectionPage.children)
778:         #set ($teamNames = {})
779:         #foreach ($relatedPlayer in $relatedPlayers)
780:             #if ($relatedPlayer.contentType == "loki/bio-network")
781:                 #set ($relatedPlayerObj = $relatedPlayer.getDataAsObject().getAttributes())
782:                 #set ($teamName = $relatedPlayerObj.get("team"))
783:                 #if ($teamName.length() > 0)
784:                     #if (!$teamNames.containsValue($teamName))
785:                         $!teamNames.put($tool.math.add($teamNames.size(), 1), $teamName)
786:                     #end
787:                 #end
788:             #end
789:         #end
790:         <div id="$id" class="float-sm-end roster-switcher-template">
791:             <div class="input-group">
792:                 <span class="input-group-text" id="${id-options}-group-text">Related Bios</span>
793:                 <select class="form-select" id="$id-options" aria-describedby="${id-options}-group-text" onchange="location=this.value;">
794:                     #foreach ($i in [1..$teamNames.size()])
795:                         #if ($teamNames.size() > 1)
796:                             <optgroup label="$teamNames.get($i)">
797:                         #end
798: 
799:                         #foreach ($relatedPlayer in $relatedPlayers)
800:                             #if ($relatedPlayer.contentType == "loki/bio-network")
801:                                 #set ($relatedPlayerObj = $relatedPlayer.getDataAsObject().getAttributes())
802:                                 #set ($teamName = $relatedPlayerObj.get("team"))
803:                                 #if ($teamName.length() > 0 && $teamName == $teamNames.get($i))
804:                                     #set ($playerFirstName = $relatedPlayerObj.get("first_name"))
805:                                     #set ($playerLastName = $relatedPlayerObj.get("last_name"))
806:                                     <option value="$relatedPlayer.url" #if ($page.url == $relatedPlayer.url)selected#end>${playerFirstName} ${playerLastName}</option>
807:                                 #end
808:                             #end
809:                         #end
810: 
811:                         #if ($teamNames.size() > 1)
812:                             </optgroup>
813:                         #end
814:                     #end
815:                 </select>
816:             </div>
817:         </div>
818:     #end
819: #end ## enhancedLayout check
820: #end ## macro printRoster
821: 
822: ################################################## END MACROS  #############################################################
823: 
824: #if ($attributes.get("full_name").length() > 0)
825:   #set ($fullName = $attributes.get("full_name"))
826: #else
827:   #set ($firstName = $!attributes.get("first_name"))
828:   #set ($lastName = $!attributes.get("last_name"))
829:   #set ($fullName = "${firstName} ${lastName}")
830: #end
831: 
832: #set ($pageTitle = "")
833: #if($request.getAttribute("pageTitle").length() > 0)
834:         #set ($pageTitle = $request.getAttribute("pageTitle"))
835: #end
836: #if ($page.title.length() > 0)
837:         #set ($pageTitle = $!page.title)
838: #end
839: $!request.setAttribute("pageTitle", "${pageTitle}")
840: 
841: #set ($actionShots = false)
842: #if ($enhancedLayout && $playerPhotos.size() > 0)
843:   #set ($actionShots = true)
844: #end
845: 
846: #if ($enhancedLayout)
847:     #set ($classRoot = "bio-enhanced")
848:     #if ($actionShots && $showActionShots)
849:           #set ($classRoot = "${classRoot} action")
850:     #else
851:           #set ($classRoot = "${classRoot} plain")
852:     #end
853:     #set ($classCard = "bg-light p-3 col-sm-12 pt-md-0")
854:     #set ($classBody = "col-sm-12")
855:     #set ($classBioTabParentsWrapper = "nav-tabs-wrapper position-relative py-3 border-top border-bottom")
856:     #set ($classBioTabParents = "nav nav-pills nav-tabs-responsive d-flex flex-row text-nowrap justify-content-center")
857:     #set ($classBioTabChildrenWrapper = "nav-tabs-wrapper position-relative py-3 border-bottom")
858:     #set ($classBioTabChildren = "nav nav-pills nav-tabs-responsive d-flex flex-row text-nowrap justify-content-center")
859:     #set ($classTabPaneContent = "tab-pane-contents py-3")
860: #else
861:     #set ($classRoot = "bio-wrap")
862:     #set ($classCard = "mb-5 p-3 col-lg-4 col-xl-3 bg-white")
863:     #set ($classBody = "col-lg-8 col-xl-9 py-3")
864:     #set ($classBioTabParentsWrapper = "nav-tabs-wrapper position-relative")
865:     #set ($classBioTabParents = "nav nav-tabs nav-tabs-responsive d-flex flex-row text-center justify-content-start")
866:     #set ($classBioTabChildrenWrapper = "nav-tabs-wrapper position-relative")
867:     #set ($classBioTabChildren = "nav nav-tabs nav-tabs-responsive d-flex flex-row text-center justify-content-start")
868:     #set ($classTabPaneContent = "tab-pane-contents p-3")
869: 
870: #end
871: 
872: ## FULL ROSTER
873: <div class="${classRoot} #if ($highlights) bio-wrap-has-highlights #end clearfix">
874: 
875: ## RELATED BIOS
876: #if ($showRoster)
877:   <div class="related-bios clearfix mb-3">#printRoster</div>
878: #end
879: 
880: #if ($actionShots)
881:   #printActionShots
882: #end
883: #if ($enhancedLayout)
884: #else
885:     #playerHeading
886: #end
887: 
888: <div class="roster-bio-container p-3">
889:     <div class="row">
890:         <div class="bio-card ${classCard}">
891:             <div class="player-about clearfix">
892:                 #if ($enhancedLayout)
893:                     <div class="row no-gutters g-0">
894:                         <div class="col-md-4 col-lg-3">
895:                             <div class="player-headshot text-center position-relative z-index-1 mt-md-n5">#printHeadshot</div>
896:                         </div>
897:                         <div class="col-md-8 col-lg-9">
898:                             <div class="player-info">#printBioInfo</div>
899:                             <div class="mt-3 mx-3 w-100">
900:                                 #printHighlights
901:                             </div>
902:                         </div>
903:                     </div>
904:                 #else
905:                     <div class="row">
906:                         <div class="col-md-4 col-lg-12">
907:                             <div class="player-headshot text-center position-relative z-index-1 mb-3">#printHeadshot</div>
908:                         </div>
909:                         <div class="col-md-8 col-lg-12">
910:                             <div class="player-info mb-3">#printBioInfo</div>
911:                         </div>
912:                     </div>
913:                 #end
914:             </div>
915:         </div> ## bio-card
916: 
917:         #if ($view.length() > 0)
918:             $request.setAttribute("icl-responsive-tabs-script", true)
919: 
920:             <div class="bio-body ${classBody}">
921: 
922:                 <div class="d-flex flex-column align-items-center justify-content-start gap-3">
923:                     #if (!$enhancedLayout) #printHighlights #end
924:                     <div class="tab-container w-100">
925:                         #if ($statsURL.length() > 0 || $hasHTMLStats || $releases.size() > 0|| $playerPhotos.size() > 0 || $playerVideos.size() > 0)
926:                             <div class="$classBioTabParentsWrapper" data-momentum="false">
927:                                 <div class="jscroll-inner">
928:                                     <ul class="$classBioTabParents" id="bio-tabs-parents" role="tablist">
929:                                         #if ($hasSynopsis || $hasBioBrief)
930:                                             <li class="nav-item">
931:                                                 <a data-bs-toggle="tab" id="bio-tab" class="nav-link #if ($view == "bio") active#end" data-bs-target="#bio" href="${page.url}?view=bio">Bio</a>
932:                                             </li>
933:                                         #end
934: 
935:                                         #if ($statsURL.length() > 0)
936:                                             <li class="nav-item">
937:                                                 <a data-bs-toggle="tab" id="profile-tab" class="nav-link#if ($view == "profile") active#end" data-bs-target="#profile" href="${page.url}?view=profile">Player Profile</a>
938:                                             </li>
939:                                             <li class="nav-item">
940:                                                 <a data-bs-toggle="tab" id="gamelog-tab" class="nav-link#if ($view == "gamelog") active#end" data-bs-target="#gamelog" href="${page.url}?view=gamelog">Game Log</a>
941:                                             </li>
942:                                             #if ($showCareer)
943:                                                 <li class="nav-item">
944:                                                     <a data-bs-toggle="tab" id="career-tab" class="nav-link#if ($view == "career") active#end" data-bs-target="#career" href="${page.url}?view=career">Career Stats</a>
945:                                                 </li>
946:                                             #end
947:                                             <li class="nav-item">
948:                                                 <a data-bs-toggle="tab" id="splits-tab" class="nav-link#if ($view == "splits") active#end" data-bs-target="#splits" href="${page.url}?view=splits">Split Stats</a>
949:                                             </li>
950:                                         #end
951: 
952:                                         #if ($hasHTMLStats)
953:                                             <li class="nav-item">
954:                                                 <a data-bs-toggle="tab" id="htmlstats-tab" class="nav-link#if ($view == "htmlstats") active#end" data-bs-target="#htmlstats" href="${page.url}?view=htmlstats">HTML Stats</a>
955:                                             </li>
956:                                         #end
957: 
958:                                         #if ($releases.size() > 0)
959:                                             <li class="nav-item">
960:                                                 <a data-bs-toggle="tab" id="news-tab" class="nav-link#if ($view == "news") active#end" data-bs-target="#news" href="${page.url}?view=news">News</a>
961:                                             </li>
962:                                         #end
963: 
964:                                         #if ($playerPhotos.size() > 0)
965:                                             <li class="nav-item">
966:                                                 <a data-bs-toggle="tab" id="photos-tab" class="nav-link#if ($view == "photos") active#end" data-bs-target="#photos" href="${page.url}?view=photos">Photos</a>
967:                                             </li>
968:                                         #end
969: 
970:                                         #if ($playerVideos.size() > 0)
971:                                             <li class="nav-item">
972:                                                 <a data-bs-toggle="tab" id="videos-tab" class="nav-link#if ($view == "videos") active#end" data-bs-target="#videos" href="${page.url}?view=videos">Videos</a>
973:                                             </li>
974:                                         #end
975: 
976:                                         ## WEPLAYED MOMENTS - THIRD-PARTY SUPPORT PLUGIN
977:                                         #if (!$page.url.contains("/coaches") && $options.get("weplayed_addon_code"))
978:                                             <li class="nav-item weplayed-hide-no-data #if ($view == "weplayed") active#end">
979:                                                 <a data-toggle="tab" id="weplayed-tab" class="nav-link#if ($view == "weplayed") active#end" data-target="#weplayed" href="${page.url}?view=weplayed">#Moments</a>
980:                                             </li>
981:                                         #end
982:                                     </ul>
983:                                 </div>
984:                             </div>
985:                         #end
986:                         <div class="tab-content" id="roster-tab-content">
987:                             ## BIO
988:                             #if ($hasSynopsis || $hasBioBrief)
989:                                 #set ($class = "tab-panel")
990:                                 #if ($view == "bio")
991:                                    #set ($class = "tab-panel active show")
992:                                 #end
993: 
994:                                 <div class="tab-pane fade ${class}" id="bio" role="tabpanel" aria-labelledby="bio-tab">
995:                                     <div class="$classTabPaneContent synopsis">
996:                                         <h4 class="bio-tabbed-content-heading sr-only">Bio</h4>
997:                                         #if ($hasSynopsis)
998:                                           $synopsis
999:                                         #elseif ($hasBioBrief)
1000:                                           $website.include("$bioBriefURL")
1001:                                         #end
1002:                                     </div>
1003:                                 </div> ## tab-panel
1004:                             #end
1005: 
1006:                             ## STATS
1007:                             #if ($statsURL.length() > 0)
1008: 
1009:                                 ## PROFILE
1010:                                 #set ($class = "tab-panel")
1011:                                 #if ($view == "profile")
1012:                                    #set ($class = "tab-panel active show")
1013:                                 #end
1014: 
1015:                                 <div class="tab-pane fade ${class}" id="profile" role="tabpanel" aria-labelledby="profile-tab">
1016:                                     <div class="$classTabPaneContent stats-wrap">
1017:                                         <h4 class="bio-tabbed-content-heading sr-only">Recent Games</h4>
1018:                                         ## LAST SIX GAMES
1019:                                         <div class="row">
1020:                                             <div class="stats-box col-12">
1021:                                                 #printRecentGames()
1022:                                             </div>
1023: 
1024:                                             ## RANKING
1025:                                             <div class="stats-box col-12">
1026:                                                 #if ($statPos.length() > 0)
1027:                                                     $website.include("players?tmpl=stats-bios-rank-template&rank=${playerId}&pos=${statPos}")
1028:                                                 #end
1029:                                             </div>
1030:                                         </div>
1031:                                     </div> ## stats-wrap
1032:                                 </div> ## tab-content
1033: 
1034:                                 ## GAMELOG
1035:                                 #set ($class = "tab-panel")
1036:                                 #if ($view == "gamelog")
1037:                                    #set ($class = "tab-panel active show")
1038:                                 #end
1039: 
1040:                                 #set ($activePos = $statPos)
1041:                                 #if ($view == "gamelog" && $paramPos.length() > 0)
1042:                                     #if ($positions.get($paramPos).length() > 0)
1043:                                         #set ($activePos = $positions.get($paramPos))
1044:                                     #end
1045:                                 #end
1046: 
1047:                                 <div class="tab-pane fade ${class}" id="gamelog" role="tabpanel" aria-labelledby="gamelog-tab">
1048:                                     #if ($gamelogsCategoriesLabels)
1049:                                         <div class="$classTabPaneContent has-child-tabs">
1050:                                             <div class="$classBioTabChildrenWrapper" data-momentum="false">
1051:                                                 <div class="jscroll-inner">
1052:                                                     <ul class="$classBioTabChildren" id="bio-tabs-gamelog" role="tablist">
1053:                                                         #foreach($gamelogsCatLabel in $gamelogsCategoriesLabels.entrySet())
1054:                                                             #set($gamelogsCatLabelVal = $gamelogsCatLabel.value)
1055:                                                             #if ($locale == "en_gb" && $gamelogsCatLabelVal == "Defense")
1056:                                                                 #set($gamelogsCatLabelVal = "Defence")
1057:                                                             #end
1058:                                                             <li class="nav-item">
1059:                                                                 <a data-bs-toggle="tab" id="gamelog-tab-pos-${gamelogsCatLabel.key}" class="nav-link#if ($activePos == $gamelogsCatLabel.key) active#end" data-bs-target="#gamelog-tab-pos-${gamelogsCatLabel.key}-content" href="${page.url}?view=gamelog&pos=${gamelogsCatLabel.key}" aria-label="Game Log: ${gamelogsCatLabelVal}">$gamelogsCatLabelVal</a>
1060:                                                             </li>
1061:                                                         #end
1062:                                                     </ul>
1063:                                                 </div>
1064:                                             </div>
1065:                                             <div class="tab-content" id="gamelog-tab-content">
1066:                                                 #foreach($gamelogsCatLabel in $gamelogsCategoriesLabels.entrySet())
1067:                                                     #set ($class = "tab-panel")
1068:                                                     #if ($gamelogsCatLabel.key == $activePos)
1069:                                                        #set ($class = "tab-panel active show")
1070:                                                     #end
1071:                                                     <div class="tab-pane fade ${class}" id="gamelog-tab-pos-${gamelogsCatLabel.key}-content" role="tabpanel" aria-labelledby="gamelog-tab-pos-${gamelogsCatLabel.key}">
1072:                                                         <div class="stats-wrap $classTabPaneContent">
1073:                                                              <h4 class="bio-tabbed-content-heading sr-only">Game Log - <small class="text-muted"> $gamelogsCatLabel.value</small></h4></h4>
1074:                                                             #gamelogData($gamelogsCatLabel.key)
1075:                                                         </div>
1076:                                                     </div>
1077:                                                 #end
1078:                                             </div>
1079:                                         </div>
1080:                                     #else
1081:                                         <div class="stats-wrap $classTabPaneContent">#gamelogData($pos)</div>
1082:                                     #end
1083: 
1084:                                 </div> ## tab-panel
1085: 
1086:                                 ## CAREER
1087:                                 #if ($showCareer)
1088: 
1089:                                     #set ($activePos = $statPos)
1090:                                     #if ($view == "career" && $paramPos.length() > 0)
1091:                                         #if ($positions.get($paramPos).length() > 0)
1092:                                             #set ($activePos = $positions.get($paramPos))
1093:                                         #end
1094:                                     #end
1095: 
1096:                                     #set ($class = "tab-panel")
1097:                                     #if ($view == "career")
1098:                                        #set ($class = "tab-panel active show")
1099:                                     #end
1100: 
1101:                                     <div class="tab-pane fade ${class}" id="career" role="tabpanel" aria-labelledby="career-tab">
1102:                                         #if ($briefsCategoriesLabels)
1103:                                             #printCategories($briefsCategoriesLabels "career" "Career Stats")
1104:                                         #else
1105:                                             <div class="stats-wrap $classTabPaneContent">#careerData($activePos)</div>
1106:                                         #end
1107:                                     </div>
1108:                                 #end
1109: 
1110:                                 ## SPLITS
1111:                                 #set ($class = "tab-panel clearfix")
1112:                                 #if ($view == "splits")
1113:                                    #set ($class = "tab-panel active show")
1114:                                 #end
1115: 
1116:                                 #set ($activePos = $statPos)
1117:                                 #if ($view == "splits" && $paramPos.length() > 0)
1118:                                     #if ($positions.get($paramPos).length() > 0)
1119:                                         #set ($activePos = $positions.get($paramPos))
1120:                                     #end
1121:                                 #end
1122: 
1123:                                 <div class="tab-pane fade ${class}" id="splits" role="tabpanel" aria-labelledby="splits-tab">
1124:                                     #if ($briefsCategoriesLabels)
1125:                                         #printCategories($briefsCategoriesLabels "splits" "Splits Stats")
1126:                                     #else
1127:                                         <div class="stats-wrap $classTabPaneContent">#splitsData($pos)</div>
1128:                                     #end
1129:                                 </div>
1130:                             #end
1131: 
1132:                             ## HTML STATS
1133:                             #if ($hasHTMLStats)
1134:                                 #set ($class = "tab-panel clearfix")
1135:                                 #if ($view == "htmlstats")
1136:                                    #set ($class = "tab-panel active show")
1137:                                 #end
1138:                                 <div class="tab-pane fade ${class}" id="htmlstats" role="tabpanel" aria-labelledby="htmlstats-tab">
1139:                                     <div class="$classTabPaneContent">
1140:                                         <h4 class="bio-tabbed-content-heading">Other Stats</h4>
1141:                                         <a href="${htmlStatsURL}" class="bio-htmlstats-identifier">Click to view HTML Stats</a>
1142:                                     </div>
1143:                                 </div>
1144:                             #end
1145: 
1146:                             ## NEWS
1147:                             #if ($releases.size() > 0)
1148:                                 #set ($class = "tab-panel clearfix")
1149:                                 #if ($view == "news")
1150:                                    #set ($class = "tab-panel active show")
1151:                                 #end
1152:                                 <div class="tab-pane fade ${class}" id="news" role="tabpanel" aria-labelledby="news-tab">
1153:                                     <div class="$classTabPaneContent">
1154:                                         <h4 class="bio-tabbed-content-heading">News Mentions</h4>
1155:                                         #printGrid($releases, "article")
1156:                                     </div>
1157:                                 </div>
1158:                             #end
1159: 
1160:                             ## PHOTOS
1161:                             #if ($playerPhotos.size() > 0)
1162:                                 #set ($class = "tab-panel clearfix")
1163:                                 #if ($view == "photos")
1164:                                     #set ($class = "tab-panel active clearfix")
1165:                                 #end
1166:                                 <div class="tab-pane fade ${class}" id="photos" role="tabpanel" aria-labelledby="photos-tab">
1167:                                     <div class="$classTabPaneContent">
1168:                                         <h4 class="bio-tabbed-content-heading">Photos</h4>
1169:                                         $website.includeAgain("${page.url}?tmpl=bio-photos-template")
1170:                                     </div>
1171:                                 </div>
1172:                             #end
1173: 
1174:                             ## VIDEOS
1175:                             #if ($playerVideos.size() > 0)
1176:                                 #set ($class = "tab-panel clearfix")
1177:                                 #if ($view == "videos")
1178:                                     #set ($class = "tab-panel active clearfix")
1179:                                 #end
1180:                                 <div class="tab-pane fade ${class}" id="videos" role="tabpanel" aria-labelledby="videos-tab">
1181:                                     <div class="$classTabPaneContent">
1182:                                         <h4 class="bio-tabbed-content-heading">Videos</h4>
1183:                                         #printGrid($playerVideos, "video")
1184:                                     </div>
1185:                                 </div>
1186:                             #end
1187: 
1188:                             ## WEPLAYED MOMENTS - THIRD-PARTY SUPPORT PLUGIN
1189:                             #if (!$page.url.contains("/coaches") && $options.get("weplayed_addon_code"))
1190:                                 #set ($class = "tab-panel clearfix")
1191:                                 #if ($view == "weplayed")
1192:                                     #set ($class = "tab-panel active clearfix")
1193:                                 #end
1194:                                 <div class="tab-pane fade ${class} weplayed-hide-no-data" id="weplayed-tab" role="tabpanel" aria-labelledby="weplayed-tab">
1195:                                     <div class="$classTabPaneContent">
1196:                                         <div data-weplayed-widget></div>
1197:                                     </div>
1198:                                 </div>
1199:                             #end
1200: 
1201:                         </div> ## tab-panels
1202:                     </div> ## tab-container
1203:                 </div>
1204:             </div> ## body
1205:         #end
1206:     </div>
1207: </div>
1208: 
1209: $wiki
1210: </div> ## ends bio-wrap
1211: 
1212: ## GLOBAL ADS SERVER
1213: #if ($website.ads.isAdvertisingEnabled('BIOS'))
1214:     $website.includeAgain("global-adserver-slots?adSlot=bios")
1215: #end
1216: