18 - Kaitlin Nangle
There was a problem with a Velocity script
Page/bio-template
ErrorVM #printHeadshot: too many arguments to macro. Wanted 0 got 2 at bio-template[line 940, column 1]
Page source:
1: #if ($browser.getIphone() || $browser.getMobile())
2: 	## #set ($includeURL = "$page.url?tmpl=mobile-roster-template")  ##for roster templates
3: 	#set ($includeURL = "$page.url?tmpl=mobile-bios-template")  ##for bios templates
4: 	## #set ($includeURL = "$page.url?tmpl=mobile-schedule-template")  ##for schedules
5: 	## #set ($includeURL = "$page.url?tmpl=mobile-auction-template")  ##for auctions
6:    $website.includeAgain($includeURL)
7:    #stop
8: #else
9: 
10: 
11: ## PLEASE DELETE THIS TEMPLATE AFTER SITE LAUNCH
12: 
13: #if ($website.redesign)
14: ## NEW SITE
15: 
16: 
17: 
18: #if ($browser.getIphone() || $browser.getMobile())
19: 	#set ($isMobile = true)
20: #else
21: 	#set ($isMobile = false)
22: #end
23: 
24: ## PICK UP OPTIONS
25: $website.include("options")
26: #set ($options = $request.getAttribute("options"))
27: #set ($locale = "en_us")
28: #set ($locale = $options.get("locale"))
29:  
30: ## STATS DATA
31: #if ($request.getParameter("stats"))
32: 	
33: ## FETCH THE BIO URL FROM THE PARAMETER
34: #set ($bioURL = $request.getParameter("biourl"))
35: 
36: ## VIEW IS AVAILABLE PROVIDED WHEN REACHED HERE
37: #set ($view = $request.getParameter("view"))
38: 
39: #set ($pos = "")
40: #set ($pos = $attributes.get("position"))
41: #set ($posVec = $pos.split("/"))
42: #set ($pos = $posVec[0])
43: #set ($pos = $pos.toLowerCase())
44: #set ($statPos = $positions.get($pos))
45: 
46: #set ($playerId = $attributes.get("playerId"))
47: #set ($stats = $splits.overall)
48: 
49: #if ($locale == "en_us")
50: #set ($defLabel = 'Defense')
51: #elseif ($locale == "en_gb") 
52: #set ($defLabel = 'Defence')
53: #end
54: 
55: #macro (gamelogData $p)
56: 
57: #set ($p = $positions.get($p))
58: #set ($gamelogs = $gamelogs.get($p))
59: 
60: ## SECONDARY TAB CONTENT FOR ONLY FOOTBALL,  BASEBALL AND BASKETBALL
61: #if ($sport.enumCode == 0 || $sport.enumCode == 1 || $sport.enumCode == 2)
62:   #set ($class = "sub-tab-content")
63:   #if ($activePos == $p)
64:     #set ($class = "sub-tab-content active")
65:   #end
66:   #if ($isMobile)
67: 	<div class="mobile-bios-subtab-panel mobile-stats-panel-wrapper #if ($activePos == $p) active #end">
68:   #else
69: 	<div class="$class">
70:   #end
71: #end
72: 	
73: #if (! $isMobile)
74: 	<div class="stats-fullbox clearfix">
75: #else
76: 	<div class="mobile-stats-panel-container">
77: #end
78: <table>
79:   <tr>
80:     <th #if ($isMobile) width="10%" #end>Date</th>
81:     <th #if ($isMobile) class="mobile-stats-fixed-column" #*width="20%"*# #end>Opponent</th>
82:     <th>Score</th>
83:     #foreach ($gamelog in $gamelogs)
84:       <th>$gamelog</th>
85:     #end
86:   </tr>
87: 
88: #set ($counter = 0)
89: #foreach ($event in $events)
90:  #set ($counter = $counter + 1)
91:  #if ($counter % 2 == 0)
92:   #set ($row = "even")
93:  #else
94:   #set ($row = "odd")
95:  #end
96:   <tr class="${row}">
97:     <td>$formatter.formatDate($event.event.date, "MMM d")</td>
98:     <td #if ($isMobile) class="mobile-stats-fixed-column" #end>
99:     #if ($event.event.neutralSite.length() > 0) vs.
100:     #elseif (!$event.event.home) at
101:     #else ## nothing for a home game
102:     #end
103:     $event.event.opponent.name</td>
104:     <td class="align-center">
105:     #if ($event.event.statusCode >= 0)
106:       #if ($event.event.eventId.length() > 0 && $event.stats.size() > 0)
107:       <a href="../boxscores/${formatter.formatDate($event.event.date, "yyyyMMdd")}_${event.event.eventId.substring(0, 4)}.xml">${event.event.APResult}</a>
108:       #else
109:       ${event.event.APResult}
110:       #end
111:     #else &nbsp; #end
112:     </td>
113:     #foreach ($gamelog in $gamelogs.keySet())
114:       #set ($value = "-")
115:       #set ($value = $formatter.formatNumber($event.stats.get($gamelog), $formats.get($gamelog)))
116:       <td class="align-center">
117:       #if ($value.length() > 0)$value#else - #end
118:       </td>
119:     #end
120:   </tr>
121: #end
122: </table>
123: </div>
124: 
125: #if ($sport.enumCode == 0 || $sport.enumCode == 1 || $sport.enumCode == 2)
126:   </div>
127: #end
128: 
129: #end ## macro gamelogData
130: 
131: #macro (split $statPosBriefs $label $stats $class)
132:   <tr class="$!{class}">
133:     <td #if ($isMobile) class="mobile-stats-fixed-column" #end>${label}</td>
134:     #foreach ($brief in $statPosBriefs.keySet())
135:       #set ($value = "-")
136:       #set ($value = $!formatter.formatNumber($stats.get($brief), $formats.get($brief)))
137:       <td class="align-center">#if ($value.length() > 0) $value #else - #end</td>
138:     #end
139:   </tr>
140: #end
141: 
142: #set ($colspan = $statPosBriefs.size() + 1)
143: #macro (printSplitsHr)
144: 	#if ($isMobile)
145: 		<tr>
146: 			<td class="mobile-stats-fixed-column">&nbsp;</td>
147: 			<td colspan="$statPosBriefs.size()">&nbsp;</td>
148: 		</tr>
149: 	#else
150: 		<tr><td colspan="${colspan}"><hr /></td></tr>
151: 	#end
152: #end
153: 
154: #macro (splitsData $p)
155: 
156: #set ($p = $positions.get($p))
157: #set ($statPosBriefs = $briefs.get($p))
158: 
159: ## SECONDARY TAB CONTENT FOR ONLY FOOTBALL,  BASEBALL AND BASKETBALL
160: #if ($sport.enumCode == 0 || $sport.enumCode == 1 || $sport.enumCode == 2)
161:   #set ($class = "sub-tab-content")
162:   #if ($activePos == $p)
163:     #set ($class = "sub-tab-content active")
164:   #end
165:   #if ($isMobile)
166: 	<div class="mobile-bios-subtab-panel mobile-stats-panel-wrapper #if ($activePos == $p) active #end">
167:   #else
168: 	<div class="$class">
169:   #end
170: #end
171: 	
172: #if (! $isMobile) 
173: 	<div class="stats-fullbox clearfix">
174: #else
175: 	<div class="mobile-stats-panel-container">
176: #end
177: <table>
178:   <tr>
179:     <th #if ($isMobile) class="mobile-stats-fixed-column" #end>&nbsp;</th>
180:     #foreach ($brief in $statPosBriefs)
181:       <th>$brief</th>
182:     #end
183:   </tr>
184: 
185: #split($statPosBriefs, "Total", $splits.overall, "odd")
186: #split($statPosBriefs, "Conference", $splits.conference, "even")
187: #split($statPosBriefs, "Exhibition", $splits.exhibition, "odd")
188: 
189: #printSplitsHr()
190: 
191: #split($statPosBriefs, "Home", $splits.home, "odd")
192: #split($statPosBriefs, "Away", $splits.away, "even")
193: #split($statPosBriefs, "Neutral", $splits.neutral, "odd")
194: 
195: #printSplitsHr()
196: 
197: #split($statPosBriefs, "Wins", $splits.inWins, "odd")
198: #split($statPosBriefs, "Losses", $splits.inLosses, "even")
199: #if ($sport.enumCode == 5) ## Ice hockey
200:   #split($statPosBriefs, "Ties", $splits.inTies, "odd")
201: #end
202: 
203: #printSplitsHr()
204: 
205: ## Going to need to replace this with sound logic that does not use the sport to determine dates
206: #if ($sport.enumCode == 5) ## Ice hockey
207:  #split($statPosBriefs, "September", $splits.september, "odd")
208:  #split($statPosBriefs, "October", $splits.october, "even")
209:  #split($statPosBriefs, "November", $splits.november, "odd")
210:  #split($statPosBriefs, "December", $splits.december, "even")
211:  #split($statPosBriefs, "January", $splits.january, "odd")
212:  #split($statPosBriefs, "February", $splits.february, "even")
213:  #split($statPosBriefs, "March", $splits.march, "odd")
214:  #split($statPosBriefs, "April", $splits.april, "even")
215: #elseif ($sport.enumCode == 2) ## Basketball
216:  #split($statPosBriefs, "November", $splits.november, "odd")
217:  #split($statPosBriefs, "December", $splits.december, "even")
218:  #split($statPosBriefs, "January", $splits.january, "odd")
219:  #split($statPosBriefs, "February", $splits.february, "even")
220:  #split($statPosBriefs, "March", $splits.march, "odd")
221: #elseif ($sport.enumCode == 3 or $sport.enumCode == 9) ## Soccer or field hockey
222:  #split($statPosBriefs, "September", $splits.september, "odd")
223:  #split($statPosBriefs, "October", $splits.october, "even")
224:  #split($statPosBriefs, "November", $splits.november, "odd")
225:  #split($statPosBriefs, "December", $splits.december, "even")
226: #elseif ($sport.enumCode == 0) ## Football
227:  #split($statPosBriefs, "August", $splits.august, "odd")
228:  #split($statPosBriefs, "September", $splits.september, "even")
229:  #split($statPosBriefs, "October", $splits.october, "odd")
230:  #split($statPosBriefs, "November", $splits.november, "even")
231:  #split($statPosBriefs, "December", $splits.december, "odd")
232: #elseif ($sport.enumCode == 6 or $sport.enumCode == 10) ## Men's or women's lacrosse
233:  #split($statPosBriefs, "January", $splits.january, "odd")
234:  #split($statPosBriefs, "February", $splits.february, "even")
235:  #split($statPosBriefs, "March", $splits.march, "odd")
236:  #split($statPosBriefs, "April", $splits.april, "even")
237:  #split($statPosBriefs, "May", $splits.may, "odd")
238: #end
239: </table>
240: 
241: </div> ## stats-fullbox
242: 
243: #if ($sport.enumCode == 0 || $sport.enumCode == 1 || $sport.enumCode == 2)
244:   </div>
245: #end
246: 
247: #end ## macro splitsData
248: 
249: #macro (printRecentGames)
250: <table>
251: <tr><th colspan="3">Recent Games</th></tr>
252: #set ($eventEnd = -1)
253: #foreach ($event in $events)
254:   #if ($event.event.result.resolved)
255:     #set ($eventEnd = $velocityCount)
256:   #end
257: #end
258: #set ($eventStart = $eventEnd - 5)
259: #if ($eventStart < 0) #set ($eventStart = 0) #end
260: 
261: #set ($counter = 0)
262: #foreach ($event in $events)
263: #if ($velocityCount >= $eventStart and $velocityCount <= $eventEnd)
264: 
265:  #set ($counter = $counter + 1)
266:  #if ($counter % 2 == 0)
267:   #set ($row = "even")
268:  #else
269:   #set ($row = "odd")
270:  #end
271: 
272:   <tr class="${row}">
273:     <td>$formatter.formatDate($event.event.date, "MMM d")</td>
274:     <td>
275:     #if ($event.event.neutralSite.length() > 0) vs.
276:     #elseif (!$event.event.home) at
277:     #else ## nothing for a home game
278:     #end
279:     $event.event.opponent.name</td>
280:     <td>
281:     #if ($event.event.statusCode >= 0)
282:       #if ($event.event.eventId.length() > 0 && $event.stats.size() > 0)
283:       <a href="../boxscores/${formatter.formatDate($event.event.date, "yyyyMMdd")}_${event.event.eventId.substring(0, 4)}.xml">${event.event.APResult}</a>
284:       #else
285:       ${event.event.APResult}
286:       #end
287:     #end
288:   </tr>
289: #end ## if
290: #end
291: </table>
292: #end
293: 
294: #macro (printSubTab $pos $label $activePos $view)
295: 	<option #if ($activePos == $pos) selected="selected" #end value="${bioURL}?view=${view}&pos=${pos}">$!label</option>
296: #end
297: 
298: 
299: #if ($isMobile)
300: 
301: #set ($activePos = $statPos)
302: #if ($request.getParameter("view") == "gamelog" && $positions.get($request.getParameter("pos")).length() > 0)
303: 	#set ($activePos = $positions.get($request.getParameter("pos")))
304: #end
305: 
306: <div id="tab-gamelog">
307: 
308: ## SECONDARY TABS FOR ONLY FOOTBALL,  BASEBALL AND BASKETBALL
309: #if ($sport.enumCode == 0 || $sport.enumCode == 1 || $sport.enumCode == 2)
310: 	
311: <select class="mobile-bios-subtabs clearfix">
312: 
313: #if ($sport.enumCode == 0) ## Football
314: 
315: #printSubTab('gb', 'Passing', $activePos, 'gamelog')
316: #printSubTab('rb', 'Rushing', $activePos, 'gamelog')
317: #printSubTab('wr', 'Receiving', $activePos, 'gamelog')
318: #printSubTab('k', 'Kicking', $activePos, 'gamelog')
319: #printSubTab('p', 'Punting', $activePos, 'gamelog')
320: #printSubTab('kr', 'Returns', $activePos, 'gamelog')
321: #printSubTab('d', $defLabel, $activePos, 'gamelog')
322: 
323: #elseif ($sport.enumCode == 1) ## Baseball
324: 
325: #printSubTab('h', 'Hitting', $activePos, 'gamelog')
326: #printSubTab('p', 'Pitching', $activePos, 'gamelog')
327: #printSubTab('f', 'Fielding', $activePos, 'gamelog')
328: 
329: #elseif ($sport.enumCode == 2) ## Basketball
330: 
331: #printSubTab('sh', 'Shooting', $activePos, 'gamelog')
332: #printSubTab('bc', 'Ball control', $activePos, 'gamelog')
333: 
334: #end
335: 
336: </select> ## stats-tabs-secondary
337: 
338: #end ## sport check for secondary tabs
339: 
340: #if ($sport.enumCode == 0) ## Football
341: 
342:   #gamelogData("qb") ## PASSING
343:   #gamelogData("rb") ## RUSHING
344:   #gamelogData("wr") ## RECEIVING
345:   #gamelogData("k") ## KICKING
346:   #gamelogData("p") ## PUNTING
347:   #gamelogData("kr") ## RETURNS
348:   #gamelogData("d") ## DEFENSE
349:   
350: #elseif ($sport.enumCode == 1) ## Baseball
351: 
352:   #gamelogData("h") ## HITTING
353:   #gamelogData("p") ## PITCHING
354:   #gamelogData("f") ## FIELDING
355:   
356: #elseif ($sport.enumCode == 2)
357: 
358:   #gamelogData("sh") ## SHOOTING
359:   #gamelogData("bc") ## BALL CONTROL
360:   
361: #else
362: 	
363:   #gamelogData($pos)
364:   
365: #end
366: 	
367: </div> ## tab-content
368: ## END GAMELOG
369: 
370: ## SPLITS
371: #set ($activePos = $statPos)
372: #if ($request.getParameter("view") == "splits" && $positions.get($request.getParameter("pos")).length() > 0)
373: 	#set ($activePos = $positions.get($request.getParameter("pos")))
374: #end
375: 
376: 
377: <div id="tab-splits">
378: 
379: ## SECONDARY TABS FOR ONLY FOOTBALL,  BASEBALL AND BASKETBALL
380: #if ($sport.enumCode == 0 || $sport.enumCode == 1 || $sport.enumCode == 2)
381: 	<select class="mobile-bios-subtabs clearfix">
382: 		#if ($sport.enumCode == 0) ## Football
383: 
384: 			#printSubTab('gb', 'Passing', $activePos, 'splits')
385: 			#printSubTab('rb', 'Rushing', $activePos, 'splits')
386: 			#printSubTab('wr', 'Receiving', $activePos, 'splits')
387: 			#printSubTab('k', 'Kicking', $activePos, 'splits')
388: 			#printSubTab('p', 'Punting', $activePos, 'splits')
389: 			#printSubTab('kr', 'Returns', $activePos, 'splits')
390: 			#printSubTab('d', $defLabel, $activePos, 'splits')
391: 
392: 		#elseif ($sport.enumCode == 1) ## Baseball
393: 
394: 			#printSubTab('h', 'Hitting', $activePos, 'splits')
395: 			#printSubTab('p', 'Pitching', $activePos, 'splits')
396: 			#printSubTab('f', 'Fielding', $activePos, 'splits')
397: 
398: 		#elseif ($sport.enumCode == 2) ## Basketball
399: 
400: 			#printSubTab('sh', 'Shooting per game', $activePos, 'splits')
401: 			#printSubTab('st', 'Shooting', $activePos, 'splits')
402: 			#printSubTab('bc', 'Ball control per game', $activePos, 'splits')
403: 			#printSubTab('bt', 'Ball control', $activePos, 'splits')
404: 
405: 		#end
406: 	</select>
407: #end ## sport check for secondary tabs
408: 	
409: #if ($sport.enumCode == 0) ## Football
410: 
411: ## <div class="sub-tab-panels">
412: 	#splitsData("qb") ## PASSING
413: 	#splitsData("rb") ## RUSHING
414: 	#splitsData("wr") ## RECEIVING
415: 	#splitsData("k") ## KICKING
416: 	#splitsData("p") ## PUNTING
417: 	#splitsData("kr") ## RETURNS
418: 	#splitsData("d") ## DEFENSE
419: ## </div>
420: 	
421: #elseif ($sport.enumCode == 1) ## Baseball
422: 
423: ## <div class="sub-tab-panels">
424: 	#splitsData("h") ## HITTING
425: 	#splitsData("p") ## PITCHING
426: 	#splitsData("f") ## FIELDING
427: ## </div>
428: 	
429: #elseif ($sport.enumCode == 2) ## Basketball
430: 	
431: ## <div class="sub-tab-panels">
432: 	#splitsData("sh") ## SHOOTING PER GAME
433: 	#splitsData("st") ## SHOOTING
434: 	#splitsData("bc") ## BALL CONTROL PER GAME
435: 	#splitsData("bt") ## BALL CONTROL
436: ## </div>
437: 
438: #else
439: 	
440: 	#splitsData($pos)
441: 	
442: #end
443: 
444: </div> ## tab-content
445: ## SPLITS
446: 
447: 
448: 
449: 
450: 
451: #else
452: 
453: 
454: 
455: ## PROFILE
456: #set ($class = "tab-content clearfix")
457: #if ($view == "profile")
458: 	#set ($class = "tab-content clearfix active")
459: #end
460: <div class="${class}">
461: <div class="stats-wrapper clearfix">
462: 
463: ## LAST SIX GAMES
464: <div class="stats-halfbox-left">
465: #printRecentGames()
466: </div>
467: 
468: ## RANKING
469: $website.include("../players?tmpl=stats-bios-rank-template&rank=${playerId}&pos=${statPos}")
470: 
471: </div> ## stats-wrapper	
472: </div> ## tab-content
473: ## PROFILE
474: 
475: ## GAMELOG
476: #set ($class = "tab-content clearfix")
477: #if ($view == "gamelog")
478: 	#set ($class = "tab-content clearfix active")
479: #end
480: 
481: #set ($activePos = $statPos)
482: #if ($request.getParameter("view") == "gamelog" && $positions.get($request.getParameter("pos")).length() > 0)
483: 	#set ($activePos = $positions.get($request.getParameter("pos")))
484: #end
485: 
486: <div class="${class}">
487: <div class="stats-wrapper clearfix">
488: 
489: ## SECONDARY TABS FOR ONLY FOOTBALL,  BASEBALL AND BASKETBALL
490: #if ($sport.enumCode == 0 || $sport.enumCode == 1 || $sport.enumCode == 2)
491: 	
492: <div class="stats-tabs-secondary clearfix">
493: <ul class="clearfix">
494: 
495: #if ($sport.enumCode == 0) ## Football
496: 
497: #if ($activePos == "qb")<li class="active">#else <li> #end<a href="${bioURL}?view=gamelog&pos=qb">Passing</a></li>
498: 
499: #if ($activePos == "rb")<li class="active">#else <li> #end<a href="${bioURL}?view=gamelog&pos=rb">Rushing</a></li>
500: 
501: #if ($activePos == "wr")<li class="active">#else <li> #end<a href="${bioURL}?view=gamelog&pos=wr">Receiving</a></li>
502: 
503: #if ($activePos == "k")<li class="active">#else <li> #end<a href="${bioURL}?view=gamelog&pos=k">Kicking</a></li>
504: 
505: #if ($activePos == "p")<li class="active">#else <li> #end<a href="${bioURL}?view=gamelog&pos=p">Punting</a></li>
506: 
507: #if ($activePos == "kr")<li class="active">#else <li> #end<a href="${bioURL}?view=gamelog&pos=kr">Returns</a></li>
508: 
509: #if ($activePos == "d")<li class="active">#else <li> #end<a href="${bioURL}?view=gamelog&pos=d">#if ($locale == "en_us")Defense #elseif ($locale == "en_gb") Defence #end</a></li>
510: 
511: #elseif ($sport.enumCode == 1) ## Baseball
512: 
513: #if ($activePos == "h")<li class="active">#else <li> #end<a href="${bioURL}?view=gamelog&pos=h">Hitting</a></li>
514: 
515: #if ($activePos == "p")<li class="active">#else <li> #end<a href="${bioURL}?view=gamelog&pos=p">Pitching</a></li>
516: 
517: #if ($activePos == "f")<li class="active">#else <li> #end<a href="${bioURL}?view=gamelog&pos=f">Fielding</a></li>
518: 
519: #elseif ($sport.enumCode == 2) ## Basketball
520: 
521: #if ($activePos == "sh")<li class="active">#else <li> #end<a href="${bioURL}?view=gamelog&pos=sh">Shooting</a></li>
522: 
523: #if ($activePos == "bc")<li class="active">#else <li> #end<a href="${bioURL}?view=gamelog&pos=bc">Ball control</a></li>
524: 
525: #end
526: 
527: </ul>
528: </div> ## stats-tabs-secondary
529: 
530: #end ## sport check for secondary tabs
531: 
532: #if ($sport.enumCode == 0) ## Football
533: 
534: <div class="sub-tab-panels">
535:   #gamelogData("qb") ## PASSING
536:   #gamelogData("rb") ## RUSHING
537:   #gamelogData("wr") ## RECEIVING
538:   #gamelogData("k") ## KICKING
539:   #gamelogData("p") ## PUNTING
540:   #gamelogData("kr") ## RETURNS
541:   #gamelogData("d") ## DEFENSE
542: </div>
543:   
544: #elseif ($sport.enumCode == 1) ## Baseball
545: 
546: <div class="sub-tab-panels">
547:   #gamelogData("h") ## HITTING
548:   #gamelogData("p") ## PITCHING
549:   #gamelogData("f") ## FIELDING
550: </div>
551:   
552: #elseif ($sport.enumCode == 2)
553: 
554: <div class="sub-tab-panels">
555:   #gamelogData("sh") ## SHOOTING
556:   #gamelogData("bc") ## BALL CONTROL
557: </div>
558:   
559: #else
560: 	
561:   #gamelogData($pos)
562:   
563: #end
564: 	
565: </div> ## stats-wrapper
566: </div> ## tab-content
567: ## GAMELOG
568: 
569: ## SPLITS
570: #set ($class = "tab-content clearfix")
571: #if ($view == "splits")
572: 	#set ($class = "tab-content clearfix active")
573: #end
574: 
575: #set ($activePos = $statPos)
576: #if ($request.getParameter("view") == "splits" && $positions.get($request.getParameter("pos")).length() > 0)
577: 	#set ($activePos = $positions.get($request.getParameter("pos")))
578: #end
579: 
580: <div class="${class}">
581: <div class="stats-wrapper clearfix">
582: 
583: ## SECONDARY TABS FOR ONLY FOOTBALL,  BASEBALL AND BASKETBALL
584: #if ($sport.enumCode == 0 || $sport.enumCode == 1 || $sport.enumCode == 2)
585: 	
586: <div class="stats-tabs-secondary clearfix">
587: <ul class="clearfix">
588: 
589: #if ($sport.enumCode == 0) ## Football
590: 
591: #if ($activePos == "qb")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=qb">Passing</a></li>
592: 
593: #if ($activePos == "rb")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=rb">Rushing</a></li>
594: 
595: #if ($activePos == "wr")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=wr">Receiving</a></li>
596: 
597: #if ($activePos == "k")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=k">Kicking</a></li>
598: 
599: #if ($activePos == "p")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=p">Punting</a></li>
600: 
601: #if ($activePos == "kr")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=kr">Returns</a></li>
602: 
603: #if ($activePos == "d")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=d">#if ($locale == "en_us")Defense #elseif ($locale == "en_gb") Defence #end</a></li>
604: 
605: #elseif ($sport.enumCode == 1) ## Baseball
606: 
607: #if ($activePos == "h")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=h">Hitting</a></li>
608: 
609: #if ($activePos == "p")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=p">Pitching</a></li>
610: 
611: #if ($activePos == "f")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=f">Fielding</a></li>
612: 
613: #elseif ($sport.enumCode == 2) ## Basketball
614: 
615: #if ($activePos == "sh")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=sh">Shooting per game</a></li>
616: 
617: #if ($activePos == "st")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=st">Shooting</a></li>
618: 
619: #if ($activePos == "bc")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=bc">Ball control per game</a></li>
620: 
621: #if ($activePos == "bt")<li class="active">#else <li> #end<a href="${bioURL}?view=splits&pos=bt">Ball control</a></li>
622: 
623: #end
624: </ul>
625: </div> ## stats-tabs-secondary
626: #end ## sport check for secondary tabs
627: 	
628: #if ($sport.enumCode == 0) ## Football
629: 
630: <div class="sub-tab-panels">
631: 	#splitsData("qb") ## PASSING
632: 	#splitsData("rb") ## RUSHING
633: 	#splitsData("wr") ## RECEIVING
634: 	#splitsData("k") ## KICKING
635: 	#splitsData("p") ## PUNTING
636: 	#splitsData("kr") ## RETURNS
637: 	#splitsData("d") ## DEFENSE
638: </div>
639: 	
640: #elseif ($sport.enumCode == 1) ## Baseball
641: 
642: <div class="sub-tab-panels">
643: 	#splitsData("h") ## HITTING
644: 	#splitsData("p") ## PITCHING
645: 	#splitsData("f") ## FIELDING
646: </div>
647: 	
648: #elseif ($sport.enumCode == 2) ## Basketball
649: 	
650: <div class="sub-tab-panels">
651: 	#splitsData("sh") ## SHOOTING PER GAME
652: 	#splitsData("st") ## SHOOTING
653: 	#splitsData("bc") ## BALL CONTROL PER GAME
654: 	#splitsData("bt") ## BALL CONTROL
655: </div>
656: 
657: #else
658: 	
659: 	#splitsData($pos)
660: 	
661: #end
662: 
663: </div> ## stats-wrapper
664: </div> ## tab-content
665: ## SPLITS
666: 
667: #end ## MOBILE / DESKTOP STATS
668: 
669: #else
670: ## BIO
671: 
672: ## CHANGES FOR STATS
673: 
674: ## HACK TO GET STATS URL FROM RENDERER... NEEDS SERVER CHANGE
675: #set ($bioObject = $page.getDataAsObject())
676: #set ($statsURL = $bioObject.statsURL)
677: ## END OF HACK
678: 
679: #if ($statsURL.length() > 0)
680:   $website.includeAgain("${statsURL}?tmpl=bio-stats-template")
681:   ## various settings to get the variables set
682:   #set ($events = $request.getAttribute("bio_events"))
683:   #set ($labels = $request.getAttribute("bio_labels"))
684:   #set ($briefs = $request.getAttribute("bio_briefs"))
685:   #set ($gamelogs = $request.getAttribute("bio_gamelogs"))
686:   #set ($splits = $request.getAttribute("bio_splits"))
687:   #set ($statPosition = $request.getAttribute("bio_position"))
688:   #set ($positions = $request.getAttribute("bio_positions"))
689:   #set ($playerId = $request.getAttribute("bio_player_id"))
690:   #set ($highlights = $request.getAttribute("bio_highlights"))
691:   #set ($formats = $request.getAttribute("bio_formats"))
692: #end
693: 
694: ## END CHANGES FOR STATS
695: 
696: #set ($pos = "")
697: #set ($pos = $attributes.get("position"))
698: #set ($pos = $statPosition)
699: #set ($pos = $pos.toLowerCase())
700: #set ($posVec = $pos.split("/"))
701: #set ($pos = $posVec[0])
702: #set ($pos = $positions.get($pos))
703: #set ($highlights = $highlights.get($pos))
704: 
705: #set ($showHighlights = true)
706: #if ($options.get("bio_show_highlights") && $options.get("bio_show_highlights") == false)
707: 	#set ($showHighlights = false)
708: #end
709: 
710: #set ($labels = $labels.get($pos))
711: #set ($briefs = $briefs.get($pos))
712: #set ($gamelogs = $gamelogs.get($pos))
713: #set ($stats = $splits.overall)
714: #set ($hasEvents = $events.size() > 0)
715: #set ($hasSynopsis = $synopsis.length() > 1 && $synopsis.indexOf("<center>") == -1)
716: #set ($htmlStatsURL = "${page.url}-stats")
717: #set ($hasHTMLStats = $website.exists($htmlStatsURL))
718: #set ($bioBriefURL = "${page.url}-brief")
719: #set ($hasBioBrief = $website.exists("$bioBriefURL"))
720: #set ($showRoster = ($page.contentType == "loki/bio" && $page.headlinesFeatured.size() > 0) || ($page.contentType == "loki/bio-network" && $page.sectionPage.children.size() > 1))
721: #if ($options.get("bio_hide_roster") == true)
722: 	#set ($showRoster = false)
723: #end
724: 
725: ## Always default to the bio page if available
726: #set ($view = "bio")
727: 
728: #if ($hasSynopsis || $hasBioBrief)
729: 	#set ($view = "bio")
730: #elseif ($hasEvents)
731: 	#set ($view = "profile")
732: #elseif ($hasHTMLStats)
733: 	#set ($view = "htmlstats")
734: #else
735: 	#set ($view = "")
736: #end
737: 
738: #if ($options.get("bio_default_view").length() > 0)
739: 	#set ($checkView = $options.get("bio_default_view"))
740: #end
741: 
742: #if ($request.getParameter("view"))
743: 	#set ($checkView = $request.getParameter("view"))
744: #end
745: 
746: #if ($checkView == "profile" && $hasEvents)
747: 	#set ($view = "profile")
748: #elseif ($checkView == "bio" && ($hasSynopsis || $hasBioBrief))
749: 	#set ($view = "bio")
750: #elseif ($checkView == "gamelog" && $hasEvents)
751: 	#set ($view = "gamelog")
752: #elseif ($checkView == "splits" && $hasEvents)
753: 	#set ($view = "splits")
754: #elseif ($checkView == "htmlstats" && $hasHTMLStats)
755: 	#set ($view = "htmlstats")
756: #end
757: 
758: #if ($attributes.get("full_name"))
759: 	#set ($fullName = $attributes.get("full_name"))
760: #else
761: 	#set ($firstName = $!attributes.get("first_name"))
762: 	#set ($lastName = $!attributes.get("last_name"))
763: 	#set ($fullName = "${firstName} ${lastName}")
764: #end
765: 
766: #macro (printHeadshot $width $height)
767: 	#if ($headshot.url)
768: 		<img src="$headshot.url?max_width=$!width&max_height=$!height" alt="$fullName" title="$fullName" class="bio-headshot" />
769: 	#else
770: 		#if ($website.exists("/images/setup/headshot_default.jpg"))
771: 			<img src="/images/setup/headshot_default.jpg?max_width=$!width&max_height=$!height" alt="$fullName" title="$fullName" class="bio-headshot" />
772: 		#else
773: 			<img src="/info/images/default_headshot.jpg?max_width=$!width&max_height=$!height" alt="$fullName" title="$fullName" class="bio-headshot" />
774: 		#end
775: 	#end
776: #end
777: 
778: #if ($isMobile)
779: 
780: #set ($hasBioTab = false)
781: #if ($hasSynopsis || $hasBioBrief)
782: 	#set ($hasBioTab = true)
783: #end
784: 
785: #set ($hasProfileTab = false)
786: #if (($highlights && $showHighlights) || $events.size() > 0 || $website.exists("$statsURL/../players"))
787: 	#set ($hasProfileTab = true)
788: #end
789: 
790: <script type="text/javascript">
791: 	window.mobileConf = {
792: 		page : 'bios',
793: 		pageParams : {
794: 			view : '$!view'
795: 		}
796: 	}
797: </script>
798: 
799: <div class="bios">
800: 	<div class="profile">
801: 		<div class="images">
802: 			<div class="photo">
803: 				#printHeadshot(81, 116)
804: 			</div>				
805: 			#if ($attributes.get("number"))	<div class="number"> $!attributes.get("number") </div> #end
806: 		</div>
807: 		<div class="texts">
808: 			<div class="name">$!attributes.get("first_name") $!attributes.get("last_name")</div>
809: 			<div class="data">
810: 				#foreach ($field in $fields)
811: 					#if (! $field.key.startsWith("custom"))
812: 						#if ($attributes.get($field.key).length() > 0 && ($field.key != "first_name" && $field.key != "last_name" && $field.key != "number" && $field.key != "full_name"))
813: 
814: 							#if ($field.key == "phone1" || $field.key == "phone2")
815: 								Phone: $!attributes.get($field.key) <br />
816: 							#elseif ($field.key == "email_address")
817: 								#set ($emailAdd = $attributes.get($field.key))
818: 								Email: <a href="mailto:${emailAdd}">$emailAdd</a> <br />
819: 							#else
820: 								$field.value: $!attributes.get($field.key) <br />
821: 							#end
822: 
823: 							#set ($counter = $counter + 1)
824: 						#end
825: 					#end
826: 				#end
827: 					
828: 				#foreach ($i in [1..10])
829: 					#set ($customKey = "bio_custom${i}")
830: 					#if ($options.get($customKey).length() > 0 && $attributes.get("custom${i}"))
831: 						$options.get($customKey): </td><td class="val">$!attributes.get("custom${i}") <br />
832: 						#set ($counter = $counter + 1)
833: 					#end
834: 				#end
835: 				
836: 			</div>
837: 		</div>
838: 	</div>	
839: 
840: 	#if ($hasBioTab || $hasProfileTab)
841: 	<div class="details mobile-tabs mobile-stats" id="mobile-bios-tabs-container">
842: 		<ul class="mobile-bios-tabs">
843: 			#if ($hasBioTab)
844: 				<li><a data-view="bio" href="#tab-bios">Bio</a></li>
845: 			#end
846: 			#if ($hasProfileTab)
847: 				<li><a data-view="profile" href="#tab-profile">Profile</a></li>
848: 			#end
849: 			#if ($hasEvents)
850: 				<li><a data-view="gamelog" href="#tab-gamelog">Game Log</a></li>
851: 				<li><a data-view="splits" href="#tab-splits">Splits</a></li>
852: 			#end
853: 		</ul>
854: 		
855: 		#if ($hasBioTab)
856: 		<div id="tab-bios">
857: 			#if ($hasSynopsis)
858: 				$synopsis
859: 			#elseif ($hasBioBrief)
860: 				<p>$website.include("$bioBriefURL")</p>
861: 			#end
862: 		</div>
863: 		#end
864: 		
865: 		#if ($hasProfileTab)
866: 		#set ($cellWidth = $tool.math.toInteger($tool.math.div(100, $highlights.size())))
867: 			
868: 		<div id="tab-profile">
869: 			## HIGHLIGHTS
870: 			#if ($highlights && $showHighlights)
871: 				<div class="bios-stat-wrapper">
872: 					<h4>Highlights</h4>
873: 					<table width="100%"><tr>
874: 					#foreach ($highlight in $highlights.keySet())
875: 						<th #if (! $isMobile) width="18%" #else width="${cellWidth}%" #end>$!highlights.get($highlight)</th>
876: 					#end
877: 					</tr><tr>
878: 					#foreach ($highlight in $highlights.keySet())
879: 						<td>
880: 						#set ($value = "-")
881: 						#set ($value = $formatter.formatNumber($stats.get($highlight), $formats.get($highlight)))
882: 						#if ($value.length() > 0)
883: 							<span class="value">$value</span>
884: 						#else
885: 							<span class="value">-</span>
886: 						#end	
887: 						</td>
888: 					#end
889: 					</tr></table>
890: 				</div>
891: 			#end
892: 			
893: 			## RECENT GAMES
894: 			#if ($events.size() > 0)
895: 			<div class="bios-stat-wrapper">
896: 				##<h4>Recent Games</h4>
897: 				#printRecentGames()
898: 			</div>
899: 			#end
900: 			
901: 			<div class="bios-stat-wrapper">
902: 				$website.include("$statsURL/../players?tmpl=stats-bios-rank-template&rank=${playerId}&pos=${pos}")
903: 			</div>
904: 			
905: 		</div>
906: 		#end
907: 		
908: 		## STATS TABS
909: 		#if ($hasEvents)
910: 			$website.includeAgain("${statsURL}?tmpl=bio-template&stats=1&biourl=${tool.esc.url($page.url)}&view=${view}&pos=${request.getParameter('pos')}")
911: 			
912: 			<div id="tab-splits"></div>
913: 			
914: 		#end
915: 		
916: 	</div>
917: 	#end
918: </div>   
919:    
920:    
921: #else
922: ## NOT MOBILE
923: 
924: <head>
925: 	<title>$fullName #if ($attributes.get("team")) | $attributes.get("team")#end</title>
926: 	## <link rel="stylesheet" type="text/css" href="/info/bio-styles.css" />
927: </head>
928: 
929: ## FULL ROSTER
930: <div class="bio-wrap clearfix">
931: 
932: <div class="head clearfix">
933: 
934: <div class="bio-title">#if ($attributes.get("number"))<span class="number">$!attributes.get("number") - #end</span><span class="name">$fullName</span></div>
935: 
936: <div class="about">
937: 
938: <div class="clearfix">
939: 
940: #printHeadshot(150, 200)
941: 
942: #set ($counter = 0)
943: <table cellpadding="5" cellspacing="5" border="0">
944: 
945: #foreach ($i in [1..10])
946: 	#set ($stickyKey = "bio_custom${i}_sticky")
947: 	#if ($options.get($stickyKey).length() > 0 && $attributes.get("custom${i}").length() > 0)
948: 		<tr><td class="lbl">$options.get($stickyKey): </td><td class="val">$!attributes.get("custom${i}")</td></tr>
949: 		#set ($counter = $counter + 1)
950: 	#end
951: #end
952: 
953: #foreach ($field in $fields)
954: 	#if (! $field.key.startsWith("custom"))
955: 		#if ($attributes.get($field.key).length() > 0 && ($field.key != "first_name" && $field.key != "last_name" && $field.key != "number" && $field.key != "full_name"))
956: 
957: 			#if ($field.key == "phone1" || $field.key == "phone2")
958: 				<tr><td class="lbl">Phone: </td><td class="val">$!attributes.get($field.key)</td></tr>
959: 			#elseif ($field.key == "email_address")
960: 				#set ($emailAdd = $attributes.get($field.key))
961: 				<tr><td class="lbl">Email: </td><td class="val"><a href="mailto:${emailAdd}">$emailAdd</a></td></tr>
962: 			#else
963: 				<tr><td class="lbl">$field.value: </td><td class="val">$!attributes.get($field.key)</td></tr>
964: 			#end
965: 
966: 			#set ($counter = $counter + 1)
967: 		#end
968: 	#end
969: #end
970: 
971: #foreach ($i in [1..10])
972: 	#set ($customKey = "bio_custom${i}")
973: 	#if ($options.get($customKey).length() > 0 && $attributes.get("custom${i}"))
974: 		<tr><td class="lbl">$options.get($customKey): </td><td class="val">$!attributes.get("custom${i}")</td></tr>
975: 		#set ($counter = $counter + 1)
976: 	#end
977: #end
978: 
979: </table>
980: 
981: </div> ## clearfix
982: </div> ## ends about
983: 
984: #if ($highlights && $showHighlights)
985: <div class="headstats">
986: 	#foreach ($highlight in $highlights.keySet())
987: 		<div class="hst">
988: 		<span class="title" title="$!highlights.get($highlight)">$!highlights.get($highlight)</span>
989: 		#set ($value = "-")
990: 		#set ($value = $formatter.formatNumber($stats.get($highlight), $formats.get($highlight)))
991: 		#if ($value.length() > 0)
992: 			<span class="value">$value</span>
993: 		#else
994: 			<span class="value">-</span>
995: 		#end
996: 		</div>
997: 	#end
998: </div>
999: #end ## if-highlights
1000: 
1001: </div> ## ends head
1002: 
1003: #if ($hasSynopsis || $hasBioBrief || $hasEvents || $hasHTMLStats || $showRoster)
1004: <div class="stats-tabs clearfix">
1005: 	#if (($hasSynopsis || $hasBioBrief || $hasEvents || $hasHTMLStats) && $view.length() > 0)
1006: 	<ul class="clearfix">
1007: 		#if ($hasSynopsis || $hasBioBrief)
1008: 			#if ($view == "bio")<li class="active">#else<li>#end<a href="${page.url}?view=bio">Bio</a></li>
1009: 		#end
1010: 		
1011: 		#if ($hasEvents)
1012: 			#if ($view == "profile")<li class="active">#else<li>#end<a href="${page.url}?view=profile">Player Profile</a></li>
1013: 			#if ($view == "gamelog")<li class="active">#else<li>#end<a href="${page.url}?view=gamelog">Game Log</a></li>
1014: 			#if ($view == "splits")<li class="active">#else<li>#end<a href="${page.url}?view=splits">Split Stats</a></li>
1015: 		#end
1016: 
1017: 		#if ($hasHTMLStats)
1018: 			#if ($view == "htmlstats")<li class="active">#else<li>#end<a href="${page.url}?view=htmlstats">HTML Stats</a></li>
1019: 		#end
1020: 	</ul>
1021: 	#end
1022: 	#if ($showRoster)
1023: 		#if ($page.contentType == "loki/bio")
1024: 			#set ($headlinesFeaturedSize = 0)
1025: 			#foreach ($featuredPage in $page.headlinesFeatured)
1026: 				#if ($featuredPage.contentType == "loki/headlines")
1027: 					#set ($headlinesFeaturedSize = $headlinesFeaturedSize + 1)
1028: 				#end
1029: 			#end
1030: 			#if ($headlinesFeaturedSize > 0)
1031: 				<select class="roster-select-list">
1032: 					<option selected="selected" class="bold">Related Bios</option>
1033:     			#foreach ($featuredPage in $page.headlinesFeatured)
1034:     				#if ($featuredPage.contentType == "loki/headlines")
1035:     					$website.includeAgain("${featuredPage.url}?tmpl=roster-list-template&current_url=${page.url}")
1036:     				#end
1037: 				#end
1038: 				</select>
1039: 			#end
1040: 		#elseif ($page.contentType == "loki/bio-network")
1041: 			#set ($relatedPlayers = $page.sectionPage.children)
1042: 			#set ($teamNames = {})
1043: 			#foreach ($relatedPlayer in $relatedPlayers)
1044: 				#if ($relatedPlayer.contentType == "loki/bio-network")
1045: 					#set ($relatedPlayerObj = $relatedPlayer.getDataAsObject().getAttributes())
1046: 					## <span class="none relatedplayeratt">$relatedPlayerObj</span>
1047: 					#set ($teamName = $relatedPlayerObj.get("team"))
1048: 					#if ($teamName.length() > 0)
1049:     					#if (!$teamNames.containsValue($teamName))
1050:     						$!teamNames.put($tool.math.add($teamNames.size(), 1), $teamName)
1051:     					#end
1052: 					#end
1053: 				#end
1054: 			#end
1055: 			##<span class="none teamnames">$teamNames</span>
1056: 			<select class="roster-select-list">
1057: 			#foreach ($i in [1..$teamNames.size()])
1058: 				#if ($teamNames.size() > 1)
1059: 					<optgroup label="$teamNames.get($i)">
1060: 				#end
1061: 				
1062: 				#foreach ($relatedPlayer in $relatedPlayers)
1063: 					#if ($relatedPlayer.contentType == "loki/bio-network")
1064: 						#set ($relatedPlayerObj = $relatedPlayer.getDataAsObject().getAttributes())
1065: 						#set ($teamName = $relatedPlayerObj.get("team"))
1066: 						#if ($teamName.length() > 0 && $teamName == $teamNames.get($i))
1067: 							#set ($playerFirstName = $relatedPlayerObj.get("first_name"))
1068: 							#set ($playerLastName = $relatedPlayerObj.get("last_name"))
1069: 							#if ($page.url == $relatedPlayer.url)
1070: 								<option value="$relatedPlayer.url" selected="selected" class="bold">${playerFirstName} ${playerLastName}</option>
1071: 							#else
1072: 								<option value="$relatedPlayer.url">${playerFirstName} ${playerLastName}</option>
1073: 							#end
1074: 						#end
1075: 					#end
1076: 				#end
1077: 				
1078: 				#if ($teamNames.size() > 1)
1079: 					</optgroup>
1080: 				#end
1081: 			#end
1082: 			</select>
1083: 		#end
1084: 	#end
1085: </div>
1086: #end
1087: 
1088: #if ($hasSynopsis || $hasBioBrief || $hasEvents || $hasHTMLStats)
1089: 	<div class="tab-content-panels">
1090: #end
1091: 
1092: ## BIO TAB
1093: #if ($hasSynopsis || $hasBioBrief)
1094: 
1095: #set ($class = "tab-content clearfix")
1096: #if ($view == "bio")
1097: 	#set ($class = "tab-content clearfix active")
1098: #end
1099: <div class="${class}">
1100: 
1101: <div class="synopsis clearfix">
1102: #if ($hasSynopsis)
1103: 	$synopsis
1104: #elseif ($hasBioBrief)
1105: 	$website.include("$bioBriefURL")
1106: #end
1107: </div>
1108: 
1109: </div> ## tab-content
1110: #end ## BIO TAB ENDS
1111: 
1112: ## STATS TABS
1113: #if ($hasEvents)
1114:   $website.includeAgain("${statsURL}?tmpl=bio-template&stats=1&biourl=${tool.esc.url($page.url)}&view=${view}&pos=${request.getParameter('pos')}")
1115: #end
1116: 
1117: ## HTML TAB
1118: #if ($hasHTMLStats)
1119: 
1120: #set ($class = "tab-content clearfix")
1121: #if ($view == "htmlstats")
1122: 	#set ($class = "tab-content clearfix active")
1123: #end
1124: <div class="${class}">
1125: 	<a href="${htmlStatsURL}" class="bio-htmlstats-identifier">Click to view HTML Stats</a>
1126: </div>
1127: 
1128: #end
1129: 
1130: #if ($hasSynopsis || $hasBioBrief || $hasEvents || $hasHTMLStats)
1131: 	</div>
1132: #end
1133: 
1134: </div> ## ends bio-wrap
1135: 
1136: #if ($request.getAttribute("bioScriptCalled"))
1137:   #set ($scriptCalled = true)
1138: #else
1139:   #set ($scriptCalled = false)
1140: #end
1141: 
1142: #if (!$scriptCalled)
1143: 	
1144: $!request.setAttribute("bioScriptCalled", true)
1145: <script type="text/javascript" src="$website.cdn("/info/jquery.address-1.5.min.js")"></script>
1146: <script type="text/javascript">
1147: 
1148: jQuery.address.strict(false).state('${page.url}').init(function() {
1149: 	$('.bio-wrap .stats-tabs a').address();
1150: 	$('.bio-wrap .stats-tabs-secondary a').address();
1151: });
1152: 
1153: $(function() {
1154: 
1155: $('.bio-wrap .stats-tabs li').click(function(e) {
1156: 	e.preventDefault();
1157: 	if (!$(this).hasClass('active')) {
1158: 		$(this).addClass('active').siblings().removeClass('active');
1159: 		$(this).parent().parent('.stats-tabs').next('.tab-content-panels').children('.tab-content').removeClass('active').eq($(this).index()).addClass('active');
1160: 	}
1161: });
1162: 
1163: $('.bio-wrap .stats-tabs-secondary li').click(function(e) {
1164: 	e.preventDefault();
1165: 	if (!$(this).hasClass('active')) {
1166: 		$(this).addClass('active').siblings().removeClass('active');
1167: 		$(this).parent().parent('.stats-tabs-secondary').next('.sub-tab-panels').children('.sub-tab-content').removeClass('active').eq($(this).index()).addClass('active');
1168: 	}
1169: });
1170: 
1171: #if ($showRoster)
1172: 	$('.bio-wrap .roster-select-list').change(function() {
1173: 		window.location.href = $(this).val();
1174: 	});
1175: #end
1176: 
1177: #if ($hasHTMLStats)
1178: 	$('.bio-htmlstats-identifier').each(function() {
1179: 		var targetElement = $(this);
1180: 		jQuery.get($(this).attr('href'), function(data) {
1181: 			var htmlStats = $(data).find('center').first();
1182: 			htmlStats.add(htmlStats.siblings('center'));
1183: 			if (htmlStats.children().length > 0) {
1184: 				targetElement.replaceWith(htmlStats);
1185: 			}
1186: 		});
1187: 	});
1188: #end
1189: 
1190: });
1191: </script>
1192: #end
1193: 
1194: #end ## MOBILE CHECK
1195: #end ## STATS PARAMETER
1196: 
1197: $wiki
1198: 
1199: 
1200: 
1201: 
1202: #else
1203: ## LIVE SITE
1204: 
1205: 
1206: 
1207: <img src="/images/setup/profile.jpg"><br>
1208: <div id="bio-wrapper">
1209: <div id="bio-head-container">
1210: 
1211: <div class="bio-photo">
1212:      #if ($headshot.url)
1213:       <img src="$headshot.url?max_height=200&max_width=150">
1214:      #else
1215:        <img src="/images/setup/thumbnail_default.jpg">
1216:      #end
1217: </div>
1218: 
1219: <div class="bio-name-container">
1220: <div class="bio-name">
1221:   #if ($attributes.get("number"))<span class="bio-number">$!attributes.get("number")</span>#end
1222:   <span class="name">$!attributes.get("first_name") $!attributes.get("last_name")</span>
1223:  </div>
1224: </div>
1225: 
1226: <div class="bio-data">
1227: 
1228: ## ATHLETES
1229: 
1230: <div id="bio-left">
1231: 
1232: 
1233:    #set ($year = $!attributes.get("year"))
1234:    #if ($attributes.get("position"))
1235:     <div><span>Position:</span> $attributes.get("position")</div>
1236:    #end
1237:    #if ($attributes.get("hometown"))
1238:     <div><span>Hometown:</span> $attributes.get("hometown") </div>
1239:    #end
1240:    #if ($attributes.get("height"))
1241:     <div><span>Height:</span> $attributes.get("height")</div>
1242:    #end   
1243:    #if ($attributes.get("custom1"))
1244:     <div><span>Bats/Throws:</span>$!attributes.get("custom1")</div>
1245:    #end
1246:    #if ($attributes.get("custom2"))
1247:     <div><span>Event:</span>$!attributes.get("custom2")</div>
1248:    #end
1249:    #if ($attributes.get("major"))
1250:     <div><span>Major:</span> $attributes.get("major")</div>
1251:    #end
1252: 
1253: 
1254: ## COACHES
1255:    #if ($attributes.get("title"))
1256:     <div><span>Title:</span>$!attributes.get("title")</div>
1257:    #end
1258:    #if ($attributes.get("phone1"))
1259:     <div><span>Phone:</span>$!attributes.get("phone1")</div>
1260:    #end
1261:    #if ($attributes.get("email_address"))
1262:     <div><span>Email:</span><a href="mailto:$!attributes.get("email_address")">$!attributes.get("email_address")</a></div>
1263:    #end
1264: </div>
1265: 
1266: <div id="bio-right">
1267: 
1268:    #if ($attributes.get("year"))
1269:     <div><span>Year:</span> $attributes.get("year")</div>
1270:    #end
1271:    #if ($attributes.get("highschool"))
1272:     <div><span>High School:</span> $attributes.get("highschool") </div>
1273:    #end
1274:    #if ($attributes.get("weight"))
1275:     <div><span>Weight:</span> $attributes.get("weight")</div>
1276:    #end   
1277:    #if ($attributes.get("custom3"))
1278:     <div><span>Year of Graduation:</span> $attributes.get("custom3")</div>
1279:    #end   
1280:    #if ($attributes.get("custom5"))
1281:     <div><span>Year Inducted:</span> $attributes.get("custom5")</div>
1282:    #end
1283:    #if ($attributes.get("team"))
1284:     <div><span>Sport:</span> $attributes.get("team")</div>
1285:    #end
1286: 
1287: ## COACHES
1288: 
1289:    #if ($attributes.get("custom4"))
1290:     <div><span>Experience:</span>$!attributes.get("custom4")</div>
1291:    #end
1292:    #if ($attributes.get("college"))
1293:     <div><span>College:</span>$!attributes.get("college")</div>
1294:    #end
1295: 
1296: </div>
1297: 
1298: </div>
1299: </div>
1300: 
1301: <br style="clear: both;">
1302: 
1303: <div class="bio-synopsis">
1304: $synopsis
1305: #set ($briefbio = "${page.url}-brief")
1306: #set ($stats = "${page.url}-stats")
1307: 
1308: $website.include($briefbio)<br>
1309: $website.include($stats)<br>
1310: </div>
1311: </div>
1312: <div class="bio-wrapper-bottom"></div>
1313: 
1314: $wiki
1315: 
1316: 
1317: #end ## REDESIGN CHECK 
1318: #end ## MOBILE CHECK