| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|---|
| 3 |
<xsl:output method="xhtml" |
|---|
| 4 |
indent="yes" |
|---|
| 5 |
media-type="text/html" |
|---|
| 6 |
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" |
|---|
| 7 |
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" |
|---|
| 8 |
standalone="yes" |
|---|
| 9 |
omit-xml-declaration="yes"/> |
|---|
| 10 |
|
|---|
| 11 |
<!-- ================ --> |
|---|
| 12 |
<!-- PDA STYLESHEET --> |
|---|
| 13 |
<!-- ================ --> |
|---|
| 14 |
<!-- URL of resources common to all bedework apps (javascript, images) --> |
|---|
| 15 |
<xsl:variable name="resourceCommons">http://www.rpi.edu/dept/cct/apps/rpi-bedework-3-3/bedework-common</xsl:variable> |
|---|
| 16 |
|
|---|
| 17 |
<!-- DEFINE INCLUDES --> |
|---|
| 18 |
<!-- cannot use the resourceCommons variable in xsl:include paths --> |
|---|
| 19 |
<xsl:include href="../../../bedework-common/default/default/errors.xsl"/> |
|---|
| 20 |
<xsl:include href="../../../bedework-common/default/default/messages.xsl"/> |
|---|
| 21 |
|
|---|
| 22 |
<!-- DEFINE GLOBAL CONSTANTS --> |
|---|
| 23 |
|
|---|
| 24 |
<!-- URL of the XSL template directory --> |
|---|
| 25 |
<!-- The approot is an appropriate place to put |
|---|
| 26 |
included stylesheets and xml fragments. These are generally |
|---|
| 27 |
referenced relatively (like errors.xsl and messages.xsl above); |
|---|
| 28 |
this variable is here for your convenience if you choose to |
|---|
| 29 |
reference it explicitly. It is not used in this stylesheet, however, |
|---|
| 30 |
and can be safely removed if you so choose. --> |
|---|
| 31 |
<xsl:variable name="appRoot" select="/bedework/approot"/> |
|---|
| 32 |
|
|---|
| 33 |
<!-- URL of html resources (images, css, other html); by default this is |
|---|
| 34 |
set to the application root --> |
|---|
| 35 |
<xsl:variable name="resourcesRoot" select="/bedework/approot"/> |
|---|
| 36 |
|
|---|
| 37 |
<!-- Properly encoded prefixes to the application actions; use these to build |
|---|
| 38 |
urls; allows the application to be used without cookies or within a portal. |
|---|
| 39 |
These urls are rewritten in header.jsp and simply passed through for use |
|---|
| 40 |
here. Every url includes a query string (either ?b=de or a real query |
|---|
| 41 |
string) so that all links constructed in this stylesheet may begin the |
|---|
| 42 |
query string with an ampersand. --> |
|---|
| 43 |
<xsl:variable name="setup" select="/bedework/urlPrefixes/setup"/> |
|---|
| 44 |
<xsl:variable name="setSelection" select="/bedework/urlPrefixes/main/setSelection"/> |
|---|
| 45 |
<xsl:variable name="fetchPublicCalendars" select="/bedework/urlPrefixes/calendar/fetchPublicCalendars"/> |
|---|
| 46 |
<xsl:variable name="setViewPeriod" select="/bedework/urlPrefixes/main/setViewPeriod"/> |
|---|
| 47 |
<xsl:variable name="eventView" select="/bedework/urlPrefixes/event/eventView"/> |
|---|
| 48 |
<xsl:variable name="addEventRef" select="/bedework/urlPrefixes/event/addEventRef"/> |
|---|
| 49 |
<xsl:variable name="export" select="/bedework/urlPrefixes/misc/export/a/@href"/> |
|---|
| 50 |
<xsl:variable name="search" select="/bedework/urlPrefixes/search/search"/> |
|---|
| 51 |
<xsl:variable name="search-next" select="/bedework/urlPrefixes/search/next"/> |
|---|
| 52 |
<xsl:variable name="mailEvent" select="/bedework/urlPrefixes/mail/mailEvent"/> |
|---|
| 53 |
<xsl:variable name="showPage" select="/bedework/urlPrefixes/main/showPage"/> |
|---|
| 54 |
<xsl:variable name="stats" select="/bedework/urlPrefixes/stats/stats"/> |
|---|
| 55 |
|
|---|
| 56 |
<!-- URL of the web application - includes web context --> |
|---|
| 57 |
<xsl:variable name="urlPrefix" select="/bedework/urlprefix"/> |
|---|
| 58 |
|
|---|
| 59 |
<!-- Other generally useful global variables --> |
|---|
| 60 |
<xsl:variable name="privateCal">/ucal</xsl:variable> |
|---|
| 61 |
<xsl:variable name="prevdate" select="/bedework/previousdate"/> |
|---|
| 62 |
<xsl:variable name="nextdate" select="/bedework/nextdate"/> |
|---|
| 63 |
<xsl:variable name="curdate" select="/bedework/currentdate/date"/> |
|---|
| 64 |
|
|---|
| 65 |
|
|---|
| 66 |
<!-- MAIN TEMPLATE --> |
|---|
| 67 |
<xsl:template match="/"> |
|---|
| 68 |
<html lang="en"> |
|---|
| 69 |
<head> |
|---|
| 70 |
<title>RPI Calendar of Events</title> |
|---|
| 71 |
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/> |
|---|
| 72 |
<link rel="stylesheet" href="{$resourcesRoot}/default/PDA/pda.css"/> |
|---|
| 73 |
</head> |
|---|
| 74 |
<body> |
|---|
| 75 |
<div id="titleBar"> |
|---|
| 76 |
Rensselaer Events Calendar |
|---|
| 77 |
<span id="homeLink"> |
|---|
| 78 |
[<a href="http://www.rpi.edu/pda/index.html">rpi-pda</a>] |
|---|
| 79 |
</span> |
|---|
| 80 |
</div> |
|---|
| 81 |
<xsl:call-template name="infoAndNavigation"/> |
|---|
| 82 |
<xsl:choose> |
|---|
| 83 |
<xsl:when test="/bedework/page='event'"> |
|---|
| 84 |
<!-- show an event --> |
|---|
| 85 |
<xsl:apply-templates select="/bedework/event"/> |
|---|
| 86 |
</xsl:when> |
|---|
| 87 |
<xsl:when test="/bedework/page='calendarList'"> |
|---|
| 88 |
<!-- show a list of all calendars --> |
|---|
| 89 |
<xsl:apply-templates select="/bedework/calendars"/> |
|---|
| 90 |
</xsl:when> |
|---|
| 91 |
<xsl:otherwise> |
|---|
| 92 |
<!-- otherwise, show the eventsCalendar --> |
|---|
| 93 |
<!-- main eventCalendar content --> |
|---|
| 94 |
<xsl:call-template name="listView"/> |
|---|
| 95 |
</xsl:otherwise> |
|---|
| 96 |
</xsl:choose> |
|---|
| 97 |
<!-- footer --> |
|---|
| 98 |
<p id="footer"> |
|---|
| 99 |
<br/><br/><!-- why, you ask? ...blackberry --> |
|---|
| 100 |
<a href="{$setup}&browserTypeSticky=PDA">Events Calendar</a> | |
|---|
| 101 |
<a href="http://www.rpi.edu/pda">Portable Rensselaer</a><br/> |
|---|
| 102 |
<small>Maintained by C&MT, DotCIO, Rensselaer Polytechnic Institute</small> |
|---|
| 103 |
</p> |
|---|
| 104 |
</body> |
|---|
| 105 |
</html> |
|---|
| 106 |
</xsl:template> |
|---|
| 107 |
|
|---|
| 108 |
<!-- === Date Info and Navigation == --> |
|---|
| 109 |
<xsl:template name="infoAndNavigation"> |
|---|
| 110 |
<div id="dateInfo"> |
|---|
| 111 |
<xsl:if test="/bedework/page!='calendars' and /bedework/page!='event'"> |
|---|
| 112 |
<<a href="{$setViewPeriod}&date={$prevdate}">prev</a> |
|---|
| 113 |
<xsl:text> </xsl:text> |
|---|
| 114 |
<strong> |
|---|
| 115 |
<xsl:choose> |
|---|
| 116 |
<xsl:when test="/bedework/periodname='Day'"> |
|---|
| 117 |
<xsl:value-of select="substring(/bedework/eventscalendar/year/month/week/day/name,1,3)"/>, <xsl:value-of select="/bedework/eventscalendar/year/month/shortname"/> <xsl:value-of select="/bedework/eventscalendar/year/month/week/day/value"/>, <xsl:value-of select="/bedework/eventscalendar/year/value"/> |
|---|
| 118 |
</xsl:when> |
|---|
| 119 |
<xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> |
|---|
| 120 |
Week of <xsl:value-of select="/bedework/eventscalendar/year/month/shortname"/> <xsl:value-of select="/bedework/eventscalendar/year/month/week/day/value"/>, <xsl:value-of select="/bedework/eventscalendar/year/value"/> |
|---|
| 121 |
</xsl:when> |
|---|
| 122 |
<xsl:when test="/bedework/periodname='Month'"> |
|---|
| 123 |
<xsl:value-of select="/bedework/eventscalendar/year/month/longname"/>, <xsl:value-of select="/bedework/eventscalendar/year/value"/> |
|---|
| 124 |
</xsl:when> |
|---|
| 125 |
<xsl:otherwise> |
|---|
| 126 |
<xsl:value-of select="/bedework/eventscalendar/year/value"/> |
|---|
| 127 |
</xsl:otherwise> |
|---|
| 128 |
</xsl:choose> |
|---|
| 129 |
</strong> |
|---|
| 130 |
<xsl:text> </xsl:text> |
|---|
| 131 |
<a href="{$setViewPeriod}&date={$nextdate}">next</a>> |
|---|
| 132 |
<br /> |
|---|
| 133 |
</xsl:if> |
|---|
| 134 |
</div> |
|---|
| 135 |
<div id="mainNav"> |
|---|
| 136 |
<xsl:choose> |
|---|
| 137 |
<xsl:when test="/bedework/page='eventscalendar'"> |
|---|
| 138 |
<xsl:choose> |
|---|
| 139 |
<xsl:when test="/bedework/periodname='Day'"> |
|---|
| 140 |
day |
|---|
| 141 |
</xsl:when> |
|---|
| 142 |
<xsl:otherwise> |
|---|
| 143 |
<a href="{$setViewPeriod}&viewType=dayView&date={$curdate}">day</a> |
|---|
| 144 |
</xsl:otherwise> |
|---|
| 145 |
</xsl:choose> | |
|---|
| 146 |
<xsl:choose> |
|---|
| 147 |
<xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> |
|---|
| 148 |
week |
|---|
| 149 |
</xsl:when> |
|---|
| 150 |
<xsl:otherwise> |
|---|
| 151 |
<a href="{$setViewPeriod}&viewType=weekView&date={$curdate}">week</a> |
|---|
| 152 |
</xsl:otherwise> |
|---|
| 153 |
</xsl:choose> | |
|---|
| 154 |
<xsl:choose> |
|---|
| 155 |
<xsl:when test="/bedework/periodname='Month'"> |
|---|
| 156 |
month |
|---|
| 157 |
</xsl:when> |
|---|
| 158 |
<xsl:otherwise> |
|---|
| 159 |
<a href="{$setViewPeriod}&viewType=monthView&date={$curdate}">month</a> |
|---|
| 160 |
</xsl:otherwise> |
|---|
| 161 |
</xsl:choose> | |
|---|
| 162 |
</xsl:when> |
|---|
| 163 |
<xsl:otherwise> |
|---|
| 164 |
<a href="{$setViewPeriod}&viewType=dayView&date={$curdate}">day</a> | |
|---|
| 165 |
<a href="{$setViewPeriod}&viewType=weekView&date={$curdate}">week</a> | |
|---|
| 166 |
<a href="{$setViewPeriod}&viewType=monthView&date={$curdate}">month</a> | |
|---|
| 167 |
</xsl:otherwise> |
|---|
| 168 |
</xsl:choose> |
|---|
| 169 |
<a href="{$setViewPeriod}&viewType=todayView&date={$curdate}"> |
|---|
| 170 |
today |
|---|
| 171 |
</a><br /> |
|---|
| 172 |
<xsl:choose> |
|---|
| 173 |
<xsl:when test="/bedework/selectionState/selectionType = 'calendar'"> |
|---|
| 174 |
Calendar: <xsl:value-of select="/bedework/selectionState/subscriptions/subscription/calendar/name"/> |
|---|
| 175 |
<span class="link">[<a href="{$setSelection}">default view</a>]</span> |
|---|
| 176 |
</xsl:when> |
|---|
| 177 |
<xsl:when test="/bedework/selectionState/selectionType = 'search'"> |
|---|
| 178 |
Current search: <xsl:value-of select="/bedework/search"/> |
|---|
| 179 |
<span class="link">[<a href="{$setSelection}">default view</a>]</span> |
|---|
| 180 |
</xsl:when> |
|---|
| 181 |
<xsl:when test="/bedework/selectionState/selectionType = 'subscription'"> |
|---|
| 182 |
Subscription: (not implemented yet) |
|---|
| 183 |
<span class="link">[<a href="{$setSelection}">default view</a>]</span> |
|---|
| 184 |
</xsl:when> |
|---|
| 185 |
<xsl:when test="/bedework/selectionState/selectionType = 'filter'"> |
|---|
| 186 |
Filter: (not implemented yet) |
|---|
| 187 |
<span class="link">[<a href="{$setSelection}">default view</a>]</span> |
|---|
| 188 |
</xsl:when> |
|---|
| 189 |
<xsl:otherwise><!-- view --> |
|---|
| 190 |
<!--<form name="selectViewForm" method="post" action="{$setSelection}"> |
|---|
| 191 |
View: |
|---|
| 192 |
<select name="viewName" onChange="submit()" > |
|---|
| 193 |
<xsl:for-each select="/bedework/views/view"> |
|---|
| 194 |
<xsl:variable name="name" select="name"/> |
|---|
| 195 |
<xsl:choose> |
|---|
| 196 |
<xsl:when test="name=/bedework/selectionState/view/name"> |
|---|
| 197 |
<option value="{$name}" selected="selected"><xsl:value-of select="name"/></option> |
|---|
| 198 |
</xsl:when> |
|---|
| 199 |
<xsl:otherwise> |
|---|
| 200 |
<option value="{$name}"><xsl:value-of select="name"/></option> |
|---|
| 201 |
</xsl:otherwise> |
|---|
| 202 |
</xsl:choose> |
|---|
| 203 |
</xsl:for-each> |
|---|
| 204 |
</select> |
|---|
| 205 |
</form>--> |
|---|
| 206 |
<span class="calLinks"><a href="{$fetchPublicCalendars}">available calendars</a></span> |
|---|
| 207 |
</xsl:otherwise> |
|---|
| 208 |
</xsl:choose> |
|---|
| 209 |
</div><br/><br/> |
|---|
| 210 |
</xsl:template> |
|---|
| 211 |
|
|---|
| 212 |
<!--==== SINGLE EVENT ====--> |
|---|
| 213 |
<xsl:template match="event"> |
|---|
| 214 |
<xsl:variable name="subscriptionId" select="subscription/id"/> |
|---|
| 215 |
<xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| 216 |
<xsl:variable name="guid" select="guid"/> |
|---|
| 217 |
<xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| 218 |
<xsl:variable name="statusClass"> |
|---|
| 219 |
<xsl:choose> |
|---|
| 220 |
<xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> |
|---|
| 221 |
<xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> |
|---|
| 222 |
<xsl:otherwise>bwStatusConfirmed</xsl:otherwise> |
|---|
| 223 |
</xsl:choose> |
|---|
| 224 |
</xsl:variable> |
|---|
| 225 |
<h2 class="{$statusClass}"> |
|---|
| 226 |
<xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> |
|---|
| 227 |
<xsl:choose> |
|---|
| 228 |
<xsl:when test="link != ''"> |
|---|
| 229 |
<xsl:variable name="link" select="link"/> |
|---|
| 230 |
<a href="{$link}"> |
|---|
| 231 |
<xsl:value-of select="summary"/> |
|---|
| 232 |
</a> |
|---|
| 233 |
</xsl:when> |
|---|
| 234 |
<xsl:otherwise> |
|---|
| 235 |
<xsl:value-of select="summary"/> |
|---|
| 236 |
</xsl:otherwise> |
|---|
| 237 |
</xsl:choose> |
|---|
| 238 |
</h2> |
|---|
| 239 |
<table id="eventTable" cellpadding="0" cellspacing="0"> |
|---|
| 240 |
<tr> |
|---|
| 241 |
<td class="fieldname">When:</td> |
|---|
| 242 |
<td class="fieldval"> |
|---|
| 243 |
<!-- always display local time --> |
|---|
| 244 |
<xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> |
|---|
| 245 |
<xsl:if test="start/allday = 'false'"> |
|---|
| 246 |
<span class="time"><xsl:value-of select="start/time"/></span> |
|---|
| 247 |
</xsl:if> |
|---|
| 248 |
<xsl:if test="(end/longdate != start/longdate) or |
|---|
| 249 |
((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> |
|---|
| 250 |
<xsl:if test="end/longdate != start/longdate"> |
|---|
| 251 |
<xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> |
|---|
| 252 |
</xsl:if> |
|---|
| 253 |
<xsl:choose> |
|---|
| 254 |
<xsl:when test="start/allday = 'true'"> |
|---|
| 255 |
<span class="time"><em>(all day)</em></span> |
|---|
| 256 |
</xsl:when> |
|---|
| 257 |
<xsl:when test="end/longdate != start/longdate"> |
|---|
| 258 |
<span class="time"><xsl:value-of select="end/time"/></span> |
|---|
| 259 |
</xsl:when> |
|---|
| 260 |
<xsl:when test="end/time != start/time"> |
|---|
| 261 |
<span class="time"><xsl:value-of select="end/time"/></span> |
|---|
| 262 |
</xsl:when> |
|---|
| 263 |
</xsl:choose> |
|---|
| 264 |
<!-- if timezones are not local, or if floating add labels: --> |
|---|
| 265 |
<xsl:if test="start/timezone/islocal = 'false' or end/timezone/islocal = 'false'"> |
|---|
| 266 |
<xsl:text> </xsl:text> |
|---|
| 267 |
-- |
|---|
| 268 |
<strong> |
|---|
| 269 |
<xsl:choose> |
|---|
| 270 |
<xsl:when test="start/floating = 'true'"> |
|---|
| 271 |
Floating time |
|---|
| 272 |
</xsl:when> |
|---|
| 273 |
<xsl:otherwise> |
|---|
| 274 |
Local time |
|---|
| 275 |
</xsl:otherwise> |
|---|
| 276 |
</xsl:choose> |
|---|
| 277 |
</strong> |
|---|
| 278 |
<br/> |
|---|
| 279 |
</xsl:if> |
|---|
| 280 |
<!-- display in timezone if not local or floating time) --> |
|---|
| 281 |
<xsl:if test="(start/timezone/islocal = 'false' or end/timezone/islocal = 'false') and start/floating = 'false'"> |
|---|
| 282 |
<xsl:choose> |
|---|
| 283 |
<xsl:when test="start/timezone/id != end/timezone/id"> |
|---|
| 284 |
<!-- need to display both timezones if they differ from start to end --> |
|---|
| 285 |
<table border="0" cellspacing="0" id="tztable"> |
|---|
| 286 |
<tr> |
|---|
| 287 |
<td> |
|---|
| 288 |
<strong>Start:</strong> |
|---|
| 289 |
</td> |
|---|
| 290 |
<td> |
|---|
| 291 |
<xsl:choose> |
|---|
| 292 |
<xsl:when test="start/timezone/islocal='true'"> |
|---|
| 293 |
<xsl:value-of select="start/dayname"/>, |
|---|
| 294 |
<xsl:value-of select="start/longdate"/> |
|---|
| 295 |
<xsl:text> </xsl:text> |
|---|
| 296 |
<span class="time"><xsl:value-of select="start/time"/></span> |
|---|
| 297 |
</xsl:when> |
|---|
| 298 |
<xsl:otherwise> |
|---|
| 299 |
<xsl:value-of select="start/timezone/dayname"/>, |
|---|
| 300 |
<xsl:value-of select="start/timezone/longdate"/> |
|---|
| 301 |
<xsl:text> </xsl:text> |
|---|
| 302 |
<span class="time"><xsl:value-of select="start/timezone/time"/></span> |
|---|
| 303 |
</xsl:otherwise> |
|---|
| 304 |
</xsl:choose> |
|---|
| 305 |
</td> |
|---|
| 306 |
<td> |
|---|
| 307 |
-- |
|---|
| 308 |
<strong><xsl:value-of select="start/timezone/id"/></strong> |
|---|
| 309 |
</td> |
|---|
| 310 |
</tr> |
|---|
| 311 |
<tr> |
|---|
| 312 |
<td> |
|---|
| 313 |
<strong>End:</strong> |
|---|
| 314 |
</td> |
|---|
| 315 |
<td> |
|---|
| 316 |
<xsl:choose> |
|---|
| 317 |
<xsl:when test="end/timezone/islocal='true'"> |
|---|
| 318 |
<xsl:value-of select="end/dayname"/>, |
|---|
| 319 |
<xsl:value-of select="end/longdate"/> |
|---|
| 320 |
<xsl:text> </xsl:text> |
|---|
| 321 |
<span class="time"><xsl:value-of select="end/time"/></span> |
|---|
| 322 |
</xsl:when> |
|---|
| 323 |
<xsl:otherwise> |
|---|
| 324 |
<xsl:value-of select="end/timezone/dayname"/>, |
|---|
| 325 |
<xsl:value-of select="end/timezone/longdate"/> |
|---|
| 326 |
<xsl:text> </xsl:text> |
|---|
| 327 |
<span class="time"><xsl:value-of select="end/timezone/time"/></span> |
|---|
| 328 |
</xsl:otherwise> |
|---|
| 329 |
</xsl:choose> |
|---|
| 330 |
</td> |
|---|
| 331 |
<td> |
|---|
| 332 |
-- |
|---|
| 333 |
<strong><xsl:value-of select="end/timezone/id"/></strong> |
|---|
| 334 |
</td> |
|---|
| 335 |
</tr> |
|---|
| 336 |
</table> |
|---|
| 337 |
</xsl:when> |
|---|
| 338 |
<xsl:otherwise> |
|---|
| 339 |
<!-- otherwise, timezones are the same: display as a single line --> |
|---|
| 340 |
<xsl:value-of select="start/timezone/dayname"/>, <xsl:value-of select="start/timezone/longdate"/><xsl:text> </xsl:text> |
|---|
| 341 |
<xsl:if test="start/allday = 'false'"> |
|---|
| 342 |
<span class="time"><xsl:value-of select="start/timezone/time"/></span> |
|---|
| 343 |
</xsl:if> |
|---|
| 344 |
<xsl:if test="(end/timezone/longdate != start/timezone/longdate) or |
|---|
| 345 |
((end/timezone/longdate = start/timezone/longdate) and (end/timezone/time != start/timezone/time))"> - </xsl:if> |
|---|
| 346 |
<xsl:if test="end/timezone/longdate != start/timezone/longdate"> |
|---|
| 347 |
<xsl:value-of select="substring(end/timezone/dayname,1,3)"/>, <xsl:value-of select="end/timezone/longdate"/><xsl:text> </xsl:text> |
|---|
| 348 |
</xsl:if> |
|---|
| 349 |
<xsl:choose> |
|---|
| 350 |
<xsl:when test="start/allday = 'true'"> |
|---|
| 351 |
<span class="time"><em>(all day)</em></span> |
|---|
| 352 |
</xsl:when> |
|---|
| 353 |
<xsl:when test="end/timezone/longdate != start/timezone/longdate"> |
|---|
| 354 |
<span class="time"><xsl:value-of select="end/timezone/time"/></span> |
|---|
| 355 |
</xsl:when> |
|---|
| 356 |
<xsl:when test="end/timezone/time != start/timezone/time"> |
|---|
| 357 |
<span class="time"><xsl:value-of select="end/timezone/time"/></span> |
|---|
| 358 |
</xsl:when> |
|---|
| 359 |
</xsl:choose> |
|---|
| 360 |
<xsl:text> </xsl:text> |
|---|
| 361 |
-- |
|---|
| 362 |
<strong><xsl:value-of select="start/timezone/id"/></strong> |
|---|
| 363 |
</xsl:otherwise> |
|---|
| 364 |
</xsl:choose> |
|---|
| 365 |
</xsl:if> |
|---|
| 366 |
</td> |
|---|
| 367 |
<th class="icalIcon" rowspan="2"> |
|---|
| 368 |
<div id="eventIcons"> |
|---|
| 369 |
<!--<a href="{$privateCal}/event/addEventRef.do?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar"> |
|---|
| 370 |
<img class="addref" src="{$resourcesRoot}/images/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/> |
|---|
| 371 |
add to my calendar</a>--> |
|---|
| 372 |
<!--<xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> |
|---|
| 373 |
<a href="{$export}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&skinName=ical&contentType=text/calendar&contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> |
|---|
| 374 |
<img src="{$resourcesRoot}/images/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/> |
|---|
| 375 |
download</a>--> |
|---|
| 376 |
</div> |
|---|
| 377 |
</th> |
|---|
| 378 |
</tr> |
|---|
| 379 |
<tr> |
|---|
| 380 |
<td class="fieldname">Where:</td> |
|---|
| 381 |
<td class="fieldval"> |
|---|
| 382 |
<xsl:choose> |
|---|
| 383 |
<xsl:when test="location/link=''"> |
|---|
| 384 |
<xsl:value-of select="location/address"/> |
|---|
| 385 |
</xsl:when> |
|---|
| 386 |
<xsl:otherwise> |
|---|
| 387 |
<xsl:variable name="locationLink" select="location/link"/> |
|---|
| 388 |
<a href="{$locationLink}"> |
|---|
| 389 |
<xsl:value-of select="location/address"/> |
|---|
| 390 |
</a> |
|---|
| 391 |
</xsl:otherwise> |
|---|
| 392 |
</xsl:choose> |
|---|
| 393 |
<xsl:if test="location/subaddress!=''"> |
|---|
| 394 |
<br/><xsl:value-of select="location/subaddress"/> |
|---|
| 395 |
</xsl:if> |
|---|
| 396 |
</td> |
|---|
| 397 |
</tr> |
|---|
| 398 |
<tr> |
|---|
| 399 |
<td class="fieldname">Description:</td> |
|---|
| 400 |
<td colspan="2" class="fieldval description"> |
|---|
| 401 |
<xsl:call-template name="replace"> |
|---|
| 402 |
<xsl:with-param name="string" select="description"/> |
|---|
| 403 |
<xsl:with-param name="pattern" select="'
'"/> |
|---|
| 404 |
<xsl:with-param name="replacement"><br/></xsl:with-param> |
|---|
| 405 |
</xsl:call-template> |
|---|
| 406 |
</td> |
|---|
| 407 |
</tr> |
|---|
| 408 |
<xsl:if test="status !='' and status != 'CONFIRMED'"> |
|---|
| 409 |
<tr> |
|---|
| 410 |
<td class="fieldname">Status:</td> |
|---|
| 411 |
<td class="fieldval"> |
|---|
| 412 |
<xsl:value-of select="status"/> |
|---|
| 413 |
</td> |
|---|
| 414 |
</tr> |
|---|
| 415 |
</xsl:if> |
|---|
| 416 |
<xsl:if test="cost!=''"> |
|---|
| 417 |
<tr> |
|---|
| 418 |
<td class="fieldname">Cost:</td> |
|---|
| 419 |
<td colspan="2" class="fieldval"><xsl:value-of select="cost"/></td> |
|---|
| 420 |
</tr> |
|---|
| 421 |
</xsl:if> |
|---|
| 422 |
<xsl:if test="link != ''"> |
|---|
| 423 |
<tr> |
|---|
| 424 |
<td class="fieldname">See:</td> |
|---|
| 425 |
<td colspan="2" class="fieldval"> |
|---|
| 426 |
<xsl:variable name="link" select="link"/> |
|---|
| 427 |
<a href="{$link}"><xsl:value-of select="link"/></a> |
|---|
| 428 |
</td> |
|---|
| 429 |
</tr> |
|---|
| 430 |
</xsl:if> |
|---|
| 431 |
<xsl:if test="contact/name!='none'"> |
|---|
| 432 |
<tr> |
|---|
| 433 |
<td class="fieldname">Contact:</td> |
|---|
| 434 |
<td colspan="2" class="fieldval"> |
|---|
| 435 |
<xsl:choose> |
|---|
| 436 |
<xsl:when test="contact/link=''"> |
|---|
| 437 |
<xsl:value-of select="contact/name"/> |
|---|
| 438 |
</xsl:when> |
|---|
| 439 |
<xsl:otherwise> |
|---|
| 440 |
<xsl:variable name="sponsorLink" select="contact/link"/> |
|---|
| 441 |
<a href="{$sponsorLink}"> |
|---|
| 442 |
<xsl:value-of select="contact/name"/> |
|---|
| 443 |
</a> |
|---|
| 444 |
</xsl:otherwise> |
|---|
| 445 |
</xsl:choose> |
|---|
| 446 |
<xsl:if test="contact/phone!=''"> |
|---|
| 447 |
<br /><xsl:value-of select="contact/phone"/> |
|---|
| 448 |
</xsl:if> |
|---|
| 449 |
<!-- If you want to display email addresses, uncomment the |
|---|
| 450 |
following 8 lines. --> |
|---|
| 451 |
<!-- <xsl:if test="contact/email!=''"> |
|---|
| 452 |
<br /> |
|---|
| 453 |
<xsl:variable name="email" select="contact/email"/> |
|---|
| 454 |
<xsl:variable name="subject" select="summary"/> |
|---|
| 455 |
<a href="mailto:{$email}&subject={$subject}"> |
|---|
| 456 |
<xsl:value-of select="contact/email"/> |
|---|
| 457 |
</a> |
|---|
| 458 |
</xsl:if> --> |
|---|
| 459 |
</td> |
|---|
| 460 |
</tr> |
|---|
| 461 |
</xsl:if> |
|---|
| 462 |
<xsl:if test="calendar/path!=''"> |
|---|
| 463 |
<tr> |
|---|
| 464 |
<td class="fieldname">Calendar:</td> |
|---|
| 465 |
<td class="fieldval"> |
|---|
| 466 |
<xsl:variable name="calUrl" select="calendar/encodedPath"/> |
|---|
| 467 |
<a href="{$setSelection}&calUrl={$calUrl}"> |
|---|
| 468 |
<xsl:value-of select="calendar/name"/> |
|---|
| 469 |
</a> |
|---|
| 470 |
</td> |
|---|
| 471 |
</tr> |
|---|
| 472 |
</xsl:if> |
|---|
| 473 |
<xsl:if test="categories/category"> |
|---|
| 474 |
<tr> |
|---|
| 475 |
<td class="fieldname">Categories:</td> |
|---|
| 476 |
<td class="fieldval"> |
|---|
| 477 |
<xsl:for-each select="categories/category"> |
|---|
| 478 |
<xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if> |
|---|
| 479 |
</xsl:for-each> |
|---|
| 480 |
</td> |
|---|
| 481 |
</tr> |
|---|
| 482 |
</xsl:if> |
|---|
| 483 |
</table> |
|---|
| 484 |
</xsl:template> |
|---|
| 485 |
|
|---|
| 486 |
<!--==== LIST VIEW (for day, week, and month) ====--> |
|---|
| 487 |
<xsl:template name="listView"> |
|---|
| 488 |
<xsl:choose> |
|---|
| 489 |
<xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> |
|---|
| 490 |
<p>No events to display.</p> |
|---|
| 491 |
</xsl:when> |
|---|
| 492 |
<xsl:otherwise> |
|---|
| 493 |
<xsl:for-each select="/bedework/eventscalendar/year/month/week/day[count(event)!=0]"> |
|---|
| 494 |
<xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''"> |
|---|
| 495 |
<br/><br/><!-- why? css isn't stong on blackberry --> |
|---|
| 496 |
<h3> |
|---|
| 497 |
<xsl:variable name="date" select="date"/> |
|---|
| 498 |
<a href="{$setViewPeriod}&viewType=dayView&date={$date}"> |
|---|
| 499 |
<xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> |
|---|
| 500 |
</a> |
|---|
| 501 |
</h3> |
|---|
| 502 |
</xsl:if> |
|---|
| 503 |
<xsl:for-each select="event"> |
|---|
| 504 |
<xsl:variable name="id" select="id"/> |
|---|
| 505 |
<xsl:variable name="subscriptionId" select="subscription/id"/> |
|---|
| 506 |
<xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| 507 |
<xsl:variable name="guid" select="guid"/> |
|---|
| 508 |
<xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| 509 |
<dl> |
|---|
| 510 |
<dt> |
|---|
| 511 |
<xsl:choose> |
|---|
| 512 |
<xsl:when test="start/allday = 'true' and |
|---|
| 513 |
start/shortdate = end/shortdate"> |
|---|
| 514 |
all day |
|---|
| 515 |
</xsl:when> |
|---|
| 516 |
<xsl:when test="start/shortdate = end/shortdate and |
|---|
| 517 |
start/time = end/time"> |
|---|
| 518 |
<xsl:value-of select="start/time"/> |
|---|
| 519 |
</xsl:when> |
|---|
| 520 |
<xsl:otherwise> |
|---|
| 521 |
<xsl:choose> |
|---|
| 522 |
<xsl:when test="start/allday = 'true' and |
|---|
| 523 |
parent::day/shortdate = start/shortdate"> |
|---|
| 524 |
today |
|---|
| 525 |
</xsl:when> |
|---|
| 526 |
<xsl:when test="parent::day/shortdate != start/shortdate"> |
|---|
| 527 |
<span class="littleArrow">«</span>  |
|---|
| 528 |
<xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> |
|---|
| 529 |
</xsl:when> |
|---|
| 530 |
<xsl:otherwise> |
|---|
| 531 |
<xsl:value-of select="start/time"/> |
|---|
| 532 |
</xsl:otherwise> |
|---|
| 533 |
</xsl:choose> |
|---|
| 534 |
- |
|---|
| 535 |
<xsl:choose> |
|---|
| 536 |
<xsl:when test="end/allday = 'true' and |
|---|
| 537 |
parent::day/shortdate = end/shortdate"> |
|---|
| 538 |
today |
|---|
| 539 |
</xsl:when> |
|---|
| 540 |
<xsl:when test="parent::day/shortdate != end/shortdate"> |
|---|
| 541 |
<xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> |
|---|
| 542 |
 <span class="littleArrow">»</span> |
|---|
| 543 |
</xsl:when> |
|---|
| 544 |
<xsl:otherwise> |
|---|
| 545 |
<xsl:value-of select="end/time"/> |
|---|
| 546 |
</xsl:otherwise> |
|---|
| 547 |
</xsl:choose> |
|---|
| 548 |
</xsl:otherwise> |
|---|
| 549 |
</xsl:choose> |
|---|
| 550 |
</dt> |
|---|
| 551 |
<dd> |
|---|
| 552 |
<xsl:if test="status='CANCELLED'"><strong>CANCELLED: </strong></xsl:if> |
|---|
| 553 |
<xsl:choose> |
|---|
| 554 |
<xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> |
|---|
| 555 |
<a href="{$eventView}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| 556 |
<strong> |
|---|
| 557 |
<xsl:value-of select="summary"/>: |
|---|
| 558 |
</strong> |
|---|
| 559 |
<xsl:value-of select="description"/>  |
|---|
| 560 |
<em> |
|---|
| 561 |
<xsl:value-of select="location/address"/> |
|---|
| 562 |
<xsl:if test="location/subaddress != ''"> |
|---|
| 563 |
, <xsl:value-of select="location/subaddress"/> |
|---|
| 564 |
</xsl:if>.  |
|---|
| 565 |
<xsl:if test="cost!=''"> |
|---|
| 566 |
<xsl:value-of select="cost"/>.  |
|---|
| 567 |
</xsl:if> |
|---|
| 568 |
<xsl:if test="contact/name!='none'"> |
|---|
| 569 |
Contact: <xsl:value-of select="contact/name"/> |
|---|
| 570 |
</xsl:if> |
|---|
| 571 |
</em> |
|---|
| 572 |
- <xsl:value-of select="calendar/name"/> |
|---|
| 573 |
</a> |
|---|
| 574 |
<xsl:if test="link != ''"> |
|---|
| 575 |
<xsl:variable name="link" select="link"/> |
|---|
| 576 |
<a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> |
|---|
| 577 |
</xsl:if> |
|---|
| 578 |
</xsl:when> |
|---|
| 579 |
<xsl:otherwise> |
|---|
| 580 |
<a href="{$eventView}&subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| 581 |
<xsl:value-of select="summary"/> |
|---|
| 582 |
<xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> |
|---|
| 583 |
</a> |
|---|
| 584 |
- <em><xsl:value-of select="calendar/name"/></em> |
|---|
| 585 |
</xsl:otherwise> |
|---|
| 586 |
</xsl:choose> |
|---|
| 587 |
</dd> |
|---|
| 588 |
</dl> |
|---|
| 589 |
</xsl:for-each> |
|---|
| 590 |
</xsl:for-each> |
|---|
| 591 |
</xsl:otherwise> |
|---|
| 592 |
</xsl:choose> |
|---|
| 593 |
</xsl:template> |
|---|
| 594 |
|
|---|
| 595 |
<!--==== CALENDARS PAGE ====--> |
|---|
| 596 |
<xsl:template match="calendars"> |
|---|
| 597 |
<p><b>All Calendars</b><br /> |
|---|
| 598 |
Select a calendar from the list below to see only that calendar's events.</p> |
|---|
| 599 |
<xsl:apply-templates select="calendar/calendar" mode="calTree"/> |
|---|
| 600 |
</xsl:template> |
|---|
| 601 |
|
|---|
| 602 |
<xsl:template match="calendar" mode="calTree"> |
|---|
| 603 |
<xsl:variable name="itemClass"> |
|---|
| 604 |
<xsl:choose> |
|---|
| 605 |
<xsl:when test="calendarCollection='false'">folder</xsl:when> |
|---|
| 606 |
<xsl:otherwise>calendar</xsl:otherwise> |
|---|
| 607 |
</xsl:choose> |
|---|
| 608 |
</xsl:variable> |
|---|
| 609 |
<xsl:variable name="url" select="encodedPath"/> |
|---|
| 610 |
<li class="{$itemClass}"> |
|---|
| 611 |
<a href="{$setSelection}&calUrl={$url}" title="view calendar"><xsl:value-of select="name"/></a> |
|---|
| 612 |
<xsl:if test="calendarCollection='true'"> |
|---|
| 613 |
<xsl:variable name="name" select="name"/> |
|---|
| 614 |
<xsl:variable name="calPath" select="path"/> |
|---|
| 615 |
<span class="exportCalLink"> |
|---|
| 616 |
<a href="javascript:launchExportWidget('exportCalendarForm','{$name}','{$calPath}')" id="{$calPath}" title="export calendar as iCal"> |
|---|
| 617 |
<img src="{$resourcesRoot}/images/calIconExport-sm.gif" width="13" height="13" alt="export calendar" border="0"/> |
|---|
| 618 |
</a> |
|---|
| 619 |
</span> |
|---|
| 620 |
</xsl:if> |
|---|
| 621 |
<xsl:if test="calendar"> |
|---|
| 622 |
<ul> |
|---|
| 623 |
<xsl:apply-templates select="calendar" mode="calTree"/> |
|---|
| 624 |
</ul> |
|---|
| 625 |
</xsl:if> |
|---|
| 626 |
</li> |
|---|
| 627 |
</xsl:template> |
|---|
| 628 |
|
|---|
| 629 |
|
|---|
| 630 |
|
|---|
| 631 |
<!--==== NAVIGATION ====--> |
|---|
| 632 |
|
|---|
| 633 |
<xsl:template name="dateSelect"> |
|---|
| 634 |
<form name="calForm" method="post" action="{$urlPrefix}/setView.do"> |
|---|
| 635 |
<table border="0" cellpadding="0" cellspacing="0"> |
|---|
| 636 |
<tr> |
|---|
| 637 |
<xsl:if test="/bedework/periodname!='Year'"> |
|---|
| 638 |
<td> |
|---|
| 639 |
<select name="viewStartDate.month"> |
|---|
| 640 |
<xsl:for-each select="/bedework/monthvalues/val"> |
|---|
| 641 |
<xsl:variable name="temp" select="."/> |
|---|
| 642 |
<xsl:variable name="pos" select="position()"/> |
|---|
| 643 |
<xsl:choose> |
|---|
| 644 |
<xsl:when test="/bedework/monthvalues[start=$temp]"> |
|---|
| 645 |
<option value="{$temp}" selected="selected"> |
|---|
| 646 |
<xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> |
|---|
| 647 |
</option> |
|---|
| 648 |
</xsl:when> |
|---|
| 649 |
<xsl:otherwise> |
|---|
| 650 |
<option value="{$temp}"> |
|---|
| 651 |
<xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> |
|---|
| 652 |
</option> |
|---|
| 653 |
</xsl:otherwise> |
|---|
| 654 |
</xsl:choose> |
|---|
| 655 |
</xsl:for-each> |
|---|
| 656 |
</select> |
|---|
| 657 |
</td> |
|---|
| 658 |
<xsl:if test="/bedework/periodname!='Month'"> |
|---|
| 659 |
<td> |
|---|
| 660 |
<select name="viewStartDate.day"> |
|---|
| 661 |
<xsl:for-each select="/bedework/dayvalues/val"> |
|---|
| 662 |
<xsl:variable name="temp" select="."/> |
|---|
| 663 |
<xsl:variable name="pos" select="position()"/> |
|---|
| 664 |
<xsl:choose> |
|---|
| 665 |
<xsl:when test="/bedework/dayvalues[start=$temp]"> |
|---|
| 666 |
<option value="{$temp}" selected="selected"> |
|---|
| 667 |
<xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> |
|---|
| 668 |
</option> |
|---|
| 669 |
</xsl:when> |
|---|
| 670 |
<xsl:otherwise> |
|---|
| 671 |
<option value="{$temp}"> |
|---|
| 672 |
<xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> |
|---|
| 673 |
</option> |
|---|
| 674 |
</xsl:otherwise> |
|---|
| 675 |
</xsl:choose> |
|---|
| 676 |
</xsl:for-each> |
|---|
| 677 |
</select> |
|---|
| 678 |
</td> |
|---|
| 679 |
</xsl:if> |
|---|
| 680 |
</xsl:if> |
|---|
| 681 |
<td> |
|---|
| 682 |
<xsl:variable name="temp" select="/bedework/yearvalues/start"/> |
|---|
| 683 |
<input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/> |
|---|
| 684 |
</td> |
|---|
| 685 |
<td> |
|---|
| 686 |
<input name="submit" type="submit" value="go"/> |
|---|
| 687 |
</td> |
|---|
| 688 |
</tr> |
|---|
| 689 |
</table> |
|---|
| 690 |
</form> |
|---|
| 691 |
</xsl:template> |
|---|
| 692 |
|
|---|
| 693 |
<!--==== UTILITY TEMPLATES ====--> |
|---|
| 694 |
|
|---|
| 695 |
<!-- search and replace template taken from |
|---|
| 696 |
http://www.biglist.com/lists/xsl-list/archives/200211/msg00337.html --> |
|---|
| 697 |
<xsl:template name="replace"> |
|---|
| 698 |
<xsl:param name="string" select="''"/> |
|---|
| 699 |
<xsl:param name="pattern" select="''"/> |
|---|
| 700 |
<xsl:param name="replacement" select="''"/> |
|---|
| 701 |
<xsl:choose> |
|---|
| 702 |
<xsl:when test="$pattern != '' and $string != '' and contains($string, $pattern)"> |
|---|
| 703 |
<xsl:value-of select="substring-before($string, $pattern)"/> |
|---|
| 704 |
<xsl:copy-of select="$replacement"/> |
|---|
| 705 |
<xsl:call-template name="replace"> |
|---|
| 706 |
<xsl:with-param name="string" select="substring-after($string, $pattern)"/> |
|---|
| 707 |
<xsl:with-param name="pattern" select="$pattern"/> |
|---|
| 708 |
<xsl:with-param name="replacement" select="$replacement"/> |
|---|
| 709 |
</xsl:call-template> |
|---|
| 710 |
</xsl:when> |
|---|
| 711 |
<xsl:otherwise> |
|---|
| 712 |
<xsl:value-of select="$string"/> |
|---|
| 713 |
</xsl:otherwise> |
|---|
| 714 |
</xsl:choose> |
|---|
| 715 |
</xsl:template> |
|---|
| 716 |
|
|---|
| 717 |
</xsl:stylesheet> |
|---|