There was a problem with a Velocity script
Page/httpd/prestosports/site-public/WEB-INF/themes/generic-bootstrap/stats-team-template
ErrorEncountered "}" at /httpd/prestosports/site-public/WEB-INF/themes/generic-bootstrap/stats-team-template[line 209, column 5] Was expecting one of: "[" ... "{" ... <STRING_LITERAL> ... "true" ... "false" ... <INTEGER_LITERAL> ... <FLOATING_POINT_LITERAL> ... <IDENTIFIER> ... "{" ... "[" ...
Page source:
1: #if ($teams.size() == 1)
2:   #set ($targetURL = ${teams.get(0).getPageName()})
3:   #set ($targetURL = "${page.url}/$targetURL")
4:   #set ($view = $formatter.escapeXml($request.getParameter("view")))
5:   #if ($view.length() > 0)
6:     #set ($targetURL = "${targetURL}?view=${view}")
7:   #end
8:   ## $targetURL
9:   $website.decorate("")
10:   $response.sendRedirect($targetURL)
11:   #stop
12: #end
13: 
14: ## PICK UP OPTIONS
15: $website.include("options")
16: #set ($options = $request.getAttribute("options"))
17: #set ($locale = "en_us")
18: #set ($locale = $options.get("locale"))
19: #set ($showconf = true)
20: #if ($options.get("stats_hide_conference") and $options.get("stats_hide_conference").equalsIgnoreCase("hide"))
21:  #set ($showconf = false)
22: #end
23: 
24: #set ($fballShow4thDownConversions = true)
25: #if ($options.get("teams_stats_fball_show_4th_down_conversions") and $options.get("teams_stats_fball_show_4th_down_conversions").equalsIgnoreCase("hide"))
26:  #set ($fballShow4thDownConversions = false)
27: #end
28: 
29: #set ($showTotalRow = false)
30: #if ($options.get("stats_teams_show_totals_row") and $options.get("stats_teams_show_totals_row").equalsIgnoreCase("show"))
31:  #set ($showTotalRow = true)
32: #end
33: 
34: 
35: 
36: #if ($locale == "en_us")
37:   #set ($defLabel = "Defense")
38: #elseif ($locale == "en_gb")
39:   #set ($defLabel = "Defence")
40: #end
41: 
42: #if ($sport.enumCode == 0) ## Football
43:   #set ($sort = "ppg")
44: #else
45:   #set ($sort = "name")
46: #end
47: 
48: #set ($sortEsc = $formatter.escapeXml($request.getParameter("sort")))
49: #if ($sortEsc.length() > 0)
50: 	#set ($sort = $sortEsc)
51: #end
52: 
53: #if ($sort.indexOf(":") > -1)
54:   #set ($sort = $sort.substring(0, $sort.indexOf(":")))
55: #end
56: 
57: #if ($sort == $null or $sort.length() == 0)
58:   #set ($sort = "name")
59: #end
60: 
61: #set ($restriction = "0")
62: #set ($restrictionEsc = $formatter.escapeXml($request.getParameter("r")))
63: #if ($restrictionEsc.length() > 0)
64: 	#set ($restriction = $restrictionEsc)
65: #end
66: 
67: ## set default position
68: #set ($pos = "")
69: #if ($sport.enumCode == 0) ## Football
70:   #set ($pos = "sco")
71: #elseif ($sport.enumCode == 2) ## Basketball
72:   #set ($pos = "off")
73:   #if ($sort == "ptspgopp" || $sort == "fgptopp" || $sort == "fgpt3opp")
74:   	#set ($pos = "def")
75:   #end
76: #elseif ($sport.enumCode == 1 || $sport.enumCode == 11) ## Baseball or Softball
77:   #set ($pos = "h")
78: #end
79: 
80: ## overwrite default position
81: #set ($posEsc = $formatter.escapeXml($request.getParameter("pos")))
82: #if ($posEsc.length() > 0)
83: 	#set ($pos = $posEsc)
84: #end
85: 
86: ## set default sort
87: #set ($sort = "")
88: #if ($sport.enumCode == 1 || $sport.enumCode == 11) ## Baseball or Softball
89:   #if($pos == "f")
90:     #set ($sort = "fpct")
91:   #elseif ($pos == "p")
92:     #set ($sort = "era")
93:   #else
94:     #set ($sort = "avg")
95:   #end
96: #end
97: 
98: #set ($sortEsc = $formatter.escapeXml($request.getParameter("sort")))
99: #if ($sortEsc.length() > 0)
100: 	#set ($sort = $sortEsc)
101: #end
102: 
103: #set ($secondaryKeys = [])
104: #if ($sport.enumCode == 0) ## Football
105: 
106:   #set ($secondaryKeys = [
107:     {
108:       "sort" : "ppg",
109:       "pos" : "sco",
110:       "label" : "Pts"
111:     },
112:     {
113:       "sort" : "ydpg",
114:       "pos" : "yar",
115:       "label" : "Yds"
116:     },
117:     {
118:       "sort" : "pypg",
119:       "pos" : "pas",
120:       "label" : "Passing"
121:     },
122:     {
123:       "sort" : "rypg",
124:       "pos" : "rus",
125:       "label" : "Rushing"
126:     },
127:     {
128:       "sort" : "fipg",
129:       "pos" : "fir",
130:       "label" : "1st Downs"
131:     },
132:     {
133:       "sort" : "thdpct",
134:       "pos" : "con",
135:       "label" : "Conversions"
136:     },
137:     {
138:       "sort" : "krya",
139:       "pos" : "ret",
140:       "label" : "Returns"
141:     },
142:     {
143:       "sort" : "fgpct",
144:       "pos" : "kic",
145:       "label" : "Kicking"
146:     },
147:     {
148:       "sort" : "rezsp",
149:       "pos" : "red",
150:       "label" : "Red Zone"
151:     },
152:     {
153:       "sort" : "dfum",
154:       "pos" : "tur",
155:       "label" : "Turnovers"
156:     },
157:     {
158:       "sort" : "pen",
159:       "pos" : "pen",
160:       "label" : "Pen."
161:     },
162:     {
163:       "sort" : "ptspgopp",
164:       "pos" : "def",
165:       "label" : "Def."
166:     },
167:     {
168:       "sort" : "toppg",
169:       "pos" : "mis",
170:       "label" : "Misc."
171:     }
172:   ])
173: 
174: #elseif ($sport.enumCode == 2) ## Basketball
175: 
176:   #set ($secondaryKeys = [
177:     {
178:       "pos" : "off",
179:       "label" : "Offense"
180:     },
181:     {
182:       "pos" : "def",
183:       "label" : "${defLabel}"
184:     }
185:   ])
186: 
187: #elseif ($sport.enumCode == 1 || $sport.enumCode == 11) ## Baseball
188: 
189:   #set ($secondaryKeys = [
190:     {
191:       "sort" : "avg",
192:       "pos" : "h",
193:       "label" : "Hitting"
194:     },
195:     {
196:       "sort" : "pa",
197:       "pos" : "eh",
198:       "label" : "Extended Hitting"
199:     },
200:     {
201:       "sort" : "era",
202:       "pos" : "p",
203:       "label" : "Pitching"
204:     },
205:     {
206:       "sort" : "fpct",
207:       "pos" : "f",
208:       "label" : "Fielding",
209:     },
210:     {
211:       "sort" : "attend",
212:       "pos" : "att",
213:       "label" : "Attendance"
214:     }
215:   ])
216: #end
217: 
218: #macro (printTableData $r $p $s)
219: 	#set ($tableBriefs = $briefs.get($p))
220: 	#set ($rankValue = "abb")
221: 
222:   $request.setAttribute("icl-dataTables-script", true)
223: 
224:   #set ($sortOrder = "desc")
225:   #if ($p == "p" && $s == "era")
226:     #set ($sortOrder = "asc")
227:   #end
228: 
229:   #if ($sort.length() > 0 && $sort != "name")
230:     #foreach ($key in $tableBriefs.keySet())
231:       #if($key == $sort)
232:         #set ($s = $sort)
233:       #end
234:     #end
235:   #end
236: 
237:   <div class="stats-wrap">
238:     <div class="stats-box stats-box-alternate full clearfix">
239:       <div class="table-responsive">
240:           <table class="table table-hover table-sm" data-module="bs-scripts/table-sort-bs" data-col-name="${s}" data-sort-order="${sortOrder}">
241:            <thead class="thead-dark">
242:                 <tr>
243:                   <th class="text text-nowrap">Rk</th>
244:                   <th class="pinned-col text text-nowrap">Name</th>
245:                   #foreach ($key in $tableBriefs.keySet())
246:                     #if (!($key == 'fod' || $key == 'fodpct') || $fballShow4thDownConversions)
247:                       <th data-key="$key" class="text-nowrap">${tableBriefs.get($key)}</th>
248:                     #end
249:                   #end
250:                 </tr>
251:            </thead>
252:             #foreach ($team in $teams)
253:               #if ($r == "1")
254:                 #set ($stats = $team.statsConference)
255:               #else
256:                 #set ($stats = $team.stats)
257:               #end
258:               <tr>
259:                 <td class="text">
260:                 ## Need to figure out what value is
261:                 #set ($value = ${stats.get($sort)})
262:                 #if (!($value == $rankValue))
263:                   ##This is a new rank value... let's update our ranking
264:                   #set ($rank = $velocityCount)
265:                   #set ($rankValue = $value)
266:                 #end
267:                 ${rank}
268:                 </td>
269:                 <td class="pinned-col text"><a href="${page.url}/${team.pageName}">${team.name}</a></td>
270:                 #foreach ($key in $tableBriefs.keySet())
271:                   #set ($value = "-")
272:                   #set ($value = $formatter.formatNumber(${stats.get($key)}, $formats.get($key)))
273:                   #if ($value.length() == 0) #set ($value = "-") #end
274:                   #if (!($key == 'fod' || $key == 'fodpct') || $fballShow4thDownConversions)
275:                     #if ($p == "att" && $s == "attend")
276:                       #set ($s = "at")
277:                     #end
278:                     <td #if($key == $s)class="sort"#end align="center">${value} </td>
279:                   #end
280:                 #end
281:               </tr>
282:             #end
283: 
284:             #if (not $teams or $teams.size() == 0)
285:               <tr><td>This report has no teams.</td></tr>
286:             #end
287: 
288:               #if($showTotalRow)
289:                          #if ($r == "1")
290:                                         #set ($stats = $confTotals)
291:                                       #else
292:                                        #set ($stats = $totals)
293: 
294:                                       #end
295:                             <tr class="font-weight-bold">
296:                                 <td colspan="2">TOTALS</td>
297:                                 #foreach ($key in $tableBriefs.keySet())
298:                                     #set ($value = "-")
299:                                     #set ($value = $formatter.formatNumber(${stats.get($key)}, $formats.get($key)))
300:                                     #if ($value.length() == 0) #set ($value = "-") #end
301:                                     #if (!($key == 'fod' || $key == 'fodpct') || $fballShow4thDownConversions)
302:                                       <td #if($key == $sort)class="sort"#end align="center">${value} </td>
303:                                     #end
304:                                   #end
305:                             </tr>
306:                         #end
307:           </table>
308:       </div>
309:     </div> ## stats-fullbox
310:   </div> ## stats-wrap
311: #end
312: 
313: #macro (printSubcategories $r)
314: #set ($ariaLabel = "Overall Stats")
315: #if ($r == "1")
316: 	#set ($ariaLabel = "Conference Stats")
317: #end
318: <div class="tab-container secondary clearfix" data-module="stats/tabs" data-type="secondary">
319:   <div class="tab-nav" data-module="jscroll" data-momentum="false">
320:     <div>
321:       <ul class="clearfix">
322:         #foreach ($key in $secondaryKeys)
323:           <li #if ($pos == $key.pos) class="active" #end>
324:             <a onclick="location.href='$page.url?sort=$!key.sort&r=$!restriction&pos=$!key.pos';" href="$page.url?sort=$!key.sort&r=$!restriction&pos=$!key.pos" role="button" aria-label="${ariaLabel}: ${key.label}">${key.label}</a>
325:           </li>
326:         #end
327:       </ul>
328:     </div>
329:   </div>
330:   <div class="tab-panels">
331:     #foreach ($key in $secondaryKeys)
332:       <div class="tab-panel clearfix #if($key.pos == $pos) active #end">
333:         #printTableData($r, $key.pos, $key.sort)
334:       </div>
335:     #end
336:   </div>
337: </div> ## secondary tab-container
338: #end
339: 
340: ### MACROS ###
341: 
342: <div class="stats-container" data-module="stats/responsive-container">
343: 
344: ## ARCHIVES
345: <div class="align-right">$website.include("navbar-teamstats-archive?tmpl=schedule-archive-list-template")</div>
346: 
347: #if ($page.title.length() > 0)
348:   <h1>$!page.title</h1>
349: #end
350: 
351: #if ($showconf)
352: <div class="tab-container primary clearfix" data-module="stats/tabs" data-type="primary">
353:   <div class="tab-nav" data-module="jscroll" data-momentum="false">
354:     <div>
355:       <ul class="clearfix">
356:         <li #if ($restriction == "0") class="active" #end>
357:           <a href="${page.url}?sort=${sort}&r=0&pos=${pos}">Overall</a>
358:         </li>
359:         <li #if ($restriction == "1") class="active" #end>
360:           <a href="${page.url}?sort=${sort}&r=1&pos=${pos}">Conference</a>
361:         </li>
362:       </ul>
363:     </div>
364:   </div>
365:   <div class="tab-panels">
366: 
367:   #if ($secondaryKeys.size() > 0)
368: 
369:     <div class="tab-panel clearfix #if ($restriction == 0) active #end">#printSubcategories(0)</div>
370:     <div class="tab-panel clearfix #if ($restriction == 1) active #end">#printSubcategories(1)</div>
371: 
372:   #else
373: 
374:     <div class="tab-panel clearfix #if ($restriction == 0) active #end">#printTableData(0, $pos, '')</div>
375:     <div class="tab-panel clearfix #if ($restriction == 1) active #end">#printTableData(1, $pos, '')</div>
376: 
377:   #end
378:   </div>
379: </div> ## tab-container
380: 
381: #else ## no conf tabs
382: 
383:   #if ($secondaryKeys.size() > 0)
384:     #printSubcategories($restriction)
385:   #else
386:     #printTableData($restriction, $pos, '')
387:   #end
388: 
389: #end ## show conf
390: 
391: </div> ## stats-container
392: 
393: ## GLOBAL ADS SERVER
394: #if ($website.ads.isAdvertisingEnabled('ENHANCED_STATS'))
395:         $website.includeAgain("global-adserver-slots?adSlot=enhanced_stats")
396: #end
397: 
398: $wiki.su