| 3 | | <xsl:output |
|---|
| 4 | | method="html" |
|---|
| 5 | | indent="yes" |
|---|
| 6 | | media-type="text/html" |
|---|
| 7 | | doctype-public="-//W3C//DTD HTML 3.2 Final//EN" |
|---|
| 8 | | standalone="yes" |
|---|
| 9 | | /> |
|---|
| 10 | | <!-- ============================ --> |
|---|
| 11 | | <!-- PDA STYLESHEET --> |
|---|
| 12 | | <!-- designed for Palm Treo 600 --> |
|---|
| 13 | | <!-- ============================ --> |
|---|
| | 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"/> |
|---|
| 27 | | <xsl:variable name="appRoot" select="/ucalendar/approot"/> |
|---|
| | 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"/> |
|---|
| | 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 | |
|---|
| | 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> |
|---|
| 76 | | <th align="left" valign="top">Event:</th> |
|---|
| 77 | | <th align="left" valign="top"> |
|---|
| | 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> |
|---|
| | 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> |
|---|
| 92 | | <td valign="top">When:</td> |
|---|
| 93 | | <td valign="top"> |
|---|
| 94 | | <!-- was using abbrev dayname: substring(start/dayname,1,3) --> |
|---|
| 95 | | <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> |
|---|
| 96 | | <span class="time"><xsl:value-of select="start/time"/></span> |
|---|
| 97 | | <xsl:if test="end/time != '' or end/longdate != start/longdate"> - </xsl:if> |
|---|
| 98 | | <xsl:if test="end/longdate != start/longdate"><xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text></xsl:if> |
|---|
| 99 | | <xsl:if test="end/time != ''"><span class="time"><xsl:value-of select="end/time"/></span></xsl:if> |
|---|
| 100 | | </td> |
|---|
| 101 | | </tr> |
|---|
| 102 | | <tr> |
|---|
| 103 | | <td valign="top">Where:</td> |
|---|
| 104 | | <td valign="top"> |
|---|
| | 380 | <td class="fieldname">Where:</td> |
|---|
| | 381 | <td class="fieldval"> |
|---|
| 178 | | <xsl:when test="count(/ucalendar/eventscalendar/year/month/week/day/event)=0"> |
|---|
| 179 | | There are no events posted |
|---|
| 180 | | <xsl:choose> |
|---|
| 181 | | <xsl:when test="/ucalendar/periodname='Day'"> |
|---|
| 182 | | today<xsl:if test="/ucalendar/title!=''"> for <strong><xsl:value-of select="/ucalendar/title"/></strong></xsl:if><xsl:if test="/ucalendar/search!=''"> for search term <strong>"<xsl:value-of select="/ucalendar/search"/>"</strong></xsl:if>. |
|---|
| 183 | | </xsl:when> |
|---|
| 184 | | <xsl:when test="/ucalendar/periodname='Month'"> |
|---|
| 185 | | this month<xsl:if test="/ucalendar/title!=''"> for <strong><xsl:value-of select="/ucalendar/title"/></strong></xsl:if><xsl:if test="/ucalendar/search!=''"> for search term <strong>"<xsl:value-of select="/ucalendar/search"/>"</strong></xsl:if>. |
|---|
| 186 | | </xsl:when> |
|---|
| 187 | | <xsl:otherwise> |
|---|
| 188 | | this week<xsl:if test="/ucalendar/title!=''"> for <strong><xsl:value-of select="/ucalendar/title"/></strong></xsl:if><xsl:if test="/ucalendar/search!=''"> for search term <strong>"<xsl:value-of select="/ucalendar/search"/>"</strong></xsl:if>. |
|---|
| 189 | | </xsl:otherwise> |
|---|
| 190 | | </xsl:choose> |
|---|
| | 489 | <xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> |
|---|
| | 490 | <p>No events to display.</p> |
|---|
| 299 | | <xsl:template match="calendar"> |
|---|
| 300 | | <xsl:variable name="id" select="id"/> |
|---|
| 301 | | <h2><a href="{$urlPrefix}/selectCalendar.do?calId={$id}"><xsl:value-of select="title"/></a></h2> |
|---|
| 302 | | <ul> |
|---|
| 303 | | <xsl:for-each select="calendar"> |
|---|
| 304 | | <xsl:sort select="title" order="ascending" case-order="upper-first"/> |
|---|
| 305 | | <xsl:variable name="id" select="id"/> |
|---|
| 306 | | <li><a href="{$urlPrefix}/selectCalendar.do?calId={$id}"><xsl:value-of select="title"/></a></li> |
|---|
| 307 | | </xsl:for-each> |
|---|
| 308 | | </ul> |
|---|
| | 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> |
|---|
| 311 | | <!--==== BLOCK (named) TEMPLATES and NAVIGATION ====--> |
|---|
| 312 | | <!-- these templates are separated out for convenience and to simplify the default template --> |
|---|
| 313 | | |
|---|
| 314 | | <xsl:template name="headBar"> |
|---|
| 315 | | <p align="center"> |
|---|
| 316 | | <b>Rensselaer Events Calendar</b><br /> |
|---|
| 317 | | <xsl:if test="/ucalendar/page!='calendars' and /ucalendar/page!='event'"> |
|---|
| 318 | | <a href="{$urlPrefix}/setView.do?date={$prevdate}"><img src="{$resourcesRoot}/images/rensselaer/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a> |
|---|
| 319 | | <xsl:text> </xsl:text> |
|---|
| 320 | | <xsl:choose> |
|---|
| 321 | | <xsl:when test="/ucalendar/periodname='Day'"> |
|---|
| 322 | | <xsl:value-of select="substring(/ucalendar/eventscalendar/year/month/week/day/name,1,3)"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/month/shortname"/> <xsl:value-of select="/ucalendar/eventscalendar/year/month/week/day/value"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/value"/> |
|---|
| 323 | | </xsl:when> |
|---|
| 324 | | <xsl:when test="/ucalendar/periodname='Week' or /ucalendar/periodname=''"> |
|---|
| 325 | | Week of <xsl:value-of select="/ucalendar/eventscalendar/year/month/shortname"/> <xsl:value-of select="/ucalendar/eventscalendar/year/month/week/day/value"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/value"/> |
|---|
| 326 | | </xsl:when> |
|---|
| 327 | | <xsl:when test="/ucalendar/periodname='Month'"> |
|---|
| 328 | | <xsl:value-of select="/ucalendar/eventscalendar/year/month/longname"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/value"/> |
|---|
| 329 | | </xsl:when> |
|---|
| 330 | | <xsl:otherwise> |
|---|
| 331 | | <xsl:value-of select="/ucalendar/eventscalendar/year/value"/> |
|---|
| 332 | | </xsl:otherwise> |
|---|
| 333 | | </xsl:choose> |
|---|
| 334 | | <xsl:text> </xsl:text> |
|---|
| 335 | | <a href="{$urlPrefix}/setView.do?date={$nextdate}"><img src="{$resourcesRoot}/images/rensselaer/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a><br /> |
|---|
| 336 | | </xsl:if> |
|---|
| 337 | | <xsl:choose> |
|---|
| 338 | | <xsl:when test="/ucalendar/page='eventscalendar'"> |
|---|
| 339 | | <xsl:choose> |
|---|
| 340 | | <xsl:when test="/ucalendar/periodname='Day'"> |
|---|
| 341 | | day |
|---|
| 342 | | </xsl:when> |
|---|
| 343 | | <xsl:otherwise> |
|---|
| 344 | | <a href="{$urlPrefix}/setView.do?viewType=dayView&date={$curdate}">day</a> |
|---|
| 345 | | </xsl:otherwise> |
|---|
| 346 | | </xsl:choose> | |
|---|
| 347 | | <xsl:choose> |
|---|
| 348 | | <xsl:when test="/ucalendar/periodname='Week' or /ucalendar/periodname=''"> |
|---|
| 349 | | week |
|---|
| 350 | | </xsl:when> |
|---|
| 351 | | <xsl:otherwise> |
|---|
| 352 | | <a href="{$urlPrefix}/setView.do?viewType=weekView&date={$curdate}">week</a> |
|---|
| 353 | | </xsl:otherwise> |
|---|
| 354 | | </xsl:choose> | |
|---|
| 355 | | <xsl:choose> |
|---|
| 356 | | <xsl:when test="/ucalendar/periodname='Month'"> |
|---|
| 357 | | month |
|---|
| 358 | | </xsl:when> |
|---|
| 359 | | <xsl:otherwise> |
|---|
| 360 | | <a href="{$urlPrefix}/setView.do?viewType=monthView&date={$curdate}">month</a> |
|---|
| 361 | | </xsl:otherwise> |
|---|
| 362 | | </xsl:choose> | |
|---|
| 363 | | </xsl:when> |
|---|
| 364 | | <xsl:otherwise> |
|---|
| 365 | | <a href="{$urlPrefix}/setView.do?viewType=dayView&date={$curdate}">day</a> | |
|---|
| 366 | | <a href="{$urlPrefix}/setView.do?viewType=weekView&date={$curdate}">week</a> | |
|---|
| 367 | | <a href="{$urlPrefix}/setView.do?viewType=monthView&date={$curdate}">month</a> | |
|---|
| 368 | | </xsl:otherwise> |
|---|
| 369 | | </xsl:choose> |
|---|
| 370 | | <a href="{$urlPrefix}/setView.do?viewType=todayView&date={$curdate}"> |
|---|
| 371 | | today |
|---|
| 372 | | </a><br /> |
|---|
| 373 | | <xsl:choose> |
|---|
| 374 | | <xsl:when test="/ucalendar/title!=''"> |
|---|
| 375 | | Calendar: <xsl:value-of select="/ucalendar/title"/><xsl:text> </xsl:text> |
|---|
| 376 | | [<a href="{$urlPrefix}/selectCalendar.do?calId=">clear</a>] |
|---|
| 377 | | </xsl:when> |
|---|
| 378 | | <xsl:when test="/ucalendar/search!=''"> |
|---|
| 379 | | Current search: <xsl:value-of select="/ucalendar/search"/><xsl:text> </xsl:text> |
|---|
| 380 | | [<a href="{$urlPrefix}/selectCalendar.do?calId=">clear</a>] |
|---|
| 381 | | </xsl:when> |
|---|
| 382 | | <xsl:otherwise> |
|---|
| 383 | | Current calendar: All [<a href="{$urlPrefix}/showCals.do">select</a>] |
|---|
| 384 | | </xsl:otherwise> |
|---|
| 385 | | </xsl:choose> |
|---|
| 386 | | </p> |
|---|
| 387 | | </xsl:template> |
|---|
| 388 | | |
|---|
| 389 | | <xsl:template name="alerts"> |
|---|
| 390 | | <table id="alertsTable"> |
|---|
| 391 | | <tr> |
|---|
| 392 | | <td> |
|---|
| 393 | | I'm an alert |
|---|
| 394 | | </td> |
|---|
| 395 | | </tr> |
|---|
| 396 | | </table> |
|---|
| 397 | | </xsl:template> |
|---|
| 398 | | |
|---|
| 399 | | <!-- <xsl:template name="searchBar"> |
|---|
| 400 | | <form name="calForm" method="post" action="{$urlPrefix}/selectCalendar.do">Search: <input type="text" name="searchString" size="30" value=""/><input type="submit" value="go"/></form> |
|---|
| 401 | | </xsl:template> --> |
|---|
| | 629 | |
|---|
| | 630 | |
|---|
| | 631 | <!--==== NAVIGATION ====--> |
|---|
| 463 | | <xsl:template name="footer"> |
|---|
| 464 | | <p align="center"> |
|---|
| 465 | | <a href="http://www.rpi.edu/pda/">Return to the Portable Rensselaer</a><br /> |
|---|
| 466 | | <small>Maintained by C&CT, DotCIO<br />Rensselaer Polytechnic Institute</small> |
|---|
| 467 | | </p> |
|---|
| | 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> |
|---|