| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 |
<xsl:stylesheet |
|---|
| 3 |
version="1.0" |
|---|
| 4 |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
|---|
| 5 |
xmlns="http://www.w3.org/1999/xhtml"> |
|---|
| 6 |
|
|---|
| 7 |
<xsl:output |
|---|
| 8 |
method="xml" |
|---|
| 9 |
indent="no" |
|---|
| 10 |
media-type="text/html" |
|---|
| 11 |
doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" |
|---|
| 12 |
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" |
|---|
| 13 |
standalone="yes" |
|---|
| 14 |
omit-xml-declaration="yes"/> |
|---|
| 15 |
|
|---|
| 16 |
<!-- ========================================================= |
|---|
| 17 |
|
|---|
| 18 |
|
|---|
| 19 |
|
|---|
| 20 |
=============================================================== --> |
|---|
| 21 |
<!-- ********************************************************************** |
|---|
| 22 |
Copyright 2006 Rensselaer Polytechnic Institute. All worldwide rights reserved. |
|---|
| 23 |
|
|---|
| 24 |
Redistribution and use of this distribution in source and binary forms, |
|---|
| 25 |
with or without modification, are permitted provided that: |
|---|
| 26 |
The above copyright notice and this permission notice appear in all |
|---|
| 27 |
copies and supporting documentation; |
|---|
| 28 |
|
|---|
| 29 |
The name, identifiers, and trademarks of Rensselaer Polytechnic |
|---|
| 30 |
Institute are not used in advertising or publicity without the |
|---|
| 31 |
express prior written permission of Rensselaer Polytechnic Institute; |
|---|
| 32 |
|
|---|
| 33 |
DISCLAIMER: The software is distributed" AS IS" without any express or |
|---|
| 34 |
implied warranty, including but not limited to, any implied warranties |
|---|
| 35 |
of merchantability or fitness for a particular purpose or any warrant)' |
|---|
| 36 |
of non-infringement of any current or pending patent rights. The authors |
|---|
| 37 |
of the software make no representations about the suitability of this |
|---|
| 38 |
software for any particular purpose. The entire risk as to the quality |
|---|
| 39 |
and performance of the software is with the user. Should the software |
|---|
| 40 |
prove defective, the user assumes the cost of all necessary servicing, |
|---|
| 41 |
repair or correction. In particular, neither Rensselaer Polytechnic |
|---|
| 42 |
Institute, nor the authors of the software are liable for any indirect, |
|---|
| 43 |
special, consequential, or incidental damages related to the software, |
|---|
| 44 |
to the maximum extent the law permits. --> |
|---|
| 45 |
|
|---|
| 46 |
<!-- ================================= --> |
|---|
| 47 |
<!-- DEMO PUBLIC CALENDAR STYLESHEET --> |
|---|
| 48 |
<!-- ================================= --> |
|---|
| 49 |
|
|---|
| 50 |
<!-- URL of resources common to all bedework apps (javascript, images) --> |
|---|
| 51 |
<xsl:variable name="resourceCommons">../../../bedework-common</xsl:variable> |
|---|
| 52 |
|
|---|
| 53 |
<!-- DEFINE INCLUDES --> |
|---|
| 54 |
<!-- cannot use the resourceCommons variable in xsl:include paths --> |
|---|
| 55 |
<xsl:include href="../../../bedework-common/default/default/errors.xsl"/> |
|---|
| 56 |
<xsl:include href="../../../bedework-common/default/default/messages.xsl"/> |
|---|
| 57 |
<xsl:include href="../../../bedework-common/default/default/util.xsl"/> |
|---|
| 58 |
<xsl:include href="./strings.xsl"/> |
|---|
| 59 |
|
|---|
| 60 |
<!-- DEFINE GLOBAL CONSTANTS --> |
|---|
| 61 |
|
|---|
| 62 |
<!-- URL of html resources (images, css, other html); by default this is |
|---|
| 63 |
set to the application root --> |
|---|
| 64 |
<xsl:variable name="resourcesRoot" select="/bedework/approot"/> |
|---|
| 65 |
|
|---|
| 66 |
<!-- URL of the XSL template directory --> |
|---|
| 67 |
<!-- The approot is an appropriate place to put |
|---|
| 68 |
included stylesheets and xml fragments. These are generally |
|---|
| 69 |
referenced relatively (like errors.xsl and messages.xsl above); |
|---|
| 70 |
this variable is here for your convenience if you choose to |
|---|
| 71 |
reference it explicitly. It is not used in this stylesheet, however, |
|---|
| 72 |
and can be safely removed if you so choose. --> |
|---|
| 73 |
<xsl:variable name="appRoot" select="/bedework/approot"/> |
|---|
| 74 |
|
|---|
| 75 |
<!-- Properly encoded prefixes to the application actions; use these to build |
|---|
| 76 |
urls; allows the application to be used without cookies or within a portal. |
|---|
| 77 |
These urls are rewritten in header.jsp and simply passed through for use |
|---|
| 78 |
here. Every url includes a query string (either ?b=de or a real query |
|---|
| 79 |
string) so that all links constructed in this stylesheet may begin the |
|---|
| 80 |
query string with an ampersand. --> |
|---|
| 81 |
<xsl:variable name="setup" select="/bedework/urlPrefixes/setup"/> |
|---|
| 82 |
<xsl:variable name="eventView" select="/bedework/urlPrefixes/event/eventView"/> |
|---|
| 83 |
<xsl:variable name="addEventRef" select="/bedework/urlPrefixes/event/addEventRef"/> |
|---|
| 84 |
<xsl:variable name="export" select="/bedework/urlPrefixes/misc/export"/> |
|---|
| 85 |
<xsl:variable name="mailEvent" select="/bedework/urlPrefixes/mail/mailEvent"/> |
|---|
| 86 |
|
|---|
| 87 |
<!-- URL of the web application - includes web context --> |
|---|
| 88 |
<xsl:variable name="urlPrefix" select="/bedework/urlprefix"/> |
|---|
| 89 |
|
|---|
| 90 |
<!-- Other generally useful global variables --> |
|---|
| 91 |
<xsl:variable name="privateCal">/ucal</xsl:variable> |
|---|
| 92 |
|
|---|
| 93 |
<!-- MAIN TEMPLATE --> |
|---|
| 94 |
<xsl:template match="/"> |
|---|
| 95 |
<html lang="en"> |
|---|
| 96 |
<head> |
|---|
| 97 |
<title><xsl:copy-of select="$bwStr-Root-PageTitle"/></title> |
|---|
| 98 |
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> |
|---|
| 99 |
<link rel="stylesheet" href="{$resourcesRoot}/default/default/blue.css"/> |
|---|
| 100 |
<link rel="stylesheet" href="../../../bedework-common/default/default/subColors.css"/> |
|---|
| 101 |
<link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> |
|---|
| 102 |
<!-- load javascript --> |
|---|
| 103 |
<xsl:if test="/bedework/page='event'"> |
|---|
| 104 |
<script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-1.3.2.min.js"> </script> |
|---|
| 105 |
<script type="text/javascript" src="/bedework-common/javascript/jquery/jquery-ui-1.7.1.custom.min.js"> </script> |
|---|
| 106 |
<link rel="stylesheet" href="/bedework-common/javascript/jquery/css/custom-theme/jquery-ui-1.7.1.custom.css"/> |
|---|
| 107 |
<link rel="stylesheet" href="/bedework-common/javascript/jquery/css/custom-theme/bedeworkJquery.css"/> |
|---|
| 108 |
<script type="text/javascript" src="{$resourcesRoot}/resources/javascript/bedework.js"> </script> |
|---|
| 109 |
</xsl:if> |
|---|
| 110 |
<!-- address bar icon --> |
|---|
| 111 |
<link rel="icon" type="image/ico" href="{$resourcesRoot}/images/bedework.ico" /> |
|---|
| 112 |
</head> |
|---|
| 113 |
<body> |
|---|
| 114 |
<xsl:if test="/bedework/error"> |
|---|
| 115 |
<div id="errors"> |
|---|
| 116 |
<xsl:apply-templates select="/bedework/error"/> |
|---|
| 117 |
</div> |
|---|
| 118 |
</xsl:if> |
|---|
| 119 |
<xsl:choose> |
|---|
| 120 |
<xsl:when test="/bedework/page='event'"> |
|---|
| 121 |
<!-- show an event --> |
|---|
| 122 |
<xsl:apply-templates select="/bedework/event"/> |
|---|
| 123 |
</xsl:when> |
|---|
| 124 |
<xsl:when test="/bedework/page='eventList'"> |
|---|
| 125 |
<!-- show a list of discrete events in a time period --> |
|---|
| 126 |
<xsl:apply-templates select="/bedework/events" mode="eventList"/> |
|---|
| 127 |
</xsl:when> |
|---|
| 128 |
</xsl:choose> |
|---|
| 129 |
</body> |
|---|
| 130 |
</html> |
|---|
| 131 |
</xsl:template> |
|---|
| 132 |
|
|---|
| 133 |
<!--==== SINGLE EVENT ====--> |
|---|
| 134 |
<xsl:template match="event"> |
|---|
| 135 |
<xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| 136 |
<xsl:variable name="guid" select="guid"/> |
|---|
| 137 |
<xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| 138 |
<xsl:variable name="statusClass"> |
|---|
| 139 |
<xsl:choose> |
|---|
| 140 |
<xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> |
|---|
| 141 |
<xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> |
|---|
| 142 |
<xsl:otherwise>bwStatusConfirmed</xsl:otherwise> |
|---|
| 143 |
</xsl:choose> |
|---|
| 144 |
</xsl:variable> |
|---|
| 145 |
<h2 class="{$statusClass}"> |
|---|
| 146 |
<a id="linkToEvent" href="javascript:showLink('{$urlPrefix}/event/eventView.do?calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}')" title="{$bwStr-SgEv-GenerateLinkToThisEvent}"> |
|---|
| 147 |
<xsl:copy-of select="$bwStr-SgEv-LinkToThisEvent"/> |
|---|
| 148 |
</a> |
|---|
| 149 |
<xsl:if test="status='CANCELLED'"><xsl:copy-of select="$bwStr-SgEv-Canceled"/><xsl:text> </xsl:text></xsl:if> |
|---|
| 150 |
<xsl:choose> |
|---|
| 151 |
<xsl:when test="link != ''"> |
|---|
| 152 |
<xsl:variable name="link" select="link"/> |
|---|
| 153 |
<a href="{$link}"> |
|---|
| 154 |
<xsl:value-of select="summary"/> |
|---|
| 155 |
</a> |
|---|
| 156 |
</xsl:when> |
|---|
| 157 |
<xsl:otherwise> |
|---|
| 158 |
<xsl:value-of select="summary"/> |
|---|
| 159 |
</xsl:otherwise> |
|---|
| 160 |
</xsl:choose> |
|---|
| 161 |
</h2> |
|---|
| 162 |
<table id="eventTable" cellpadding="0" cellspacing="0"> |
|---|
| 163 |
<tr> |
|---|
| 164 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-When"/></td> |
|---|
| 165 |
<td class="fieldval"> |
|---|
| 166 |
<!-- always display local time --> |
|---|
| 167 |
<xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> |
|---|
| 168 |
<xsl:if test="start/allday = 'false'"> |
|---|
| 169 |
<span class="time"><xsl:value-of select="start/time"/></span> |
|---|
| 170 |
</xsl:if> |
|---|
| 171 |
<xsl:if test="(end/longdate != start/longdate) or |
|---|
| 172 |
((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> |
|---|
| 173 |
<xsl:if test="end/longdate != start/longdate"> |
|---|
| 174 |
<xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> |
|---|
| 175 |
</xsl:if> |
|---|
| 176 |
<xsl:choose> |
|---|
| 177 |
<xsl:when test="start/allday = 'true'"> |
|---|
| 178 |
<span class="time"><em><xsl:copy-of select="$bwStr-SgEv-AllDay"/></em></span> |
|---|
| 179 |
</xsl:when> |
|---|
| 180 |
<xsl:when test="end/longdate != start/longdate"> |
|---|
| 181 |
<span class="time"><xsl:value-of select="end/time"/></span> |
|---|
| 182 |
</xsl:when> |
|---|
| 183 |
<xsl:when test="end/time != start/time"> |
|---|
| 184 |
<span class="time"><xsl:value-of select="end/time"/></span> |
|---|
| 185 |
</xsl:when> |
|---|
| 186 |
</xsl:choose> |
|---|
| 187 |
<!-- if timezones are not local, or if floating add labels: --> |
|---|
| 188 |
<xsl:if test="start/timezone/islocal = 'false' or end/timezone/islocal = 'false'"> |
|---|
| 189 |
<xsl:text> </xsl:text> |
|---|
| 190 |
-- |
|---|
| 191 |
<strong> |
|---|
| 192 |
<xsl:choose> |
|---|
| 193 |
<xsl:when test="start/floating = 'true'"> |
|---|
| 194 |
<xsl:copy-of select="$bwStr-SgEv-FloatingTime"/> |
|---|
| 195 |
</xsl:when> |
|---|
| 196 |
<xsl:otherwise> |
|---|
| 197 |
<xsl:copy-of select="$bwStr-SgEv-LocalTime"/> |
|---|
| 198 |
</xsl:otherwise> |
|---|
| 199 |
</xsl:choose> |
|---|
| 200 |
</strong> |
|---|
| 201 |
<br/> |
|---|
| 202 |
</xsl:if> |
|---|
| 203 |
<!-- display in timezone if not local or floating time) --> |
|---|
| 204 |
<xsl:if test="(start/timezone/islocal = 'false' or end/timezone/islocal = 'false') and start/floating = 'false'"> |
|---|
| 205 |
<xsl:choose> |
|---|
| 206 |
<xsl:when test="start/timezone/id != end/timezone/id"> |
|---|
| 207 |
<!-- need to display both timezones if they differ from start to end --> |
|---|
| 208 |
<table border="0" cellspacing="0" id="tztable"> |
|---|
| 209 |
<tr> |
|---|
| 210 |
<td> |
|---|
| 211 |
<strong><xsl:copy-of select="$bwStr-SgEv-Start"/></strong> |
|---|
| 212 |
</td> |
|---|
| 213 |
<td> |
|---|
| 214 |
<xsl:choose> |
|---|
| 215 |
<xsl:when test="start/timezone/islocal='true'"> |
|---|
| 216 |
<xsl:value-of select="start/dayname"/>, |
|---|
| 217 |
<xsl:value-of select="start/longdate"/> |
|---|
| 218 |
<xsl:text> </xsl:text> |
|---|
| 219 |
<span class="time"><xsl:value-of select="start/time"/></span> |
|---|
| 220 |
</xsl:when> |
|---|
| 221 |
<xsl:otherwise> |
|---|
| 222 |
<xsl:value-of select="start/timezone/dayname"/>, |
|---|
| 223 |
<xsl:value-of select="start/timezone/longdate"/> |
|---|
| 224 |
<xsl:text> </xsl:text> |
|---|
| 225 |
<span class="time"><xsl:value-of select="start/timezone/time"/></span> |
|---|
| 226 |
</xsl:otherwise> |
|---|
| 227 |
</xsl:choose> |
|---|
| 228 |
</td> |
|---|
| 229 |
<td> |
|---|
| 230 |
-- |
|---|
| 231 |
<strong><xsl:value-of select="start/timezone/id"/></strong> |
|---|
| 232 |
</td> |
|---|
| 233 |
</tr> |
|---|
| 234 |
<tr> |
|---|
| 235 |
<td> |
|---|
| 236 |
<strong><xsl:copy-of select="$bwStr-SgEv-End"/></strong> |
|---|
| 237 |
</td> |
|---|
| 238 |
<td> |
|---|
| 239 |
<xsl:choose> |
|---|
| 240 |
<xsl:when test="end/timezone/islocal='true'"> |
|---|
| 241 |
<xsl:value-of select="end/dayname"/>, |
|---|
| 242 |
<xsl:value-of select="end/longdate"/> |
|---|
| 243 |
<xsl:text> </xsl:text> |
|---|
| 244 |
<span class="time"><xsl:value-of select="end/time"/></span> |
|---|
| 245 |
</xsl:when> |
|---|
| 246 |
<xsl:otherwise> |
|---|
| 247 |
<xsl:value-of select="end/timezone/dayname"/>, |
|---|
| 248 |
<xsl:value-of select="end/timezone/longdate"/> |
|---|
| 249 |
<xsl:text> </xsl:text> |
|---|
| 250 |
<span class="time"><xsl:value-of select="end/timezone/time"/></span> |
|---|
| 251 |
</xsl:otherwise> |
|---|
| 252 |
</xsl:choose> |
|---|
| 253 |
</td> |
|---|
| 254 |
<td> |
|---|
| 255 |
-- |
|---|
| 256 |
<strong><xsl:value-of select="end/timezone/id"/></strong> |
|---|
| 257 |
</td> |
|---|
| 258 |
</tr> |
|---|
| 259 |
</table> |
|---|
| 260 |
</xsl:when> |
|---|
| 261 |
<xsl:otherwise> |
|---|
| 262 |
<!-- otherwise, timezones are the same: display as a single line --> |
|---|
| 263 |
<xsl:value-of select="start/timezone/dayname"/>, <xsl:value-of select="start/timezone/longdate"/><xsl:text> </xsl:text> |
|---|
| 264 |
<xsl:if test="start/allday = 'false'"> |
|---|
| 265 |
<span class="time"><xsl:value-of select="start/timezone/time"/></span> |
|---|
| 266 |
</xsl:if> |
|---|
| 267 |
<xsl:if test="(end/timezone/longdate != start/timezone/longdate) or |
|---|
| 268 |
((end/timezone/longdate = start/timezone/longdate) and (end/timezone/time != start/timezone/time))"> - </xsl:if> |
|---|
| 269 |
<xsl:if test="end/timezone/longdate != start/timezone/longdate"> |
|---|
| 270 |
<xsl:value-of select="substring(end/timezone/dayname,1,3)"/>, <xsl:value-of select="end/timezone/longdate"/><xsl:text> </xsl:text> |
|---|
| 271 |
</xsl:if> |
|---|
| 272 |
<xsl:choose> |
|---|
| 273 |
<xsl:when test="start/allday = 'true'"> |
|---|
| 274 |
<span class="time"><em> <xsl:copy-of select="$bwStr-SgEv-AllDay"/></em></span> |
|---|
| 275 |
</xsl:when> |
|---|
| 276 |
<xsl:when test="end/timezone/longdate != start/timezone/longdate"> |
|---|
| 277 |
<span class="time"><xsl:value-of select="end/timezone/time"/></span> |
|---|
| 278 |
</xsl:when> |
|---|
| 279 |
<xsl:when test="end/timezone/time != start/timezone/time"> |
|---|
| 280 |
<span class="time"><xsl:value-of select="end/timezone/time"/></span> |
|---|
| 281 |
</xsl:when> |
|---|
| 282 |
</xsl:choose> |
|---|
| 283 |
<xsl:text> </xsl:text> |
|---|
| 284 |
-- |
|---|
| 285 |
<strong><xsl:value-of select="start/timezone/id"/></strong> |
|---|
| 286 |
</xsl:otherwise> |
|---|
| 287 |
</xsl:choose> |
|---|
| 288 |
</xsl:if> |
|---|
| 289 |
</td> |
|---|
| 290 |
<th class="icalIcon" rowspan="2"> |
|---|
| 291 |
<div id="eventIcons"> |
|---|
| 292 |
<a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="{$bwStr-SgEv-AddEventToMyCalendar}" target="myCalendar"> |
|---|
| 293 |
<img class="addref" src="{$resourcesRoot}/images/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/> |
|---|
| 294 |
<xsl:copy-of select="$bwStr-SgEv-AddToMyCalendar"/> |
|---|
| 295 |
</a> |
|---|
| 296 |
<xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> |
|---|
| 297 |
<a href="{$export}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&contentName={$eventIcalName}" title="{$bwStr-SgEv-DownloadEvent}"> |
|---|
| 298 |
<img src="{$resourcesRoot}/images/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/> |
|---|
| 299 |
<xsl:copy-of select="$bwStr-SgEv-Download"/></a> |
|---|
| 300 |
</div> |
|---|
| 301 |
</th> |
|---|
| 302 |
</tr> |
|---|
| 303 |
<tr> |
|---|
| 304 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Where"/></td> |
|---|
| 305 |
<td class="fieldval"> |
|---|
| 306 |
<xsl:choose> |
|---|
| 307 |
<xsl:when test="location/link=''"> |
|---|
| 308 |
<xsl:value-of select="location/address"/> |
|---|
| 309 |
</xsl:when> |
|---|
| 310 |
<xsl:otherwise> |
|---|
| 311 |
<xsl:variable name="locationLink" select="location/link"/> |
|---|
| 312 |
<a href="{$locationLink}"> |
|---|
| 313 |
<xsl:value-of select="location/address"/> |
|---|
| 314 |
</a> |
|---|
| 315 |
</xsl:otherwise> |
|---|
| 316 |
</xsl:choose> |
|---|
| 317 |
<xsl:if test="location/subaddress!=''"> |
|---|
| 318 |
<br/><xsl:value-of select="location/subaddress"/> |
|---|
| 319 |
</xsl:if> |
|---|
| 320 |
</td> |
|---|
| 321 |
</tr> |
|---|
| 322 |
<tr> |
|---|
| 323 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Description"/></td> |
|---|
| 324 |
<td colspan="2" class="fieldval description"> |
|---|
| 325 |
<xsl:if test="xproperties/node()[name()='X-BEDEWORK-IMAGE']"> |
|---|
| 326 |
<xsl:variable name="bwImage"><xsl:value-of select="xproperties/node()[name()='X-BEDEWORK-IMAGE']/values/text"/></xsl:variable> |
|---|
| 327 |
<img src="{$bwImage}" class="bwEventImage"/> |
|---|
| 328 |
</xsl:if> |
|---|
| 329 |
<xsl:call-template name="replace"> |
|---|
| 330 |
<xsl:with-param name="string" select="description"/> |
|---|
| 331 |
<xsl:with-param name="pattern" select="'
'"/> |
|---|
| 332 |
<xsl:with-param name="replacement"><br/></xsl:with-param> |
|---|
| 333 |
</xsl:call-template> |
|---|
| 334 |
</td> |
|---|
| 335 |
</tr> |
|---|
| 336 |
<xsl:if test="status !='' and status != 'CONFIRMED'"> |
|---|
| 337 |
<tr> |
|---|
| 338 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-STATUS"/></td> |
|---|
| 339 |
<td class="fieldval"> |
|---|
| 340 |
<xsl:value-of select="status"/> |
|---|
| 341 |
</td> |
|---|
| 342 |
</tr> |
|---|
| 343 |
</xsl:if> |
|---|
| 344 |
<xsl:if test="cost!=''"> |
|---|
| 345 |
<tr> |
|---|
| 346 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Cost"/></td> |
|---|
| 347 |
<td colspan="2" class="fieldval"><xsl:value-of select="cost"/></td> |
|---|
| 348 |
</tr> |
|---|
| 349 |
</xsl:if> |
|---|
| 350 |
<xsl:if test="link != ''"> |
|---|
| 351 |
<tr> |
|---|
| 352 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-See"/></td> |
|---|
| 353 |
<td colspan="2" class="fieldval"> |
|---|
| 354 |
<xsl:variable name="link" select="link"/> |
|---|
| 355 |
<a href="{$link}"><xsl:value-of select="link"/></a> |
|---|
| 356 |
</td> |
|---|
| 357 |
</tr> |
|---|
| 358 |
</xsl:if> |
|---|
| 359 |
<xsl:if test="contact/name!='none'"> |
|---|
| 360 |
<tr> |
|---|
| 361 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Contact"/></td> |
|---|
| 362 |
<td colspan="2" class="fieldval"> |
|---|
| 363 |
<xsl:choose> |
|---|
| 364 |
<xsl:when test="contact/link=''"> |
|---|
| 365 |
<xsl:value-of select="contact/name"/> |
|---|
| 366 |
</xsl:when> |
|---|
| 367 |
<xsl:otherwise> |
|---|
| 368 |
<xsl:variable name="sponsorLink" select="contact/link"/> |
|---|
| 369 |
<a href="{$sponsorLink}"> |
|---|
| 370 |
<xsl:value-of select="contact/name"/> |
|---|
| 371 |
</a> |
|---|
| 372 |
</xsl:otherwise> |
|---|
| 373 |
</xsl:choose> |
|---|
| 374 |
<xsl:if test="contact/phone!=''"> |
|---|
| 375 |
<br /><xsl:value-of select="contact/phone"/> |
|---|
| 376 |
</xsl:if> |
|---|
| 377 |
<!-- If you want to display email addresses, uncomment the |
|---|
| 378 |
following 8 lines. --> |
|---|
| 379 |
<!-- <xsl:if test="contact/email!=''"> |
|---|
| 380 |
<br /> |
|---|
| 381 |
<xsl:variable name="email" select="contact/email"/> |
|---|
| 382 |
<xsl:variable name="subject" select="summary"/> |
|---|
| 383 |
<a href="mailto:{$email}&subject={$subject}"> |
|---|
| 384 |
<xsl:value-of select="contact/email"/> |
|---|
| 385 |
</a> |
|---|
| 386 |
</xsl:if> --> |
|---|
| 387 |
</td> |
|---|
| 388 |
</tr> |
|---|
| 389 |
</xsl:if> |
|---|
| 390 |
<xsl:if test="comments/comment"> |
|---|
| 391 |
<tr> |
|---|
| 392 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Comments"/></td> |
|---|
| 393 |
<td class="fieldval comments"> |
|---|
| 394 |
<xsl:for-each select="comments/comment"> |
|---|
| 395 |
<p><xsl:value-of select="value"/></p> |
|---|
| 396 |
</xsl:for-each> |
|---|
| 397 |
</td> |
|---|
| 398 |
</tr> |
|---|
| 399 |
</xsl:if> |
|---|
| 400 |
<xsl:if test="xproperties/X-BEDEWORK-ALIAS"> |
|---|
| 401 |
<tr> |
|---|
| 402 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-TopicalArea"/></td> |
|---|
| 403 |
<td class="fieldval"> |
|---|
| 404 |
<xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> |
|---|
| 405 |
<xsl:variable name="calUrl" select="values/text"/> |
|---|
| 406 |
<xsl:call-template name="substring-afterLastInstanceOf"> |
|---|
| 407 |
<xsl:with-param name="string" select="values/text"/> |
|---|
| 408 |
<xsl:with-param name="char">/</xsl:with-param> |
|---|
| 409 |
</xsl:call-template> |
|---|
| 410 |
<xsl:if test="position()!=last()">, </xsl:if> |
|---|
| 411 |
</xsl:for-each> |
|---|
| 412 |
</td> |
|---|
| 413 |
</tr> |
|---|
| 414 |
</xsl:if> |
|---|
| 415 |
<xsl:if test="categories/category"> |
|---|
| 416 |
<tr> |
|---|
| 417 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Categories"/></td> |
|---|
| 418 |
<td class="fieldval"> |
|---|
| 419 |
<xsl:for-each select="categories/category"> |
|---|
| 420 |
<xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if> |
|---|
| 421 |
</xsl:for-each> |
|---|
| 422 |
</td> |
|---|
| 423 |
</tr> |
|---|
| 424 |
</xsl:if> |
|---|
| 425 |
<!-- xsl:if test="calendar/path!=''"> |
|---|
| 426 |
<tr> |
|---|
| 427 |
<td class="fieldname">Calendar:</td> |
|---|
| 428 |
<td class="fieldval"> |
|---|
| 429 |
<xsl:variable name="calUrl" select="calendar/encodedPath"/> |
|---|
| 430 |
<a href="{$setSelection}&calUrl={$calUrl}"> |
|---|
| 431 |
<xsl:value-of select="calendar/name"/> |
|---|
| 432 |
</a> |
|---|
| 433 |
</td> |
|---|
| 434 |
</tr> |
|---|
| 435 |
</xsl:if--> |
|---|
| 436 |
</table> |
|---|
| 437 |
</xsl:template> |
|---|
| 438 |
|
|---|
| 439 |
<!--==== LIST EVENTS - for listing discrete events ====--> |
|---|
| 440 |
<xsl:template match="events" mode="eventList"> |
|---|
| 441 |
<div id="listEvents"> |
|---|
| 442 |
<ul> |
|---|
| 443 |
<xsl:choose> |
|---|
| 444 |
<xsl:when test="not(event)"> |
|---|
| 445 |
<li><xsl:copy-of select="$bwStr-LsEv-NoEventsToDisplay"/></li> |
|---|
| 446 |
</xsl:when> |
|---|
| 447 |
<xsl:otherwise> |
|---|
| 448 |
<xsl:for-each select="event"> |
|---|
| 449 |
<xsl:variable name="id" select="id"/> |
|---|
| 450 |
<xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| 451 |
<xsl:variable name="guid" select="guid"/> |
|---|
| 452 |
<xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| 453 |
<li> |
|---|
| 454 |
<xsl:attribute name="class"> |
|---|
| 455 |
<xsl:choose> |
|---|
| 456 |
<xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> |
|---|
| 457 |
<xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> |
|---|
| 458 |
</xsl:choose> |
|---|
| 459 |
</xsl:attribute> |
|---|
| 460 |
|
|---|
| 461 |
<xsl:if test="status='CANCELLED'"><strong><xsl:copy-of select="$bwStr-LsEv-Canceled"/><xsl:text> </xsl:text></strong></xsl:if> |
|---|
| 462 |
<xsl:if test="status='TENTATIVE'"><em><xsl:copy-of select="$bwStr-LsEv-Tentative"/><xsl:text> </xsl:text></em></xsl:if> |
|---|
| 463 |
|
|---|
| 464 |
<a class="title" href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| 465 |
<xsl:value-of select="summary"/> |
|---|
| 466 |
</a><xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> |
|---|
| 467 |
<xsl:if test="/bedework/appvar[key='listEventsSummaryMode']/value='details'"> |
|---|
| 468 |
<xsl:if test="location/subaddress != ''"> |
|---|
| 469 |
, <xsl:value-of select="location/subaddress"/> |
|---|
| 470 |
</xsl:if> |
|---|
| 471 |
</xsl:if> |
|---|
| 472 |
|
|---|
| 473 |
<xsl:text> </xsl:text> |
|---|
| 474 |
<a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="{$bwStr-LsVw-AddEventToMyCalendar}" target="myCalendar"> |
|---|
| 475 |
<img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="{$bwStr-LsVw-AddEventToMyCalendar}"/> |
|---|
| 476 |
</a> |
|---|
| 477 |
<xsl:text> </xsl:text> |
|---|
| 478 |
<xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> |
|---|
| 479 |
<a href="{$export}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&contentName={$eventIcalName}" title="{$bwStr-LsEv-DownloadEvent}"> |
|---|
| 480 |
<img src="{$resourcesRoot}/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="{$bwStr-LsEv-DownloadEvent}"/> |
|---|
| 481 |
</a> |
|---|
| 482 |
|
|---|
| 483 |
<br/> |
|---|
| 484 |
|
|---|
| 485 |
<xsl:value-of select="substring(start/dayname,1,3)"/>, |
|---|
| 486 |
<xsl:value-of select="start/longdate"/> |
|---|
| 487 |
<xsl:text> </xsl:text> |
|---|
| 488 |
<xsl:if test="start/allday != 'true'"> |
|---|
| 489 |
<xsl:value-of select="start/time"/> |
|---|
| 490 |
</xsl:if> |
|---|
| 491 |
<xsl:choose> |
|---|
| 492 |
<xsl:when test="start/shortdate != end/shortdate"> |
|---|
| 493 |
- |
|---|
| 494 |
<xsl:value-of select="substring(end/dayname,1,3)"/>, |
|---|
| 495 |
<xsl:value-of select="end/longdate"/> |
|---|
| 496 |
<xsl:text> </xsl:text> |
|---|
| 497 |
<xsl:if test="start/allday != 'true'"> |
|---|
| 498 |
<xsl:value-of select="end/time"/> |
|---|
| 499 |
</xsl:if> |
|---|
| 500 |
</xsl:when> |
|---|
| 501 |
<xsl:otherwise> |
|---|
| 502 |
<xsl:if test="start/time != end/time"> |
|---|
| 503 |
- |
|---|
| 504 |
<xsl:value-of select="end/time"/> |
|---|
| 505 |
</xsl:if> |
|---|
| 506 |
</xsl:otherwise> |
|---|
| 507 |
</xsl:choose> |
|---|
| 508 |
|
|---|
| 509 |
<xsl:if test="/bedework/appvar[key='listEventsSummaryMode']/value='details'"> |
|---|
| 510 |
<br/> |
|---|
| 511 |
<xsl:value-of select="description"/> |
|---|
| 512 |
<xsl:if test="link != ''"> |
|---|
| 513 |
<br/> |
|---|
| 514 |
<xsl:variable name="link" select="link"/> |
|---|
| 515 |
<a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> |
|---|
| 516 |
</xsl:if> |
|---|
| 517 |
<xsl:if test="categories/category"> |
|---|
| 518 |
<br/> |
|---|
| 519 |
<xsl:copy-of select="$bwStr-LsEv-Categories"/> |
|---|
| 520 |
<xsl:for-each select="categories/category"> |
|---|
| 521 |
<xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if> |
|---|
| 522 |
</xsl:for-each> |
|---|
| 523 |
</xsl:if> |
|---|
| 524 |
<br/> |
|---|
| 525 |
<em> |
|---|
| 526 |
<xsl:if test="cost!=''"> |
|---|
| 527 |
<xsl:value-of select="cost"/>.  |
|---|
| 528 |
</xsl:if> |
|---|
| 529 |
<xsl:if test="contact/name!='none'"> |
|---|
| 530 |
<xsl:copy-of select="$bwStr-LsEv-Contact"/><xsl:text> </xsl:text><xsl:value-of select="contact/name"/> |
|---|
| 531 |
</xsl:if> |
|---|
| 532 |
</em> |
|---|
| 533 |
</xsl:if> |
|---|
| 534 |
|
|---|
| 535 |
</li> |
|---|
| 536 |
</xsl:for-each> |
|---|
| 537 |
</xsl:otherwise> |
|---|
| 538 |
</xsl:choose> |
|---|
| 539 |
</ul> |
|---|
| 540 |
</div> |
|---|
| 541 |
</xsl:template> |
|---|
| 542 |
|
|---|
| 543 |
<xsl:template name="buildListEventsDaysOptions"> |
|---|
| 544 |
<xsl:param name="i">1</xsl:param> |
|---|
| 545 |
<xsl:param name="total">31</xsl:param> |
|---|
| 546 |
<xsl:param name="default">7</xsl:param> |
|---|
| 547 |
<xsl:variable name="selected"><xsl:value-of select="/bedework/appvar[key='listEventsDays']/value"/></xsl:variable> |
|---|
| 548 |
|
|---|
| 549 |
<option onclick="this.form.setappvar.value='listEventsDay({$i})'"> |
|---|
| 550 |
<xsl:attribute name="value"><xsl:value-of select="$i"/></xsl:attribute> |
|---|
| 551 |
<xsl:if test="($selected != '' and $i = $selected) or ($selected = '' and $i = $default)"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> |
|---|
| 552 |
<xsl:value-of select="$i"/> |
|---|
| 553 |
</option> |
|---|
| 554 |
|
|---|
| 555 |
<xsl:if test="$i < $total"> |
|---|
| 556 |
<xsl:call-template name="buildListEventsDaysOptions"> |
|---|
| 557 |
<xsl:with-param name="i"><xsl:value-of select="$i + 1"/></xsl:with-param> |
|---|
| 558 |
<xsl:with-param name="total"><xsl:value-of select="$total"/></xsl:with-param> |
|---|
| 559 |
<xsl:with-param name="default"><xsl:value-of select="$default"/></xsl:with-param> |
|---|
| 560 |
</xsl:call-template> |
|---|
| 561 |
</xsl:if> |
|---|
| 562 |
|
|---|
| 563 |
</xsl:template> |
|---|
| 564 |
|
|---|
| 565 |
</xsl:stylesheet> |
|---|