Composite Schedule

March 2019
Schedule for the month of March 2019
Sunday Monday Tuesday Wednesday Thursday Friday Saturday
24
at NCAA Division III Regional Championship
6 points (17th of 17)



25
26
27
Wallace-Selma
vs JV Baseball
4:30 p.m.

Wallace-Selma
vs JV Baseball
7 p.m.

28
1
at Callaway Gardens Invitational
Canceled due to weather

vs Southern Miss
@ New Orleans, La.
Final
L, 5-0

vs Spring Hill
@ New Orleans, La.
Final
L, 5-0
2
at Callaway Gardens Invitational
327 (T5th of 15)

at New Orleans
Final
L, 5-0

vs William Peace
Final
L, 6-2

at Birmingham Southern
Final
L, 12-7

vs Maryville (Tenn.)
Final
W, 11-7

vs William Peace
Final - 5 innings
W, 12-2

vs Nicholls State
@ New Orleans, La.
Final
W, 3-2

vs Maryville (Tenn.)
Final
W, 6-3
3
vs Maryville (Tenn.)
Cancelled

vs Meredith
Cancelled

vs Meredith
Cancelled
4
at Savannah Harbor Classic
296 (1st of 18)

Lurleen B. Wallace CC
vs JV Baseball
4:30 p.m.

Lurleen B. Wallace CC
vs JV Baseball
7 p.m.
5
at Savannah Harbor Classic
296-290 -- 586 (1st of 18)

Rhodes JV
vs JV Baseball
6 p.m.

6
at LaGrange
Final
L, 9-0


vs Point U.
Final
L, 5-4
7
8
at Albany St. (GA)
Final
W, 7-0

9
vs Wesleyan (Ga.)
@ Wesleyan
Final
W, 9-0

vs Florida Southern
@ Charleston, SC / CofC Tournament
Final
L, 3-2





vs Maryville (Tenn.)
Final
W, 9-0


at Col. of Charleston
Final
L, 5-0

vs LaGrange
Final - 8 innings
L, 17-3

vs Berea
Final
W, 8-1
10

vs Texas A&M Kingsville
@ Charleston, S.C.
Final
L, 5-0

vs Carson-Newman
@ Charleston, S.C.
Final
W, 4-1
11
Bishop State
vs JV Baseball
5 p.m.
12
13
at Tuskegee
Final
W, 5-2
14
vs North Alabama
Final
L, 4-1
15
at Jekyll Island Invitational
290 (T4th of 30)

at Jekyll Island Invitational
318 (T5th of 21)
16
at Jekyll Island Invitational
290-285 -- 575 (T2nd of 30)

at Jekyll Island Invitational
318-324 -- 642 (T7th of 21)

at Covenant
Final
L, 9-0






17
at Jekyll Island Invitational
290-285-286 -- 861 (2nd of 30)

at Jekyll Island Invitational
318-324-327 -- 969 (T8th of 21)

at Piedmont
Final
L, 9-0

at Berry
Final - 5 innings
L, 11-1



18
19
vs Birmingham Southern
Final
L, 6-3
20
JV Baseball
at LaGrange JV
4 p.m.

JV Baseball
at LaGrange JV
6:30 p.m.

vs Mississippi University for Women
Final
W, 4-1

vs Mississippi University for Women
Final
W, 1-0

21
22
vs Mercer
Final
L, 5-0

vs Principia
Final
W, 4-1

vs Methodist
Final - 7 innings
W, 16-2
23
at Maryville (Tenn.)
Final
W, 9-0

at Maryville (Tenn.)
Final
W, 9-0

vs Birmingham Southern
Final
L, 4-2

vs Webber International
Final
L, 3-2

vs Birmingham Southern
Final
L, 3-1

24
at Berea
Final
W, 9-0


at Greensboro
Final - OT
W, 12-11
25
26
vs Webber Int'l
@
Final
L, 9-0

at Birmingham Southern
Final
L, 4-2

vs Luther
@ Orlando, Fla.
Final
L, 9-0
27
vs Whitworth
@ USTA National Campus
Final
L, 9-0


vs Birmingham Southern
Final
L, 17-6


28
at LaGrange
Final - 5 innings
W, 8-0

29
30
at Tuskegee
Final
W, 4-3

at Brevard
Final
L, 5-4





vs Montreat College
@ Point University Country Club (Lanett, Ala.)
Cancelled

at Covenant
Final - 8 innings
W, 16-1

31

vs Maryville (TN)
Final
L, 4-0

vs Maryville (TN)
Final - 6 innings
L, 15-5
1
vs Wynlakes Intercollegiate
VARSITY: 289 (1st of 15) / B-TEAM: 308 (6th of 15)

at Piedmont Invitational
332 (3rd of 7)

Coastal Alabama CC
vs JV Baseball
4 p.m.

Coastal Alabama CC
vs JV Baseball
6:30 p.m.
2
vs Wynlakes Intercollegiate
VARSITY: 289-286 -- 575 (1st of 15) / B-TEAM: 308-288 -- 596 (4th of 15)

at Piedmont Invitational
332-330 -- 662 (3rd of 7)
3
at Agnes Scott
Final
W, 9-0

There was a problem with a Velocity script
Pagecomposite-calendar-template
ErrorInvocation of method 'exists' in class com.prestosports.render.ContentEngineInvoker threw exception java.lang.RuntimeException: com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Too many connections at composite-calendar-template[line 301, column 17]
Page source:
1: #set ($ajax = false)
2: #if ($request.getParameter("ajax").equals("true"))
3:   #set ($ajax = true)
4:   $!request.setAttribute("decorator", "")
5: #end
6: 
7: ## add schedule stylesheet
8: $website.addCss("/info/schedule-styles.css")
9: 
10: ## PICK UP OPTIONS
11: $website.include("options")
12: #set ($options = $request.getAttribute("options"))
13: 
14: #set ($view = "day")
15: #set ($isMobile = ($browser.getIphone() || $browser.getMobile()))
16: 
17: #if (!$isMobile)
18:   #if ($options.get("composite_schedule_default_view") == "month")
19:     #set ($view = "month")
20:   #end
21: 
22:   #foreach ($cookie in $request.cookies)
23:     #if ($cookie.name.equals("composite_view"))
24:       #if ($cookie.value.equals("month"))
25:         #set ($view = "month")
26:       #end
27:     #end
28:   #end
29: #end ## isMobile
30: 
31: #set ($showNeutral = true)
32: #if ($options.get("composite_schedule_hide_neutral_site") == true)
33:   #set ($showNeutral = false)
34: #end
35: 
36: #set ($resultFormat = "AP1")
37: #if ($options.get("schedule_result_format").equals("L, 1-2"))
38:   #set ($resultFormat = "AP2")
39: #end
40: 
41: #set ($showTeamLogo = true)
42: #if ($options.get("composite_schedule_hide_team_logo") == true)
43:   #set ($showTeamLogo = false)
44: #end
45: 
46: #set ($showExhibition = true)
47: #if ($options.get("schedule_hide_exhibition_events") == true)
48:   #set ($showExhibition = false)
49: #end
50: 
51: #set ($linksAbbreviations = { "Preview": "PR", "Box Score": "BX", "Results": "R", "Recap": "RC", "Live stats": "LS", "Video": "V", "Audio": "A", "Photos": "PH", "Tickets": "T", "Directions": "DR" })
52: #set ($linksOrder = ["RC", "BS", "RE", "GA", "AU", "VI", "LS", "DI", "TI", "PR"])
53: #set ($excludeLinksWhenEventIsFinished = ["LS", "DI", "TI", "PR"])
54: #set ($excludeLinksWhenEventIsLive = ["DI", "TI", "PR"])
55: 
56: #set ($restrictLinks = true)
57: #if ($options.get("composite_schedule_restrict_links") == false)
58:   #set ($restrictLinks = false)
59: #end
60: 
61: #set ($showLinkIcons = false)
62: #if ($request.getParameter("showLinkIcons") == true)
63:   #set ($showLinkIcons = true)
64: #end
65: 
66: #set ($abbreviatedLinks = false)
67: #if ($request.getParameter("abbreviatedLinks") == true)
68:   #set ($abbreviatedLinks = true)
69: #end
70: 
71: #set ($showVsAt = true)
72: #if ($options.get("schedule_hide_vs_at") == true)
73:   #set ($showVsAt = false)
74: #end
75: 
76: #set ($requestURI = $request.getRequestURI())
77: 
78: ## conversion of a date into string and back to date sets the time to 00:00
79: #set ($today = $tool.date.format("MMMM dd yyyy", $now, $tool.date.getLocale(), $website.profile.timeZone))
80: #set ($today = $tool.date.toDate("MMMM dd yyyy", $today))
81: #set ($todayEvents = $schedule.getEventsBetweenDates($today, $today))
82: 
83: #set ($timeLimit = 1000 * 60 * 60 * 24 * 365) ## 1000 ms, 60 sec, 60 min, 24 hours, 365 days
84: #set ($rangeStart = $tool.math.sub($today.time, $timeLimit))
85: #set ($rangeEnd = $tool.math.add($today.time, $timeLimit))
86: 
87: #set ($scheduleEvents = [])
88: #set ($dateList = [$today])
89: #set ($allEvents = $schedule.events)
90: #set ($allEventsCount = $allEvents.size())
91: #set ($blockRange = $allEventsCount / 100)
92: 
93: #foreach ($block in [0..$blockRange])
94:   #set ($min = $block * 100)
95:   #set ($max = $block * 100 + 100)
96:   #if ($max > $allEventsCount)
97:     #set ($max = $allEventsCount)
98:   #end
99: 
100:   #set ($subList = $allEvents.subList($min, $max))
101:   #foreach ($event in $subList)
102:     #if ($event.date && ($event.overall || $showExhibition) && ($event.date.time >= $rangeStart && $event.date.time <= $rangeEnd))
103:       #set ($v = $scheduleEvents.add($event))
104: 
105:       #set ($eventDate = $formatter.formatDate($event.date, "MMMM dd yyyy"))
106:       #set ($eventDate = $tool.date.toDate("MMMM dd yyyy", $eventDate))
107:       #if (!$dateList.contains($eventDate))
108:         #set ($v = $dateList.add($eventDate))
109:       #end
110:     #end
111:   #end
112: #end
113: 
114: #if ($dateList.size() > 1)
115:   #set ($dateList = $tool.sorter.sort($dateList, "time")) ## sort dates chronologically
116: #end
117: 
118: #set ($requestedMonth = $request.getParameter("m"))
119: #set ($requestedYear = $request.getParameter("y"))
120: #set ($requestedDate = $request.getParameter("d"))
121: #set ($activeDate = $today)
122: 
123: #if ($requestedDate.length() > 0)
124:   #set ($requestedDate = $tool.date.toDate("yyyy-MM-dd", $requestedDate))
125:   #set ($activeDate = $requestedDate)
126:   #set ($view = "day")
127: 
128: #elseif ($requestedMonth.length() > 0 && $requestedYear.length() > 0)
129:   #set ($view = "month")
130: 
131:   #set ($cal = $tool.getCalendar($requestedYear, $requestedMonth))
132:   $cal.loadData($scheduleEvents, "date")
133: 
134:   #set ($dayCounter = 0)
135:   #foreach ($day in $cal.dates.entrySet())
136:     #set ($k = $formatter.formatDate($day.key, "yyyy-MM"))
137:     #if ($k == "${requestedYear}-${requestedMonth}") ## calendar object have months that also contains dates from previous, so need to make sure it skips those days
138:       #set ($dayCounter = $dayCounter + 1)
139:       #if ($dayCounter == 1)
140:         #set ($activeDate = $day.key) ## by default set the first day of the requested month as the active date
141:       #end
142:       #if ($day.value.size() > 0)
143:         #set ($activeDate = $day.key) ## override the active date to a date that has events in the requested month
144:         #break ## stop the loop
145:       #end
146:     #end
147:   #end
148: 
149: #else
150:   #if ($todayEvents.size() == 0 && $dateList.size() > 1) ## search for the most recent upcoming/past date
151:     #set ($todayIndex = $dateList.indexOf($today))
152:     #if (!($todayIndex + 1 >= $dateList.size())) ## if not out of bounds
153:       #set ($recentIndex = $todayIndex + 1)
154:       #set ($activeDate = $dateList.get($recentIndex))
155:     #elseif (!($todayIndex - 1 < 0))
156:       #set ($recentIndex = $todayIndex - 1)
157: 	    #set ($activeDate = $dateList.get($recentIndex))
158:     #end
159:   #end
160: 
161:   #set ($cal = $tool.getCalendar($activeDate))
162:   $cal.loadData($scheduleEvents, "date")
163: #end
164: 
165: #macro (printResultAriaLabel $event)
166:     #set ($ariaLabel = "${event.sport} event: ${formatter.formatDate($event.date, 'MMMM d hh:mm a:')}")
167:     #if ($event.neutralSite.length() > 0 || $event.home)
168: 		#set ($ariaLabel = "${ariaLabel} vs.")
169:     #else
170: 		#set ($ariaLabel = "${ariaLabel} at")
171:     #end
172: 	#set ($ariaLabel = "${ariaLabel} ${event.opponent.name}:")
173:     #if ($event.neutralSite.length() > 0)
174: 		#set ($ariaLabel = "${ariaLabel} @ ${event.neutralSite}:")
175:     #end
176:     #set ($ariaLabel = "${ariaLabel} Box Score")
177:     aria-label="$ariaLabel"
178: #end
179: 
180: #macro (printLinkAriaLabel $event $link $linkTypeCounter)
181: 	#set ($ariaLabel = "${event.sport} event: ${formatter.formatDate($event.date, 'MMMM d hh:mm a:')}")
182: 	#if ($event.neutralSite.length() > 0 || $event.home)
183: 		#set ($vsOrAt = "vs.")
184: 	#else
185: 		#set ($vsOrAt = "at")
186: 	#end
187: 	#if ($event.teams.size() > 1)
188: 		#set ($ariaLabel = "${ariaLabel} ${event.teams.get(0).name} ${vsOrAt} ${event.teams.get(1).name}:")
189: 	#elseif ($event.teams.size() == 1)
190: 		#set ($ariaLabel = "${ariaLabel} ${event.teams.get(0).name}:")
191: 	#end
192: 	#if ($event.neutralSite.length() > 0)
193: 		#set ($ariaLabel = "${ariaLabel} @ ${event.neutralSite}:")
194: 	#end
195: 	#set ($ariaLabel = "${ariaLabel} ${link.name}")
196: 	#if ($linkTypeCounter > 1)
197: 	    #set ($ariaLabel = "${ariaLabel} link ${linkTypeCounter}")
198: 	#end
199: 	aria-label="$ariaLabel"
200: #end
201: 
202: #macro (printEventLinks $event $useContainer $useList)
203: 	#set ($eventLinks = [])
204: 
205: 	#set ($isFinished = false)
206:     #if ($event.statusCode >= 0 || ($event.statusCode == -3 && $now.time >= ($event.date.time + (1000*60*60*24)))) ## -3 is reported for event sports
207:         #set ($isFinished = true)
208:     #end
209: 
210:     #if ($restrictLinks && ($event.inProgress || $isFinished))
211:         #foreach ($link in $event.links)
212:             #if ($event.inProgress && !$excludeLinksWhenEventIsLive.contains($link.mapType))
213:                 #set ($ignoreme = $eventLinks.add($link))
214:             #elseif ($isFinished && !$excludeLinksWhenEventIsFinished.contains($link.mapType))
215:                 #set ($ignoreme = $eventLinks.add($link))
216:             #end
217:         #end
218:     #else
219:         #set ($eventLinks = $event.links)
220: 	#end
221: 
222: 	#if ($useContainer == true)
223: 		<div #if ($eventLinks.size() > 0) class="links" #else class="links empty" #end>
224: 	#end
225: 		#if ($useList == true)<ul>#end
226: 			#set ($linksCounter = 0)
227: 			#foreach ($mapType in $linksOrder)
228: 				#set ($linkTypeCounter = 0)
229: 				#foreach ($link in $eventLinks)
230: 					#if ($mapType == $link.mapType)
231: 						#set ($linksCounter = $linksCounter + 1)
232: 						#set ($linkTypeCounter = $linkTypeCounter + 1)
233: 						#if ($linksCounter > 1)
234: 							<span class="sep"> | </span>
235: 						#end
236: 						#set ($linkText = $link.name)
237: 						#if ($abbreviatedLinks)
238: 							#foreach ($l in $linksAbbreviations.entrySet())
239: 								#if ($link.name.equalsIgnoreCase($l.key))
240: 									#set ($linkText = $l.value)
241: 								#end
242: 							#end
243: 						#end
244: 						#if ($useList == true)<li>#end
245: 							<a #printLinkAriaLabel($event, $link, $linkTypeCounter) href="$link.url" #if ($website.isExternalLink($link.url)) target="_blank" #end>
246: 							#if ($showLinkIcons)
247: 								<span class="icon gicon-${link.mapType.toLowerCase()}" title="$link.name"></span>
248: 							#end
249: 								<span class="text">$linkText</span>
250: 							</a>
251: 						#if ($useList == true)</li>#end
252: 					#end
253: 				#end
254: 			#end
255: 		#if ($useList == true)</ul>#end
256: 	#if ($useContainer == true)
257: 		</div>
258: 	#end
259: #end ## printEventLinks
260: 
261: #macro (printVa $event)
262:   #if ($event.neutralSite.length() > 0 || $event.home)
263:     <span class="va">vs</span>
264:   #else
265:     <span class="va">at</span>
266:   #end
267: #end
268: 
269: #macro (printSport $event)
270:   #set ($feedURL = $event.feedURL)
271: 
272:   #if ($feedURL.startsWith("http://"))
273:     #set ($feedURL = $feedURL.substring(7, $feedURL.length())) ## remove http://
274:   #elseif ($feedURL.startsWith("https://"))
275:     #set ($feedURL = $feedURL.substring(8, $feedURL.length())) ## remove https://
276:   #end
277: 
278:   #set ($startIndex = $feedURL.indexOf("/"))
279:   #set ($endIndex = $feedURL.length())
280:   #if ($feedURL.lastIndexOf("?") >= 0)
281:     #set ($endIndex = $feedURL.lastIndexOf("?"))
282:   #end
283:   #set ($feedURL = $feedURL.substring($startIndex, $endIndex))
284:   
285:   #if ($event.sport.length() > 0)
286: 	#set ($sport = $event.sport)
287:   #elseif ($feedURL.matches("/sports/.*"))
288: 	#set ($sportStr = $feedURL.substring(8, $feedURL.length()))
289: 	#if ($sportStr.indexOf("/") > 1)
290: 		#set ($sportStr = $sportStr.substring(0, $sportStr.indexOf("/")))
291: 		$website.include("sport-labels")
292: 		#set ($sportLabels = $request.getAttribute("sportLabels"))
293: 		#foreach ($label in $sportLabels.entrySet())
294: 			#if ($label.key == $sportStr)
295: 				#set ($sport = $label.value)
296: 			#end
297: 		#end
298: 	#end
299:   #end
300: 
301:   #if ($website.exists($feedURL))
302: 	#set ($ariaLabel = "${sport}: schedule")
303: 	#if ($feedURL.matches("/sports/.*/\d{4}-\d{2}/.*"))
304: 		#set ($seasonStr = $feedURL.split("/").get(3))
305: 		#set ($ariaLabel = "${sport}: ${seasonStr} schedule")
306: 	#end
307: 
308:     <a href="${feedURL}" class="sport" aria-label="$ariaLabel">$sport</a>
309:   #else
310:     <div class="sport">$sport</div>
311:   #end
312: #end
313: 
314: #macro (printTeamLogo $team)
315:   #if ($showTeamLogo)
316:     #if ($team.teamId)
317: 	  <div class="team-logo">
318:         <img src="${website.teamLogo($team.teamId)}" alt="" />
319:       </div>
320:     #else
321:       #set ($iconClass = $event.sport.toLowerCase().replace(" ", "-").replace("'s", "").replace("&", "and"))
322: 	  <div class="team-logo no-logo">
323:         <span class="icon sport-icon-${iconClass}"></span>
324:       </div>
325:     #end
326:   #end
327: #end
328: 
329: #if ($page.title.length() > 0)
330: 	#set ($pageTitle = $page.title)
331: #else
332: 	#set ($pageTitle = "Composite Schedule")
333: #end
334: 
335: #if ($view == "day")
336: 	#set ($pageTitleDate = $formatter.formatDate($activeDate, "MMMM dd yyyy"))
337: 	#set ($pageTitle = "${pageTitle} - ${pageTitleDate}")
338: #elseif ($view == "month")
339: 	#set ($pageTitleDate = $formatter.formatDate($activeDate, "MMMM yyyy"))
340: 	#set ($pageTitle = "${pageTitle} - ${pageTitleDate}")
341: #end
342: 
343: 
344: #if (!$ajax)
345: <head>
346: 	<title>$pageTitle</title>
347: </head>
348: #end
349: 
350: <div id="composite-wrapper" class="mod-composite">
351: 
352: $wiki
353: 
354: <div class="toggle-buttons">
355: 	<ul class="clearfix">
356: 		<li #if ($view == "day") class="day active" #else class="day" #end>
357: 			<a href="${page.url}?d=${formatter.formatDate($activeDate, "yyyy-MM-dd")}" class="btn" role="button" aria-label="Date View"><span class="icon gicon-th"></span> <span class="text">Days</span></a>
358: 		</li>
359: 		<li #if ($view == "month") class="month active" #else class="month" #end>
360: 			<a href="${page.url}?y=${formatter.formatDate($activeDate, "yyyy")}&m=${formatter.formatDate($activeDate, "MM")}" class="btn" role="button" aria-label="Calendar View"><span class="icon gicon-calendar-empty"></span> <span class="text">Month</span></a>
361: 		</li>
362: 	</ul>
363: </div>
364: 
365: #if ($page.title.length() > 0)
366:   <h1>$page.title</h1>
367: #else
368:   <h1>Composite Schedule</h1>
369: #end
370: 
371: #if ($view == "month") ## CALENDAR VIEW STARTS HERE
372: 
373: <div class="schedule-view schedule-cal clearfix" data-document-title="$pageTitle - ${website.profile.siteName}">
374: 
375: <div class="cal-nav">
376: #if ($cal.previous.time >= $rangeStart && $cal.previous.time <= $rangeEnd)
377:   <a href="${requestURI}?y=${formatter.formatDate($cal.previous, "yyyy")}&m=${formatter.formatDate($cal.previous,"MM")}" class="prev">$formatter.formatDate($cal.previous, "MMMM")</a>
378: #end
379: 
380: <span>$formatter.formatDate($cal.focus, "MMMM yyyy")</span>
381: 
382: #if ($cal.next.time >= $rangeStart && $cal.next.time <= $rangeEnd)
383:   <a href="${requestURI}?y=${formatter.formatDate($cal.next, "yyyy")}&m=${formatter.formatDate($cal.next,"MM")}" class="next">$formatter.formatDate($cal.next, "MMMM")</a>
384: #end
385: </div>
386: 
387: <table>
388: <caption class="offscreen">Schedule for the month of $formatter.formatDate($cal.focus, "MMMM yyyy")</caption>
389: <tr class="cal-days accent-bg">
390: <th scope="col">Sunday</th>
391: <th scope="col">Monday</th>
392: <th scope="col">Tuesday</th>
393: <th scope="col">Wednesday</th>
394: <th scope="col">Thursday</th>
395: <th scope="col">Friday</th>
396: <th scope="col">Saturday</th>
397: </tr>
398: 
399: #foreach ($day in $cal.dates.entrySet().iterator())
400: #if ($day.key.day == 0)<tr>#end
401: <td class="cal-day">
402: <div class="cal-date">$day.key.date</div>
403: 
404: #foreach ($event in $day.value)
405: 
406: #if ($event.scheduleTeamId.length() > 0)
407:   #set ($teamSchedule = true)
408: #else
409:   #set ($teamSchedule = false)
410: #end
411: 
412: #if ($velocityCount > 1)<hr />#end
413: 
414: #set ($calEventClass = "cal-event")
415: #if ($day.key == $requestedDate)
416:   #set ($calEventClass = "cal-event focus")
417: #end
418: 
419: #if ($event.inProgress)
420:   #set ($calEventClass = "${calEventClass} in-progress")
421: #end
422: #if ($event.home)
423:   #set ($calEventClass = "${calEventClass} cal-event-home")
424: #end
425: 
426: <div class="${calEventClass}">
427: 
428: ## SPORT
429: #if ($event.sport)
430:   <div class="cal-sport">#printSport($event)</div>
431: #end
432: 
433: #if ($teamSchedule)
434: 
435: ## OPPONENT
436: #if ($event.opponent.name.length() > 0)
437:   <div class="cal-opponent">
438:     <div class="team-name">#printVa($event) $event.opponent.name</div>
439:     #if ($showNeutral && $event.neutralSite.length() > 0)
440:       <div class="cal-neutral-site">@ $event.neutralSite</div>
441:     #end
442:   </div>
443: #end
444: 
445: #else
446: 
447: ## TEAMS
448: <div class="teams">
449: #foreach ($team in $event.teams)
450:   #if (($event.teams.size() == 2 && $velocityCount == 2) || ($event.teams.size() == 1 && $velocityCount == 1 && $showVsAt))
451:     <div class="team-name">#printVa($event) $team.name</div>
452:   #else
453:     <div class="team-name">$team.name</div>
454:   #end
455: #end
456: </div>
457: 
458: #end ## $teamSchedule
459: 
460: ## STATUS
461: <div class="cal-status">$formatter.formatStatus($event)</div>
462: 
463: ## LINK SCORE
464: #set ($linescoreURL = "")
465: #foreach ($link in $event.links)
466:   #if (($link.mapType == "BS" && !$event.inProgress) || ($link.mapType == "LS" && $event.inProgress && !$website.isExternalLink($link.url)))
467:     #set ($linescoreURL = $link.url)
468:   #end
469: #end
470: 
471: ## SHOW RESULT
472: #set ($result = "")
473: 
474: #if ($teamSchedule)
475:   #if ($resultFormat.equals("AP1"))
476:     #set ($APResult = $event.APResult)
477:   #elseif ($resultFormat.equals("AP2"))
478:     #set ($APResult = $event.AP2Result)
479:   #end
480: 
481:   #if ($APResult.length() > 0 && !$event.inProgress)
482:     #set ($result = $APResult)
483:   #else
484:     #set ($result = $event.result)
485:   #end
486: #else
487:   #foreach ($team in $event.teams)
488:     #if ($team.result.length() > 0)
489: 	  #if ($velocityCount == 2)
490:         #set ($result = "${result} - ${team.result}")
491:       #else
492:         #set ($result = $team.result)
493: 	  #end
494:     #end
495:   #end
496: #end
497: 
498: #if ($result.toString().length() > 0)
499:   #if ($linescoreURL.length() > 0)
500: 	<a #printResultAriaLabel($event) href="${linescoreURL}" class="cal-result">$result</a>
501:   #else
502: 	<div class="cal-result">$result</div>
503:   #end
504: #end
505: 
506: 
507: <div class="cal-links">#printEventLinks($event, true, false)</div>
508: 
509: </div> ## cal-event
510: 
511: #end ## events loop
512: </td>
513: #if ($day.key.day == 6)</tr>#end
514: #end
515: </table>
516: </div> ## schedule-cal
517: 
518: #end ## CALENDAR VIEW ENDS HERE
519: 
520: #if ($view == "day")
521: 
522: #macro (renderGrid $events)
523: 
524: #set ($eventCount = $events.size())
525: #set ($blockRange = $eventCount / 100)
526: #set ($counter = 0)
527: #set ($columnLimit = 2)
528: 
529: #foreach ($block in [0..$blockRange])
530: 
531: #set ($min = $block * 100)
532: #set ($max = $block * 100 + 100)
533: #if ($max > $eventCount)
534:   #set ($max = $eventCount)
535: #end
536: 
537: #set ($eventsList = $events.subList($min, $max))
538: 
539: #foreach ($event in $eventsList)
540: 
541: #if ($counter == 0)
542:   <div class="row clearfix">
543: #end
544: 
545: #set ($counter = $counter + 1)
546: 
547: #set ($eventClass = "event-box")
548: #if ($event.inProgress)
549:   #set ($eventClass = "event-box in-progress")
550: #end
551: #if ($event.home)
552:   #set ($eventClass = "${eventClass} event-box-home")
553: #end
554: 
555: <div class="${eventClass}">
556: <div class="event-details clearfix">
557: 
558: <div class="status-sport clearfix">
559: 
560:   #set ($eventStatus = $formatter.formatStatus($event))
561:   #if ($eventStatus.length() > 0)
562:     <div class="status accent-bg">$eventStatus</div>
563:   #end
564: 
565:   #if ($event.sport)
566: 	  #printSport($event)
567:   #end
568: </div>
569: 
570: <div class="event-info clearfix">
571: 
572: #if ($event.teams.size() == 1)
573: ## MEET EVENT
574: 
575: #set ($result = "")
576: #if ($resultFormat.equals("AP1"))
577:   #set ($APResult = $event.APResult)
578: #elseif ($resultFormat.equals("AP2"))
579:   #set ($APResult = $event.AP2Result)
580: #end
581: 
582: #if (!$event.inProgress && $APResult.length() > 0)
583:   #set ($result = $APResult)
584: #else
585:   #set ($result = $event.result)
586: #end
587: 
588: #set ($team = $event.teams.get(0))
589: 
590: <div class="team clearfix">
591: 
592: #if ($result.toString().length() > 0)
593:   <span class="event-result">$result</span>
594: #end
595: 
596: <div class="logo-name">
597: 
598: #printTeamLogo($team)
599: 
600: #if ($showVsAt)
601:   <span class="team-name" title="${team.name}">#printVa($event) $team.name</span>
602: #else
603:   <span class="team-name" title="${team.name}">$team.name</span>
604: #end
605: 
606: </div> ## logo-name
607: </div> ## team
608: 
609: #else
610: ## HEAD TO HEAD EVENT
611: 
612: <div class="teams">
613: #foreach ($team in $event.teams)
614: 
615:   #set ($teamClass = "team clearfix")
616:   #if ($event.winner.name.length() > 0)
617:     #if ($event.winner.name == $team.name)
618:       #set ($teamClass = "team winner clearfix")
619:     #else
620:       #set ($teamClass = "team loser clearfix")
621:     #end
622:   #end
623: 
624:   <div class="$teamClass">
625: 
626:   #if ($team.result.length() > 0)
627:     <span class="result">$team.result</span>
628:   #end
629: 
630:   <div class="logo-name">
631: 
632:   #printTeamLogo($team)
633: 
634:   #if ($velocityCount == 2)
635:     <span class="team-name" title="${team.name}">#printVa($event) $team.name</span>
636:   #else
637:     <span class="team-name" title="${team.name}">$team.name</span>
638:   #end
639: 
640:   </div> ## logo-name
641:   </div> ## team
642: 
643: #end ## teams loop
644: </div> ## teams
645: 
646: #end ## team schedule check
647: 
648: #if ($event.notes.length() > 0 || $event.neutralSite.length() > 0)
649:   <div class="notes-neutralsite clearfix">
650:   #if ($event.notes.length() > 0)
651:     <span class="notes">$event.notes</span>
652:   #end
653: 
654:   #if ($event.neutralSite.length() > 0)
655:     <span class="neutral-site">@ $event.neutralSite</span>
656:   #end
657:   </div>
658: #end
659: 
660: </div> ## event-info
661: 
662: #printEventLinks($event, true, false)
663: 
664: </div> ## event-details
665: </div> ## event-box
666: 
667: #if ($counter == $columnLimit || $velocityCount == $events.size())
668:   </div> ## row
669:   #set ($counter = 0)
670: #end
671: 
672: #end ## events loop
673: #end ## block loop
674: #end ## macro renderGrid
675: 
676: <div class="schedule-view schedule-grid clearfix" data-document-title="${pageTitle} - ${website.profile.siteName}">
677: 
678: #set ($dateEvents = $schedule.getEventsBetweenDates($activeDate, $activeDate))
679: 
680: #if ($dateList.size() > 1)
681: #set ($firstDate = $dateList.get(0))
682: #set ($lastDate = $dateList.get($tool.math.sub($dateList.size(), 1)))
683: #set ($activeIndex = $dateList.indexOf($activeDate))
684: 
685: <div class="dates-bar clearfix">
686: 
687: <a href="#" #if ($activeIndex == 0) class="prev disabled" #else class="prev" #end><span class="gicon-prev"></span><span class="text offscreen">Previous</span></a>
688: <div class="date-tabs clearfix">
689: <div>
690: <ul>
691: #set ($dateBlocks = $dateList.size() / 100)
692: #foreach ($dateBlock in [0..$dateBlocks])
693: 
694: #set ($min = $dateBlock * 100)
695: #set ($max = $dateBlock * 100 + 100)
696: #if ($max > $dateList.size())
697:   #set ($max = $dateList.size())
698: #end
699: #set ($dateSubList = $dateList.subList($min, $max))
700: 
701: #foreach ($date in $dateSubList)
702:   #if ($date == $today)
703:     #if ($todayEvents.size() > 0)
704:       <li #if ($date == $activeDate) class="today active" #else class="today" #end data-ref="${formatter.formatDate($date, "yyyy-MM-dd")}"><a href="${requestURI}?d=${formatter.formatDate($date, "yyyy-MM-dd")}">Today</a></li>
705:     #end
706:   #else
707:     <li #if ($date == $activeDate) class="active" #end data-ref="${formatter.formatDate($date, "yyyy-MM-dd")}"><a href="${requestURI}?d=${formatter.formatDate($date, "yyyy-MM-dd")}">$formatter.formatDate($date, "EEE MMM dd")</a></li>
708:   #end
709: #end ## dateList loop
710: 
711: #end ## block loop
712: </ul>
713: </div>
714: </div> ## date-tabs
715: 
716: 
717: #set ($lastIndex = $dateList.size() - 1)
718: #if ($todayEvents.size() == 0)
719:   #set ($lastIndex = $lastIndex - 1)
720: #end
721: <a href="#" #if ($activeIndex == $lastIndex) class="next disabled" #else class="next" #end><span class="gicon-next"></span><span class="text offscreen">Next</span></a>
722: 
723: <div class="cal-box">
724: <ul class="clearfix">
725: #set ($todayClass = "no-today disabled")
726: #if ($todayEvents.size() > 0)
727:   #set ($todayClass = "today disabled")
728: #end
729:   <li class="${todayClass}" data-ref="${formatter.formatDate($today, "yyyy-MM-dd")}"><a href="#">Today</a></li>
730:   <li class="date-picker"><a href="#" title="&harr; &varr; Use arrow keys to navigate"><span class="gicon-calendar"></span><span class="text offscreen">Pick a date</span></a><input type="date" class="date-input" data-value="${formatter.formatDate($activeDate, "yyyy-MM-dd")}" min="${formatter.formatDate($firstDate, "yyyy-MM-dd")}" max="${formatter.formatDate($lastDate, "yyyy-MM-dd")}" aria-label="Select a date" /></li>
731: </ul>
732: </div>
733: 
734: </div> ## dates-bar
735: #end
736: 
737: <div class="date-panels clearfix">
738:   <div class="clearfix">
739:     <div class="date-panel clearfix">
740: 	    <div class="month-title accent-bg">$formatter.formatDate($activeDate, "EEE. MMMM dd, yyyy")</div>
741: 	    #if ($dateEvents.size() == 0)
742: 		    <div class="no-events">No events</div>
743: 	    #else
744: 		    #renderGrid($dateEvents)
745:       #end
746:     </div>
747:   </div>
748: </div>
749: 
750: </div> ## schedule-grid
751: 
752: ## GRID VIEW ENDS HERE
753: #end ## view == "day"
754: 
755: <div class="subscribe_links">
756:   <a href="$icalURL"><img src="$website.cdn("/info/images/icon_schedule.gif")" alt="" /> iCalendar</a> ## iCalendar
757:   <a href="$rssURL"><img src="$website.cdn("/info/images/icon_rss.gif")" alt="" /> RSS Feed</a> ## RSS
758: </div>
759: 
760: $wiki
761: </div> ## composite-wrapper
762: 
763: #if (!$ajax)
764: <script src="${website.cdn("/info/cookie-handler.js")}"></script>
765: <script src="${website.cdn("/info/iscroll-v5.1.1.js")}"></script>
766: <script src="${website.cdn("/info/jquery.history.js")}"></script>
767: <script src="${website.cdn("/info/schedule.grid.plugin.js")}"></script>
768: <script>
769: (function($) {
770: $(function() {
771: 
772: var container = $('#composite-wrapper');
773: var pushStateEnabled = !!(window.history && window.history.pushState);
774: var oldIE = $('html').is('.ie7') || $('html').is('.ie8') || $('html').is('.ie9');
775: 
776: if (container.find('.date-tabs').length) {
777:   container.presto_ScheduleGrid({
778:     capableBrowser: !oldIE
779:   });
780: }
781: 
782: var loadView = function(url) {
783:   container.addClass('loading');
784:   var viewContainer = $('.schedule-view', container);
785: 
786:   jQuery.ajax({
787: 	url: url,
788: 	data: { ajax:true },
789: 	type: "GET",
790: 	success: function(response) {
791:     var newHTML = $(response).html();
792: 
793: 	var docTitle = $(response).find('[data-document-title]').attr('data-document-title');
794: 	if (docTitle) {
795: 		document.title = docTitle;
796: 	}
797: 
798:     container.empty().html(newHTML);
799:     if (container.find('.date-tabs').length) {
800:       container.presto_ScheduleGrid({
801:         capableBrowser: !oldIE
802:       });
803:     }
804: 	},
805: 	error: function() {
806: 	  viewContainer.html('<div class="error">Oops! some error occurred.</div>');
807: 	},
808: 	complete: function() {
809: 	  container.removeClass('loading');
810: 	}
811:   });
812: };
813: 
814: History.Adapter.bind(window,'statechange',function(){
815:   var state = History.getState();
816: 
817:   if (state.data.context === "load-view") {
818:     loadView(state.url);
819:   }
820: });
821: 
822: container.on('click', '.cal-nav a', function(e) {
823:   if (!oldIE) {
824:     if (!container.hasClass('loading')) {
825:       History.pushState({ context: "load-view" }, document.title, $(this).attr('href'));
826:     }
827:     e.preventDefault();
828:   }
829: });
830: 
831: container.on('click', '.toggle-buttons li', function() {
832:   if (!$(this).hasClass('.active') && !container.hasClass('loading')) {
833:     History.pushState({ context: "load-view" }, document.title, $(this).children('a').attr('href'));
834: 	  if ($(this).is('.month')) {
835: 	    createCookie('composite_view', 'month', 14);
836: 	  } else if ($(this).is('.day')) {
837: 	    createCookie('composite_view', 'day', 14);
838: 	  }
839:   	$(this).addClass('active').siblings().removeClass('active');
840:   }
841:   return false;
842: });
843: 
844: });
845: })(jQuery);
846: </script>
847: #end