| | 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:template match="freebusy" mode="freeBusyPage"> |
|---|
| | 4 | <span id="freeBusyShareLink"> |
|---|
| | 5 | <a href="{$calendar-fetch}">share my free-busy</a> |
|---|
| | 6 | <!--<div dojoType="FloatingPane" id="bwHelpWidget-shareFreeBusy" |
|---|
| | 7 | title="Bedework Help" toggle="plain" |
|---|
| | 8 | windowState="minimized" hasShadow="true" |
|---|
| | 9 | displayMinimizeAction="true" resizable="false" |
|---|
| | 10 | constrainToContainer="true"> |
|---|
| | 11 | You may share your free busy with a user or group |
|---|
| | 12 | by <a href="{$calendar-fetch}">setting |
|---|
| | 13 | access to "read freebusy" on calendars</a> you wish to share. |
|---|
| | 14 | To share all your free busy, grant |
|---|
| | 15 | "read freebusy" access on your root folder. |
|---|
| | 16 | </div> |
|---|
| | 17 | <span class="contextHelp"> |
|---|
| | 18 | <a href="javascript:launchHelpWidget('bwHelpWidget-shareFreeBusy')"> |
|---|
| | 19 | <img src="{$resourcesRoot}/resources/std-button-help.gif" width="13" height="13" border="0" alt="help"/> |
|---|
| | 20 | </a> |
|---|
| | 21 | </span>--> |
|---|
| | 22 | <span class="contextHelp"> |
|---|
| | 23 | <img src="{$resourcesRoot}/resources/std-button-help.gif" width="13" height="13" alt="help" onmouseover="changeClass('helpShareFreeBusy','visible helpBox');" onmouseout="changeClass('helpShareFreeBusy','invisible');"/> |
|---|
| | 24 | </span> |
|---|
| | 25 | <div id="helpShareFreeBusy" class="helpBox invisible"> |
|---|
| | 26 | You may share your free busy with a user or group |
|---|
| | 27 | by setting access to "read freebusy" on calendars you wish to share. |
|---|
| | 28 | To share all your free busy, grant |
|---|
| | 29 | "read freebusy" access on your root folder. |
|---|
| | 30 | </div> |
|---|
| | 31 | </span> |
|---|
| | 32 | <h2> |
|---|
| | 33 | Free / Busy |
|---|
| | 34 | </h2> |
|---|
| | 35 | |
|---|
| | 36 | <div id="freeBusyPage"> |
|---|
| | 37 | <form name="viewFreeBusyForm" id="viewFreeBusyForm" method="post" action="{$freeBusy-fetch}"> |
|---|
| | 38 | View user's free/busy: |
|---|
| | 39 | <input type="text" name="userid" size="20"/> |
|---|
| | 40 | <input type="submit" name="submit" value="Submit"/> |
|---|
| | 41 | </form> |
|---|
| | 42 | <xsl:apply-templates select="." mode="freeBusyGrid"> |
|---|
| | 43 | <xsl:with-param name="type">normal</xsl:with-param> |
|---|
| | 44 | </xsl:apply-templates> |
|---|
| | 45 | </div> |
|---|
| | 46 | </xsl:template> |
|---|
| | 47 | |
|---|
| | 48 | <xsl:template match="freebusy" mode="freeBusyGrid"> |
|---|
| | 49 | <xsl:param name="aggregation">false</xsl:param> |
|---|
| | 50 | <xsl:param name="type">normal</xsl:param> |
|---|
| | 51 | <table id="freeBusy"> |
|---|
| | 52 | <tr> |
|---|
| | 53 | <td></td> |
|---|
| | 54 | <th colspan="24" class="left"> |
|---|
| | 55 | Freebusy for |
|---|
| | 56 | <span class="who"> |
|---|
| | 57 | <xsl:choose> |
|---|
| | 58 | <xsl:when test="$aggregation = 'true'"> |
|---|
| | 59 | all attendees |
|---|
| | 60 | </xsl:when> |
|---|
| | 61 | <xsl:when test="starts-with(fbattendee/recipient,'mailto:')"> |
|---|
| | 62 | <xsl:value-of select="substring-after(fbattendee/recipient,'mailto:')"/> |
|---|
| | 63 | </xsl:when> |
|---|
| | 64 | <xsl:otherwise> |
|---|
| | 65 | <xsl:value-of select="fbattendee/recipient"/> |
|---|
| | 66 | </xsl:otherwise> |
|---|
| | 67 | </xsl:choose> |
|---|
| | 68 | </span> |
|---|
| | 69 | </th> |
|---|
| | 70 | <!-- at some point allow switching of timezones: |
|---|
| | 71 | <th colspan="32" class="right"> |
|---|
| | 72 | <xsl:variable name="currentTimezone">America/Los_Angeles</xsl:variable> |
|---|
| | 73 | <xsl:value-of select="$formattedStartDate"/> to <xsl:value-of select="$formattedEndDate"/> |
|---|
| | 74 | <select name="timezone" id="timezonesDropDown" onchange="submit()"> |
|---|
| | 75 | <xsl:for-each select="/bedework-fbaggregator/timezones/tzid"> |
|---|
| | 76 | <option> |
|---|
| | 77 | <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute> |
|---|
| | 78 | <xsl:if test="node() = $currentTimezone"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> |
|---|
| | 79 | <xsl:value-of select="."/> |
|---|
| | 80 | </option> |
|---|
| | 81 | </xsl:for-each> |
|---|
| | 82 | </select> |
|---|
| | 83 | </th>--> |
|---|
| | 84 | </tr> |
|---|
| | 85 | <tr> |
|---|
| | 86 | <td> </td> |
|---|
| | 87 | <td colspan="12" class="morning">AM</td> |
|---|
| | 88 | <td colspan="12" class="evening">PM</td> |
|---|
| | 89 | </tr> |
|---|
| | 90 | <tr> |
|---|
| | 91 | <td> </td> |
|---|
| | 92 | <xsl:for-each select="day[position()=1]/period"> |
|---|
| | 93 | <td class="timeLabels"> |
|---|
| | 94 | <xsl:choose> |
|---|
| | 95 | <xsl:when test="number(start) mod 200 = 0"> |
|---|
| | 96 | <xsl:call-template name="timeFormatter"> |
|---|
| | 97 | <xsl:with-param name="timeString" select="start"/> |
|---|
| | 98 | <xsl:with-param name="showMinutes">no</xsl:with-param> |
|---|
| | 99 | <xsl:with-param name="showAmPm">no</xsl:with-param> |
|---|
| | 100 | </xsl:call-template> |
|---|
| | 101 | </xsl:when> |
|---|
| | 102 | <xsl:otherwise> |
|---|
| | 103 |   |
|---|
| | 104 | </xsl:otherwise> |
|---|
| | 105 | </xsl:choose> |
|---|
| | 106 | </td> |
|---|
| | 107 | </xsl:for-each> |
|---|
| | 108 | </tr> |
|---|
| | 109 | <xsl:for-each select="day"> |
|---|
| | 110 | <tr> |
|---|
| | 111 | <td class="dayDate"><xsl:value-of select="number(substring(dateString,5,2))"/>-<xsl:value-of select="number(substring(dateString,7,2))"/></td> |
|---|
| | 112 | <xsl:for-each select="period"> |
|---|
| | 113 | <xsl:variable name="startTime" select="start"/> |
|---|
| | 114 | <!-- the start date for the add event link is a concat of the day's date plus the period's time (+ seconds)--> |
|---|
| | 115 | <xsl:variable name="startDate"><xsl:value-of select="../dateString"/>T<xsl:value-of select="start"/>00</xsl:variable> |
|---|
| | 116 | <xsl:variable name="meetingDuration" select="length"/> |
|---|
| | 117 | <td> |
|---|
| | 118 | <xsl:attribute name="class"> |
|---|
| | 119 | <xsl:choose> |
|---|
| | 120 | <xsl:when test="fbtype = '0'">busy</xsl:when> |
|---|
| | 121 | <xsl:when test="fbtype = '3'">tentative</xsl:when> |
|---|
| | 122 | <xsl:otherwise>free</xsl:otherwise> |
|---|
| | 123 | </xsl:choose> |
|---|
| | 124 | </xsl:attribute> |
|---|
| | 125 | <xsl:variable name="action"> |
|---|
| | 126 | <xsl:choose> |
|---|
| | 127 | <xsl:when test="$aggregation = 'true'"><xsl:value-of select="$updateEvent"/></xsl:when> |
|---|
| | 128 | <xsl:otherwise><xsl:value-of select="$initEvent"/></xsl:otherwise> |
|---|
| | 129 | </xsl:choose> |
|---|
| | 130 | </xsl:variable> |
|---|
| | 131 | <xsl:variable name="urlString"> |
|---|
| | 132 | <xsl:choose> |
|---|
| | 133 | <xsl:when test="$type='meeting'"><xsl:value-of select="$action"/>&meetingStartdt=<xsl:value-of select="$startDate"/>&meetingDuration=<xsl:value-of select="$meetingDuration"/>&initDates=yes</xsl:when> |
|---|
| | 134 | <xsl:otherwise><xsl:value-of select="$action"/>&startdate=<xsl:value-of select="$startDate"/>&minutes=<xsl:value-of select="$meetingDuration"/></xsl:otherwise> |
|---|
| | 135 | </xsl:choose> |
|---|
| | 136 | </xsl:variable> |
|---|
| | 137 | <a href="{$urlString}"> |
|---|
| | 138 | <xsl:choose> |
|---|
| | 139 | <xsl:when test="((numBusy > 0) and (numBusy < 9)) or ((numTentative > 0) and (numTentative < 9)) and (number(numBusy) + number(numTentative) < 9)"> |
|---|
| | 140 | <xsl:value-of select="number(numBusy) + number(numTentative)"/> |
|---|
| | 141 | </xsl:when> |
|---|
| | 142 | <xsl:otherwise><img src="{$resourcesRoot}/resources/spacer.gif" width="10" height="20" border="0" alt="f"/></xsl:otherwise> |
|---|
| | 143 | </xsl:choose> |
|---|
| | 144 | <span class="eventTip"> |
|---|
| | 145 | <xsl:value-of select="substring(../dateString,1,4)"/>-<xsl:value-of select="number(substring(../dateString,5,2))"/>-<xsl:value-of select="number(substring(../dateString,7,2))"/> |
|---|
| | 146 | <br/> |
|---|
| | 147 | <strong> |
|---|
| | 148 | <xsl:call-template name="timeFormatter"> |
|---|
| | 149 | <xsl:with-param name="timeString" select="$startTime"/> |
|---|
| | 150 | </xsl:call-template> |
|---|
| | 151 | </strong> |
|---|
| | 152 | <xsl:if test="numBusy > 0"> |
|---|
| | 153 | <br/><xsl:value-of select="numBusy"/> busy |
|---|
| | 154 | </xsl:if> |
|---|
| | 155 | <xsl:if test="numTentative > 0"> |
|---|
| | 156 | <br/><xsl:value-of select="numTentative"/> tentative |
|---|
| | 157 | </xsl:if> |
|---|
| | 158 | <xsl:if test="numBusy = 0 and numTentative = 0"> |
|---|
| | 159 | <br/><em>all free</em> |
|---|
| | 160 | </xsl:if> |
|---|
| | 161 | </span> |
|---|
| | 162 | </a> |
|---|
| | 163 | </td> |
|---|
| | 164 | </xsl:for-each> |
|---|
| | 165 | </tr> |
|---|
| | 166 | </xsl:for-each> |
|---|
| | 167 | </table> |
|---|
| | 168 | |
|---|
| | 169 | <table id="freeBusyKey"> |
|---|
| | 170 | <tr> |
|---|
| | 171 | <td class="free">*</td> |
|---|
| | 172 | <td>free</td> |
|---|
| | 173 | <td> </td> |
|---|
| | 174 | <td class="busy">*</td> |
|---|
| | 175 | <td>busy</td> |
|---|
| | 176 | <td> </td> |
|---|
| | 177 | <td class="tentative">*</td> |
|---|
| | 178 | <td>tentative</td> |
|---|
| | 179 | </tr> |
|---|
| | 180 | </table> |
|---|
| | 181 | </xsl:template> |
|---|
| | 182 | |
|---|
| | 183 | <!-- time formatter (should be extended as needed) --> |
|---|
| | 184 | <xsl:template name="timeFormatter"> |
|---|
| | 185 | <xsl:param name="timeString"/><!-- required --> |
|---|
| | 186 | <xsl:param name="showMinutes">yes</xsl:param> |
|---|
| | 187 | <xsl:param name="showAmPm">yes</xsl:param> |
|---|
| | 188 | <xsl:param name="hour24">no</xsl:param> |
|---|
| | 189 | <xsl:variable name="hour" select="number(substring($timeString,1,2))"/> |
|---|
| | 190 | <xsl:variable name="minutes" select="substring($timeString,3,2)"/> |
|---|
| | 191 | <xsl:variable name="AmPm"> |
|---|
| | 192 | <xsl:choose> |
|---|
| | 193 | <xsl:when test="$hour < 12">AM</xsl:when> |
|---|
| | 194 | <xsl:otherwise>PM</xsl:otherwise> |
|---|
| | 195 | </xsl:choose> |
|---|
| | 196 | </xsl:variable> |
|---|
| | 197 | <xsl:choose> |
|---|
| | 198 | <xsl:when test="hour24 = 'yes'"> |
|---|
| | 199 | <xsl:value-of select="$hour"/> |
|---|
| | 200 | <xsl:if test="$showMinutes = 'yes'">:<xsl:value-of select="$minutes"/></xsl:if> |
|---|
| | 201 | </xsl:when> |
|---|
| | 202 | <xsl:otherwise> |
|---|
| | 203 | <xsl:choose> |
|---|
| | 204 | <xsl:when test="$hour = 0">12</xsl:when> |
|---|
| | 205 | <xsl:when test="$hour < 13"><xsl:value-of select="$hour"/></xsl:when> |
|---|
| | 206 | <xsl:otherwise><xsl:value-of select="$hour - 12"/></xsl:otherwise> |
|---|
| | 207 | </xsl:choose> |
|---|
| | 208 | <xsl:if test="$showMinutes = 'yes'">:<xsl:value-of select="$minutes"/></xsl:if> |
|---|
| | 209 | <xsl:if test="$showAmPm = 'yes'"> |
|---|
| | 210 | <xsl:text> </xsl:text> |
|---|
| | 211 | <xsl:value-of select="$AmPm"/> |
|---|
| | 212 | </xsl:if> |
|---|
| | 213 | </xsl:otherwise> |
|---|
| | 214 | </xsl:choose> |
|---|
| | 215 | </xsl:template> |
|---|
| | 216 | |
|---|
| | 217 | </xsl:stylesheet> |
|---|
| 234 | | <?xml version="1.0" encoding="UTF-8"?> |
|---|
| 235 | | <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|---|
| 236 | | |
|---|
| 237 | | <!--+++++++++++++++ Free / Busy ++++++++++++++++++++--> |
|---|
| 238 | | <xsl:template match="freebusy" mode="freeBusyPage"> |
|---|
| 239 | | <span id="freeBusyShareLink"> |
|---|
| 240 | | <a href="{$calendar-fetch}">share my free-busy</a> |
|---|
| 241 | | <!--<div dojoType="FloatingPane" id="bwHelpWidget-shareFreeBusy" |
|---|
| 242 | | title="Bedework Help" toggle="plain" |
|---|
| 243 | | windowState="minimized" hasShadow="true" |
|---|
| 244 | | displayMinimizeAction="true" resizable="false" |
|---|
| 245 | | constrainToContainer="true"> |
|---|
| 246 | | You may share your free busy with a user or group |
|---|
| 247 | | by <a href="{$calendar-fetch}">setting |
|---|
| 248 | | access to "read freebusy" on calendars</a> you wish to share. |
|---|
| 249 | | To share all your free busy, grant |
|---|
| 250 | | "read freebusy" access on your root folder. |
|---|
| 251 | | </div> |
|---|
| 252 | | <span class="contextHelp"> |
|---|
| 253 | | <a href="javascript:launchHelpWidget('bwHelpWidget-shareFreeBusy')"> |
|---|
| 254 | | <img src="{$resourcesRoot}/resources/std-button-help.gif" width="13" height="13" border="0" alt="help"/> |
|---|
| 255 | | </a> |
|---|
| 256 | | </span>--> |
|---|
| 257 | | <span class="contextHelp"> |
|---|
| 258 | | <img src="{$resourcesRoot}/resources/std-button-help.gif" width="13" height="13" alt="help" onmouseover="changeClass('helpShareFreeBusy','visible helpBox');" onmouseout="changeClass('helpShareFreeBusy','invisible');"/> |
|---|
| 259 | | </span> |
|---|
| 260 | | <div id="helpShareFreeBusy" class="helpBox invisible"> |
|---|
| 261 | | You may share your free busy with a user or group |
|---|
| 262 | | by setting access to "read freebusy" on calendars you wish to share. |
|---|
| 263 | | To share all your free busy, grant |
|---|
| 264 | | "read freebusy" access on your root folder. |
|---|
| 265 | | </div> |
|---|
| 266 | | </span> |
|---|
| 267 | | <h2> |
|---|
| 268 | | Free / Busy |
|---|
| 269 | | </h2> |
|---|
| 270 | | |
|---|
| 271 | | <div id="freeBusyPage"> |
|---|
| 272 | | <form name="viewFreeBusyForm" id="viewFreeBusyForm" method="post" action="{$freeBusy-fetch}"> |
|---|
| 273 | | View user's free/busy: |
|---|
| 274 | | <input type="text" name="userid" size="20"/> |
|---|
| 275 | | <input type="submit" name="submit" value="Submit"/> |
|---|
| 276 | | </form> |
|---|
| 277 | | <xsl:apply-templates select="." mode="freeBusyGrid"> |
|---|
| 278 | | <xsl:with-param name="type">normal</xsl:with-param> |
|---|
| 279 | | </xsl:apply-templates> |
|---|
| 280 | | </div> |
|---|
| 281 | | </xsl:template> |
|---|
| 282 | | |
|---|
| 283 | | |
|---|
| 284 | | |
|---|
| 285 | | |
|---|
| 286 | | |
|---|
| 287 | | |
|---|
| 288 | | <xsl:template match="freebusy" mode="freeBusyGrid"> |
|---|
| 289 | | <xsl:param name="aggregation">false</xsl:param> |
|---|
| 290 | | <xsl:param name="type">normal</xsl:param> |
|---|
| 291 | | <table id="freeBusy"> |
|---|
| 292 | | <tr> |
|---|
| 293 | | <td></td> |
|---|
| 294 | | <th colspan="24" class="left"> |
|---|
| 295 | | Freebusy for |
|---|
| 296 | | <span class="who"> |
|---|
| 297 | | <xsl:choose> |
|---|
| 298 | | <xsl:when test="$aggregation = 'true'"> |
|---|
| 299 | | all attendees |
|---|
| 300 | | </xsl:when> |
|---|
| 301 | | <xsl:when test="starts-with(fbattendee/recipient,'mailto:')"> |
|---|
| 302 | | <xsl:value-of select="substring-after(fbattendee/recipient,'mailto:')"/> |
|---|
| 303 | | </xsl:when> |
|---|
| 304 | | <xsl:otherwise> |
|---|
| 305 | | <xsl:value-of select="fbattendee/recipient"/> |
|---|
| 306 | | </xsl:otherwise> |
|---|
| 307 | | </xsl:choose> |
|---|
| 308 | | </span> |
|---|
| 309 | | </th> |
|---|
| 310 | | <!-- at some point allow switching of timezones: |
|---|
| 311 | | <th colspan="32" class="right"> |
|---|
| 312 | | <xsl:variable name="currentTimezone">America/Los_Angeles</xsl:variable> |
|---|
| 313 | | <xsl:value-of select="$formattedStartDate"/> to <xsl:value-of select="$formattedEndDate"/> |
|---|
| 314 | | <select name="timezone" id="timezonesDropDown" onchange="submit()"> |
|---|
| 315 | | <xsl:for-each select="/bedework-fbaggregator/timezones/tzid"> |
|---|
| 316 | | <option> |
|---|
| 317 | | <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute> |
|---|
| 318 | | <xsl:if test="node() = $currentTimezone"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> |
|---|
| 319 | | <xsl:value-of select="."/> |
|---|
| 320 | | </option> |
|---|
| 321 | | </xsl:for-each> |
|---|
| 322 | | </select> |
|---|
| 323 | | </th>--> |
|---|
| 324 | | </tr> |
|---|
| 325 | | <tr> |
|---|
| 326 | | <td> </td> |
|---|
| 327 | | <td colspan="12" class="morning">AM</td> |
|---|
| 328 | | <td colspan="12" class="evening">PM</td> |
|---|
| 329 | | </tr> |
|---|
| 330 | | <tr> |
|---|
| 331 | | <td> </td> |
|---|
| 332 | | <xsl:for-each select="day[position()=1]/period"> |
|---|
| 333 | | <td class="timeLabels"> |
|---|
| 334 | | <xsl:choose> |
|---|
| 335 | | <xsl:when test="number(start) mod 200 = 0"> |
|---|
| 336 | | <xsl:call-template name="timeFormatter"> |
|---|
| 337 | | <xsl:with-param name="timeString" select="start"/> |
|---|
| 338 | | <xsl:with-param name="showMinutes">no</xsl:with-param> |
|---|
| 339 | | <xsl:with-param name="showAmPm">no</xsl:with-param> |
|---|
| 340 | | </xsl:call-template> |
|---|
| 341 | | </xsl:when> |
|---|
| 342 | | <xsl:otherwise> |
|---|
| 343 | |   |
|---|
| 344 | | </xsl:otherwise> |
|---|
| 345 | | </xsl:choose> |
|---|
| 346 | | </td> |
|---|
| 347 | | </xsl:for-each> |
|---|
| 348 | | </tr> |
|---|
| 349 | | <xsl:for-each select="day"> |
|---|
| 350 | | <tr> |
|---|
| 351 | | <td class="dayDate"><xsl:value-of select="number(substring(dateString,5,2))"/>-<xsl:value-of select="number(substring(dateString,7,2))"/></td> |
|---|
| 352 | | <xsl:for-each select="period"> |
|---|
| 353 | | <xsl:variable name="startTime" select="start"/> |
|---|
| 354 | | <!-- the start date for the add event link is a concat of the day's date plus the period's time (+ seconds)--> |
|---|
| 355 | | <xsl:variable name="startDate"><xsl:value-of select="../dateString"/>T<xsl:value-of select="start"/>00</xsl:variable> |
|---|
| 356 | | <xsl:variable name="meetingDuration" select="length"/> |
|---|
| 357 | | <td> |
|---|
| 358 | | <xsl:attribute name="class"> |
|---|
| 359 | | <xsl:choose> |
|---|
| 360 | | <xsl:when test="fbtype = '0'">busy</xsl:when> |
|---|
| 361 | | <xsl:when test="fbtype = '3'">tentative</xsl:when> |
|---|
| 362 | | <xsl:otherwise>free</xsl:otherwise> |
|---|
| 363 | | </xsl:choose> |
|---|
| 364 | | </xsl:attribute> |
|---|
| 365 | | <xsl:variable name="action"> |
|---|
| 366 | | <xsl:choose> |
|---|
| 367 | | <xsl:when test="$aggregation = 'true'"><xsl:value-of select="$updateEvent"/></xsl:when> |
|---|
| 368 | | <xsl:otherwise><xsl:value-of select="$initEvent"/></xsl:otherwise> |
|---|
| 369 | | </xsl:choose> |
|---|
| 370 | | </xsl:variable> |
|---|
| 371 | | <xsl:variable name="urlString"> |
|---|
| 372 | | <xsl:choose> |
|---|
| 373 | | <xsl:when test="$type='meeting'"><xsl:value-of select="$action"/>&meetingStartdt=<xsl:value-of select="$startDate"/>&meetingDuration=<xsl:value-of select="$meetingDuration"/>&initDates=yes</xsl:when> |
|---|
| 374 | | <xsl:otherwise><xsl:value-of select="$action"/>&startdate=<xsl:value-of select="$startDate"/>&minutes=<xsl:value-of select="$meetingDuration"/></xsl:otherwise> |
|---|
| 375 | | </xsl:choose> |
|---|
| 376 | | </xsl:variable> |
|---|
| 377 | | <a href="{$urlString}"> |
|---|
| 378 | | <xsl:choose> |
|---|
| 379 | | <xsl:when test="((numBusy > 0) and (numBusy < 9)) or ((numTentative > 0) and (numTentative < 9)) and (number(numBusy) + number(numTentative) < 9)"> |
|---|
| 380 | | <xsl:value-of select="number(numBusy) + number(numTentative)"/> |
|---|
| 381 | | </xsl:when> |
|---|
| 382 | | <xsl:otherwise><img src="{$resourcesRoot}/resources/spacer.gif" width="10" height="20" border="0" alt="f"/></xsl:otherwise> |
|---|
| 383 | | </xsl:choose> |
|---|
| 384 | | <span class="eventTip"> |
|---|
| 385 | | <xsl:value-of select="substring(../dateString,1,4)"/>-<xsl:value-of select="number(substring(../dateString,5,2))"/>-<xsl:value-of select="number(substring(../dateString,7,2))"/> |
|---|
| 386 | | <br/> |
|---|
| 387 | | <strong> |
|---|
| 388 | | <xsl:call-template name="timeFormatter"> |
|---|
| 389 | | <xsl:with-param name="timeString" select="$startTime"/> |
|---|
| 390 | | </xsl:call-template> |
|---|
| 391 | | </strong> |
|---|
| 392 | | <xsl:if test="numBusy > 0"> |
|---|
| 393 | | <br/><xsl:value-of select="numBusy"/> busy |
|---|
| 394 | | </xsl:if> |
|---|
| 395 | | <xsl:if test="numTentative > 0"> |
|---|
| 396 | | <br/><xsl:value-of select="numTentative"/> tentative |
|---|
| 397 | | </xsl:if> |
|---|
| 398 | | <xsl:if test="numBusy = 0 and numTentative = 0"> |
|---|
| 399 | | <br/><em>all free</em> |
|---|
| 400 | | </xsl:if> |
|---|
| 401 | | </span> |
|---|
| 402 | | </a> |
|---|
| 403 | | </td> |
|---|
| 404 | | </xsl:for-each> |
|---|
| 405 | | </tr> |
|---|
| 406 | | </xsl:for-each> |
|---|
| 407 | | </table> |
|---|
| 408 | | |
|---|
| 409 | | <table id="freeBusyKey"> |
|---|
| 410 | | <tr> |
|---|
| 411 | | <td class="free">*</td> |
|---|
| 412 | | <td>free</td> |
|---|
| 413 | | <td> </td> |
|---|
| 414 | | <td class="busy">*</td> |
|---|
| 415 | | <td>busy</td> |
|---|
| 416 | | <td> </td> |
|---|
| 417 | | <td class="tentative">*</td> |
|---|
| 418 | | <td>tentative</td> |
|---|
| 419 | | </tr> |
|---|
| 420 | | </table> |
|---|
| 421 | | </xsl:template> |
|---|
| 422 | | |
|---|
| 423 | | |
|---|
| 424 | | |
|---|
| 425 | | |
|---|
| 426 | | |
|---|
| 427 | | |
|---|
| 428 | | |
|---|
| 429 | | |
|---|
| 430 | | |
|---|
| 431 | | |
|---|
| 432 | | <!-- time formatter (should be extended as needed) --> |
|---|
| 433 | | <xsl:template name="timeFormatter"> |
|---|
| 434 | | <xsl:param name="timeString"/><!-- required --> |
|---|
| 435 | | <xsl:param name="showMinutes">yes</xsl:param> |
|---|
| 436 | | <xsl:param name="showAmPm">yes</xsl:param> |
|---|
| 437 | | <xsl:param name="hour24">no</xsl:param> |
|---|
| 438 | | <xsl:variable name="hour" select="number(substring($timeString,1,2))"/> |
|---|
| 439 | | <xsl:variable name="minutes" select="substring($timeString,3,2)"/> |
|---|
| 440 | | <xsl:variable name="AmPm"> |
|---|
| 441 | | <xsl:choose> |
|---|
| 442 | | <xsl:when test="$hour < 12">AM</xsl:when> |
|---|
| 443 | | <xsl:otherwise>PM</xsl:otherwise> |
|---|
| 444 | | </xsl:choose> |
|---|
| 445 | | </xsl:variable> |
|---|
| 446 | | <xsl:choose> |
|---|
| 447 | | <xsl:when test="hour24 = 'yes'"> |
|---|
| 448 | | <xsl:value-of select="$hour"/><!-- |
|---|
| 449 | | --><xsl:if test="$showMinutes = 'yes'">:<xsl:value-of select="$minutes"/></xsl:if> |
|---|
| 450 | | </xsl:when> |
|---|
| 451 | | <xsl:otherwise> |
|---|
| 452 | | <xsl:choose> |
|---|
| 453 | | <xsl:when test="$hour = 0">12</xsl:when> |
|---|
| 454 | | <xsl:when test="$hour < 13"><xsl:value-of select="$hour"/></xsl:when> |
|---|
| 455 | | <xsl:otherwise><xsl:value-of select="$hour - 12"/></xsl:otherwise> |
|---|
| 456 | | </xsl:choose><!-- |
|---|
| 457 | | --><xsl:if test="$showMinutes = 'yes'">:<xsl:value-of select="$minutes"/></xsl:if> |
|---|
| 458 | | <xsl:if test="$showAmPm = 'yes'"> |
|---|
| 459 | | <xsl:text> </xsl:text> |
|---|
| 460 | | <xsl:value-of select="$AmPm"/> |
|---|
| 461 | | </xsl:if> |
|---|
| 462 | | </xsl:otherwise> |
|---|
| 463 | | </xsl:choose> |
|---|
| 464 | | </xsl:template> |
|---|
| 465 | | |
|---|
| 466 | | </xsl:stylesheet> |
|---|