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