| 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 |
<!-- ********************************************************************** |
|---|
| 8 |
Copyright 2009 Rensselaer Polytechnic Institute. All worldwide rights reserved. |
|---|
| 9 |
|
|---|
| 10 |
Redistribution and use of this distribution in source and binary forms, |
|---|
| 11 |
with or without modification, are permitted provided that: |
|---|
| 12 |
The above copyright notice and this permission notice appear in all |
|---|
| 13 |
copies and supporting documentation; |
|---|
| 14 |
|
|---|
| 15 |
The name, identifiers, and trademarks of Rensselaer Polytechnic |
|---|
| 16 |
Institute are not used in advertising or publicity without the |
|---|
| 17 |
express prior written permission of Rensselaer Polytechnic Institute; |
|---|
| 18 |
|
|---|
| 19 |
DISCLAIMER: The software is distributed" AS IS" without any express or |
|---|
| 20 |
implied warranty, including but not limited to, any implied warranties |
|---|
| 21 |
of merchantability or fitness for a particular purpose or any warrant)' |
|---|
| 22 |
of non-infringement of any current or pending patent rights. The authors |
|---|
| 23 |
of the software make no representations about the suitability of this |
|---|
| 24 |
software for any particular purpose. The entire risk as to the quality |
|---|
| 25 |
and performance of the software is with the user. Should the software |
|---|
| 26 |
prove defective, the user assumes the cost of all necessary servicing, |
|---|
| 27 |
repair or correction. In particular, neither Rensselaer Polytechnic |
|---|
| 28 |
Institute, nor the authors of the software are liable for any indirect, |
|---|
| 29 |
special, consequential, or incidental damages related to the software, |
|---|
| 30 |
to the maximum extent the law permits. --> |
|---|
| 31 |
|
|---|
| 32 |
<!-- URL of resources common to all bedework apps (javascript, images) --> |
|---|
| 33 |
<xsl:variable name="resourceCommons">../../../bedework-common</xsl:variable> |
|---|
| 34 |
|
|---|
| 35 |
<!-- DEFINE INCLUDES --> |
|---|
| 36 |
<!-- cannot use the resourceCommons variable in xsl:include paths --> |
|---|
| 37 |
<xsl:include href="../../../bedework-common/default/default/errors.xsl"/> |
|---|
| 38 |
<xsl:include href="../../../bedework-common/default/default/messages.xsl"/> |
|---|
| 39 |
<xsl:include href="../../../bedework-common/default/default/util.xsl"/> |
|---|
| 40 |
<xsl:include href="./config.xsl"/> |
|---|
| 41 |
<xsl:include href="./strings.xsl"/> |
|---|
| 42 |
|
|---|
| 43 |
<!-- DEFINE GLOBAL CONSTANTS --> |
|---|
| 44 |
|
|---|
| 45 |
<!-- URL of html resources (images, css, other html); by default this is |
|---|
| 46 |
set to the application root --> |
|---|
| 47 |
<xsl:variable name="resourcesRoot" select="/bedework/approot"/> |
|---|
| 48 |
|
|---|
| 49 |
<!-- URL of the XSL template directory --> |
|---|
| 50 |
<!-- The approot is an appropriate place to put |
|---|
| 51 |
included stylesheets and xml fragments. These are generally |
|---|
| 52 |
referenced relatively (like errors.xsl and messages.xsl above); |
|---|
| 53 |
this variable is here for your convenience if you choose to |
|---|
| 54 |
reference it explicitly. It is not used in this stylesheet, however, |
|---|
| 55 |
and can be safely removed if you so choose. --> |
|---|
| 56 |
<xsl:variable name="appRoot" select="/bedework/approot"/> |
|---|
| 57 |
|
|---|
| 58 |
<!-- Properly encoded prefixes to the application actions; use these to build |
|---|
| 59 |
urls; allows the application to be used without cookies or within a portal. |
|---|
| 60 |
These urls are rewritten in header.jsp and simply passed through for use |
|---|
| 61 |
here. Every url includes a query string (either ?b=de or a real query |
|---|
| 62 |
string) so that all links constructed in this stylesheet may begin the |
|---|
| 63 |
query string with an ampersand. --> |
|---|
| 64 |
<xsl:variable name="setup" select="/bedework/urlPrefixes/setup"/> |
|---|
| 65 |
<xsl:variable name="setSelection" select="/bedework/urlPrefixes/main/setSelection"/> |
|---|
| 66 |
<xsl:variable name="fetchPublicCalendars" select="/bedework/urlPrefixes/calendar/fetchPublicCalendars"/> |
|---|
| 67 |
<xsl:variable name="setViewPeriod" select="/bedework/urlPrefixes/main/setViewPeriod"/> |
|---|
| 68 |
<xsl:variable name="listEvents" select="/bedework/urlPrefixes/main/listEvents"/> |
|---|
| 69 |
<xsl:variable name="eventView" select="/bedework/urlPrefixes/event/eventView"/> |
|---|
| 70 |
<xsl:variable name="addEventRef" select="/bedework/urlPrefixes/event/addEventRef"/> |
|---|
| 71 |
<xsl:variable name="export" select="/bedework/urlPrefixes/misc/export"/> |
|---|
| 72 |
<xsl:variable name="search" select="/bedework/urlPrefixes/search/search"/> |
|---|
| 73 |
<xsl:variable name="search-next" select="/bedework/urlPrefixes/search/next"/> |
|---|
| 74 |
<xsl:variable name="calendar-fetchForExport" select="/bedework/urlPrefixes/calendar/fetchForExport"/> |
|---|
| 75 |
<xsl:variable name="mailEvent" select="/bedework/urlPrefixes/mail/mailEvent"/> |
|---|
| 76 |
|
|---|
| 77 |
<xsl:variable name="stats" select="/bedework/urlPrefixes/stats/stats"/> |
|---|
| 78 |
|
|---|
| 79 |
<!-- URL of the web application - includes web context --> |
|---|
| 80 |
<xsl:variable name="urlPrefix" select="/bedework/urlprefix"/> |
|---|
| 81 |
|
|---|
| 82 |
<!-- Other generally useful global variables --> |
|---|
| 83 |
<xsl:variable name="privateCal">/ucal</xsl:variable> |
|---|
| 84 |
<xsl:variable name="prevdate" select="/bedework/previousdate"/> |
|---|
| 85 |
<xsl:variable name="nextdate" select="/bedework/nextdate"/> |
|---|
| 86 |
<xsl:variable name="curdate" select="/bedework/currentdate/date"/> |
|---|
| 87 |
|
|---|
| 88 |
|
|---|
| 89 |
<!-- MAIN TEMPLATE --> |
|---|
| 90 |
<xsl:template match="/"> |
|---|
| 91 |
<html lang="en"> |
|---|
| 92 |
<head> |
|---|
| 93 |
<title><xsl:copy-of select="$bwStr-Root-PageTitle"/></title> |
|---|
| 94 |
<meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> |
|---|
| 95 |
<!-- load css --> |
|---|
| 96 |
<link rel="stylesheet" href="{$resourcesRoot}/default/default/blue.css"/> |
|---|
| 97 |
<link rel="stylesheet" href="../../../bedework-common/default/default/subColors.css"/> |
|---|
| 98 |
<link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> |
|---|
| 99 |
<!-- load javascript --> |
|---|
| 100 |
<xsl:if test="/bedework/page='event' or /bedework/page='displayCalendarForExport'"> |
|---|
| 101 |
<script type="text/javascript" src="../../../bedework-common/javascript/jquery/jquery-1.3.2.min.js"> </script> |
|---|
| 102 |
<script type="text/javascript" src="../../../bedework-common/javascript/jquery/jquery-ui-1.7.1.custom.min.js"> </script> |
|---|
| 103 |
<link rel="stylesheet" href="../../../bedework-common/javascript/jquery/css/custom-theme/jquery-ui-1.7.1.custom.css"/> |
|---|
| 104 |
<link rel="stylesheet" href="../../../bedework-common/javascript/jquery/css/custom-theme/bedeworkJquery.css"/> |
|---|
| 105 |
<script type="text/javascript" src="{$resourcesRoot}/resources/javascript/bedework.js"> </script> |
|---|
| 106 |
<xsl:if test="/bedework/page='displayCalendarForExport'"> |
|---|
| 107 |
<script type="text/javascript"> |
|---|
| 108 |
<xsl:comment> |
|---|
| 109 |
$.datepicker.setDefaults({ |
|---|
| 110 |
constrainInput: true, |
|---|
| 111 |
dateFormat: "yy-mm-dd", |
|---|
| 112 |
showOn: "both", |
|---|
| 113 |
buttonImage: "<xsl:value-of select='$resourcesRoot'/>/images/calIcon.gif", |
|---|
| 114 |
buttonImageOnly: true, |
|---|
| 115 |
gotoCurrent: true, |
|---|
| 116 |
duration: "" |
|---|
| 117 |
}); |
|---|
| 118 |
$(document).ready(function() { |
|---|
| 119 |
$("#bwExportCalendarWidgetStartDate").datepicker({ |
|---|
| 120 |
}).attr("readonly", "readonly"); |
|---|
| 121 |
$("#bwExportCalendarWidgetEndDate").datepicker({ |
|---|
| 122 |
}).attr("readonly", "readonly"); |
|---|
| 123 |
}); |
|---|
| 124 |
</xsl:comment> |
|---|
| 125 |
</script> |
|---|
| 126 |
</xsl:if> |
|---|
| 127 |
</xsl:if> |
|---|
| 128 |
<!-- address bar icon --> |
|---|
| 129 |
<link rel="icon" type="image/ico" href="{$resourcesRoot}/images/bedework.ico" /> |
|---|
| 130 |
</head> |
|---|
| 131 |
<body> |
|---|
| 132 |
<xsl:if test="/bedework/error"> |
|---|
| 133 |
<div id="errors"> |
|---|
| 134 |
<xsl:apply-templates select="/bedework/error"/> |
|---|
| 135 |
</div> |
|---|
| 136 |
</xsl:if> |
|---|
| 137 |
<xsl:choose> |
|---|
| 138 |
<xsl:when test="/bedework/periodname='Day'"> |
|---|
| 139 |
<xsl:call-template name="listView"/> |
|---|
| 140 |
</xsl:when> |
|---|
| 141 |
<xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> |
|---|
| 142 |
<xsl:choose> |
|---|
| 143 |
<xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> |
|---|
| 144 |
<xsl:call-template name="listView"/> |
|---|
| 145 |
</xsl:when> |
|---|
| 146 |
<xsl:otherwise> |
|---|
| 147 |
<xsl:call-template name="weekView"/> |
|---|
| 148 |
</xsl:otherwise> |
|---|
| 149 |
</xsl:choose> |
|---|
| 150 |
</xsl:when> |
|---|
| 151 |
<xsl:when test="/bedework/periodname='Month'"> |
|---|
| 152 |
<xsl:choose> |
|---|
| 153 |
<xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> |
|---|
| 154 |
<xsl:call-template name="listView"/> |
|---|
| 155 |
</xsl:when> |
|---|
| 156 |
<xsl:otherwise> |
|---|
| 157 |
<xsl:call-template name="monthView"/> |
|---|
| 158 |
</xsl:otherwise> |
|---|
| 159 |
</xsl:choose> |
|---|
| 160 |
</xsl:when> |
|---|
| 161 |
<xsl:otherwise> |
|---|
| 162 |
<xsl:call-template name="yearView"/> |
|---|
| 163 |
</xsl:otherwise> |
|---|
| 164 |
</xsl:choose> |
|---|
| 165 |
</body> |
|---|
| 166 |
</html> |
|---|
| 167 |
</xsl:template> |
|---|
| 168 |
|
|---|
| 169 |
<!--==== SINGLE EVENT ====--> |
|---|
| 170 |
<xsl:template match="event"> |
|---|
| 171 |
<xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| 172 |
<xsl:variable name="guid" select="guid"/> |
|---|
| 173 |
<xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| 174 |
<xsl:variable name="statusClass"> |
|---|
| 175 |
<xsl:choose> |
|---|
| 176 |
<xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> |
|---|
| 177 |
<xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> |
|---|
| 178 |
<xsl:otherwise>bwStatusConfirmed</xsl:otherwise> |
|---|
| 179 |
</xsl:choose> |
|---|
| 180 |
</xsl:variable> |
|---|
| 181 |
<h2 class="{$statusClass}"> |
|---|
| 182 |
<a id="linkToEvent" href="javascript:showLink('{$urlPrefix}/event/eventView.do?calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}')" title="{$bwStr-SgEv-GenerateLinkToThisEvent}"> |
|---|
| 183 |
<xsl:copy-of select="$bwStr-SgEv-LinkToThisEvent"/> |
|---|
| 184 |
</a> |
|---|
| 185 |
<xsl:if test="status='CANCELLED'"><xsl:copy-of select="$bwStr-SgEv-Canceled"/><xsl:text> </xsl:text></xsl:if> |
|---|
| 186 |
<xsl:choose> |
|---|
| 187 |
<xsl:when test="link != ''"> |
|---|
| 188 |
<xsl:variable name="link" select="link"/> |
|---|
| 189 |
<a href="{$link}"> |
|---|
| 190 |
<xsl:value-of select="summary"/> |
|---|
| 191 |
</a> |
|---|
| 192 |
</xsl:when> |
|---|
| 193 |
<xsl:otherwise> |
|---|
| 194 |
<xsl:value-of select="summary"/> |
|---|
| 195 |
</xsl:otherwise> |
|---|
| 196 |
</xsl:choose> |
|---|
| 197 |
</h2> |
|---|
| 198 |
<table id="eventTable" cellpadding="0" cellspacing="0"> |
|---|
| 199 |
<tr> |
|---|
| 200 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-When"/></td> |
|---|
| 201 |
<td class="fieldval"> |
|---|
| 202 |
<!-- always display local time --> |
|---|
| 203 |
<xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> |
|---|
| 204 |
<xsl:if test="start/allday = 'false'"> |
|---|
| 205 |
<span class="time"><xsl:value-of select="start/time"/></span> |
|---|
| 206 |
</xsl:if> |
|---|
| 207 |
<xsl:if test="(end/longdate != start/longdate) or |
|---|
| 208 |
((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> |
|---|
| 209 |
<xsl:if test="end/longdate != start/longdate"> |
|---|
| 210 |
<xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> |
|---|
| 211 |
</xsl:if> |
|---|
| 212 |
<xsl:choose> |
|---|
| 213 |
<xsl:when test="start/allday = 'true'"> |
|---|
| 214 |
<span class="time"><em><xsl:copy-of select="$bwStr-SgEv-AllDay"/></em></span> |
|---|
| 215 |
</xsl:when> |
|---|
| 216 |
<xsl:when test="end/longdate != start/longdate"> |
|---|
| 217 |
<span class="time"><xsl:value-of select="end/time"/></span> |
|---|
| 218 |
</xsl:when> |
|---|
| 219 |
<xsl:when test="end/time != start/time"> |
|---|
| 220 |
<span class="time"><xsl:value-of select="end/time"/></span> |
|---|
| 221 |
</xsl:when> |
|---|
| 222 |
</xsl:choose> |
|---|
| 223 |
<!-- if timezones are not local, or if floating add labels: --> |
|---|
| 224 |
<xsl:if test="start/timezone/islocal = 'false' or end/timezone/islocal = 'false'"> |
|---|
| 225 |
<xsl:text> </xsl:text> |
|---|
| 226 |
-- |
|---|
| 227 |
<strong> |
|---|
| 228 |
<xsl:choose> |
|---|
| 229 |
<xsl:when test="start/floating = 'true'"> |
|---|
| 230 |
<xsl:copy-of select="$bwStr-SgEv-FloatingTime"/> |
|---|
| 231 |
</xsl:when> |
|---|
| 232 |
<xsl:otherwise> |
|---|
| 233 |
<xsl:copy-of select="$bwStr-SgEv-LocalTime"/> |
|---|
| 234 |
</xsl:otherwise> |
|---|
| 235 |
</xsl:choose> |
|---|
| 236 |
</strong> |
|---|
| 237 |
<br/> |
|---|
| 238 |
</xsl:if> |
|---|
| 239 |
<!-- display in timezone if not local or floating time) --> |
|---|
| 240 |
<xsl:if test="(start/timezone/islocal = 'false' or end/timezone/islocal = 'false') and start/floating = 'false'"> |
|---|
| 241 |
<xsl:choose> |
|---|
| 242 |
<xsl:when test="start/timezone/id != end/timezone/id"> |
|---|
| 243 |
<!-- need to display both timezones if they differ from start to end --> |
|---|
| 244 |
<table border="0" cellspacing="0" id="tztable"> |
|---|
| 245 |
<tr> |
|---|
| 246 |
<td> |
|---|
| 247 |
<strong><xsl:copy-of select="$bwStr-SgEv-Start"/></strong> |
|---|
| 248 |
</td> |
|---|
| 249 |
<td> |
|---|
| 250 |
<xsl:choose> |
|---|
| 251 |
<xsl:when test="start/timezone/islocal='true'"> |
|---|
| 252 |
<xsl:value-of select="start/dayname"/>, |
|---|
| 253 |
<xsl:value-of select="start/longdate"/> |
|---|
| 254 |
<xsl:text> </xsl:text> |
|---|
| 255 |
<span class="time"><xsl:value-of select="start/time"/></span> |
|---|
| 256 |
</xsl:when> |
|---|
| 257 |
<xsl:otherwise> |
|---|
| 258 |
<xsl:value-of select="start/timezone/dayname"/>, |
|---|
| 259 |
<xsl:value-of select="start/timezone/longdate"/> |
|---|
| 260 |
<xsl:text> </xsl:text> |
|---|
| 261 |
<span class="time"><xsl:value-of select="start/timezone/time"/></span> |
|---|
| 262 |
</xsl:otherwise> |
|---|
| 263 |
</xsl:choose> |
|---|
| 264 |
</td> |
|---|
| 265 |
<td> |
|---|
| 266 |
-- |
|---|
| 267 |
<strong><xsl:value-of select="start/timezone/id"/></strong> |
|---|
| 268 |
</td> |
|---|
| 269 |
</tr> |
|---|
| 270 |
<tr> |
|---|
| 271 |
<td> |
|---|
| 272 |
<strong><xsl:copy-of select="$bwStr-SgEv-End"/></strong> |
|---|
| 273 |
</td> |
|---|
| 274 |
<td> |
|---|
| 275 |
<xsl:choose> |
|---|
| 276 |
<xsl:when test="end/timezone/islocal='true'"> |
|---|
| 277 |
<xsl:value-of select="end/dayname"/>, |
|---|
| 278 |
<xsl:value-of select="end/longdate"/> |
|---|
| 279 |
<xsl:text> </xsl:text> |
|---|
| 280 |
<span class="time"><xsl:value-of select="end/time"/></span> |
|---|
| 281 |
</xsl:when> |
|---|
| 282 |
<xsl:otherwise> |
|---|
| 283 |
<xsl:value-of select="end/timezone/dayname"/>, |
|---|
| 284 |
<xsl:value-of select="end/timezone/longdate"/> |
|---|
| 285 |
<xsl:text> </xsl:text> |
|---|
| 286 |
<span class="time"><xsl:value-of select="end/timezone/time"/></span> |
|---|
| 287 |
</xsl:otherwise> |
|---|
| 288 |
</xsl:choose> |
|---|
| 289 |
</td> |
|---|
| 290 |
<td> |
|---|
| 291 |
-- |
|---|
| 292 |
<strong><xsl:value-of select="end/timezone/id"/></strong> |
|---|
| 293 |
</td> |
|---|
| 294 |
</tr> |
|---|
| 295 |
</table> |
|---|
| 296 |
</xsl:when> |
|---|
| 297 |
<xsl:otherwise> |
|---|
| 298 |
<!-- otherwise, timezones are the same: display as a single line --> |
|---|
| 299 |
<xsl:value-of select="start/timezone/dayname"/>, <xsl:value-of select="start/timezone/longdate"/><xsl:text> </xsl:text> |
|---|
| 300 |
<xsl:if test="start/allday = 'false'"> |
|---|
| 301 |
<span class="time"><xsl:value-of select="start/timezone/time"/></span> |
|---|
| 302 |
</xsl:if> |
|---|
| 303 |
<xsl:if test="(end/timezone/longdate != start/timezone/longdate) or |
|---|
| 304 |
((end/timezone/longdate = start/timezone/longdate) and (end/timezone/time != start/timezone/time))"> - </xsl:if> |
|---|
| 305 |
<xsl:if test="end/timezone/longdate != start/timezone/longdate"> |
|---|
| 306 |
<xsl:value-of select="substring(end/timezone/dayname,1,3)"/>, <xsl:value-of select="end/timezone/longdate"/><xsl:text> </xsl:text> |
|---|
| 307 |
</xsl:if> |
|---|
| 308 |
<xsl:choose> |
|---|
| 309 |
<xsl:when test="start/allday = 'true'"> |
|---|
| 310 |
<span class="time"><em> <xsl:copy-of select="$bwStr-SgEv-AllDay"/></em></span> |
|---|
| 311 |
</xsl:when> |
|---|
| 312 |
<xsl:when test="end/timezone/longdate != start/timezone/longdate"> |
|---|
| 313 |
<span class="time"><xsl:value-of select="end/timezone/time"/></span> |
|---|
| 314 |
</xsl:when> |
|---|
| 315 |
<xsl:when test="end/timezone/time != start/timezone/time"> |
|---|
| 316 |
<span class="time"><xsl:value-of select="end/timezone/time"/></span> |
|---|
| 317 |
</xsl:when> |
|---|
| 318 |
</xsl:choose> |
|---|
| 319 |
<xsl:text> </xsl:text> |
|---|
| 320 |
-- |
|---|
| 321 |
<strong><xsl:value-of select="start/timezone/id"/></strong> |
|---|
| 322 |
</xsl:otherwise> |
|---|
| 323 |
</xsl:choose> |
|---|
| 324 |
</xsl:if> |
|---|
| 325 |
</td> |
|---|
| 326 |
<th class="icalIcon" rowspan="2"> |
|---|
| 327 |
<div id="eventIcons"> |
|---|
| 328 |
<a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="{$bwStr-SgEv-AddEventToMyCalendar}" target="myCalendar"> |
|---|
| 329 |
<img class="addref" src="{$resourcesRoot}/images/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/> |
|---|
| 330 |
<xsl:copy-of select="$bwStr-SgEv-AddToMyCalendar"/> |
|---|
| 331 |
</a> |
|---|
| 332 |
<xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> |
|---|
| 333 |
<a href="{$export}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&contentName={$eventIcalName}" title="{$bwStr-SgEv-DownloadEvent}"> |
|---|
| 334 |
<img src="{$resourcesRoot}/images/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/> |
|---|
| 335 |
<xsl:copy-of select="$bwStr-SgEv-Download"/></a> |
|---|
| 336 |
</div> |
|---|
| 337 |
</th> |
|---|
| 338 |
</tr> |
|---|
| 339 |
<tr> |
|---|
| 340 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Where"/></td> |
|---|
| 341 |
<td class="fieldval"> |
|---|
| 342 |
<xsl:choose> |
|---|
| 343 |
<xsl:when test="location/link=''"> |
|---|
| 344 |
<xsl:value-of select="location/address"/> |
|---|
| 345 |
</xsl:when> |
|---|
| 346 |
<xsl:otherwise> |
|---|
| 347 |
<xsl:variable name="locationLink" select="location/link"/> |
|---|
| 348 |
<a href="{$locationLink}"> |
|---|
| 349 |
<xsl:value-of select="location/address"/> |
|---|
| 350 |
</a> |
|---|
| 351 |
</xsl:otherwise> |
|---|
| 352 |
</xsl:choose> |
|---|
| 353 |
<xsl:if test="location/subaddress!=''"> |
|---|
| 354 |
<br/><xsl:value-of select="location/subaddress"/> |
|---|
| 355 |
</xsl:if> |
|---|
| 356 |
</td> |
|---|
| 357 |
</tr> |
|---|
| 358 |
<tr> |
|---|
| 359 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Description"/></td> |
|---|
| 360 |
<td colspan="2" class="fieldval description"> |
|---|
| 361 |
<xsl:if test="xproperties/node()[name()='X-BEDEWORK-IMAGE']"> |
|---|
| 362 |
<xsl:variable name="bwImage"><xsl:value-of select="xproperties/node()[name()='X-BEDEWORK-IMAGE']/values/text"/></xsl:variable> |
|---|
| 363 |
<img src="{$bwImage}" class="bwEventImage"/> |
|---|
| 364 |
</xsl:if> |
|---|
| 365 |
<xsl:call-template name="replace"> |
|---|
| 366 |
<xsl:with-param name="string" select="description"/> |
|---|
| 367 |
<xsl:with-param name="pattern" select="'
'"/> |
|---|
| 368 |
<xsl:with-param name="replacement"><br/></xsl:with-param> |
|---|
| 369 |
</xsl:call-template> |
|---|
| 370 |
</td> |
|---|
| 371 |
</tr> |
|---|
| 372 |
<xsl:if test="status !='' and status != 'CONFIRMED'"> |
|---|
| 373 |
<tr> |
|---|
| 374 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-STATUS"/></td> |
|---|
| 375 |
<td class="fieldval"> |
|---|
| 376 |
<xsl:value-of select="status"/> |
|---|
| 377 |
</td> |
|---|
| 378 |
</tr> |
|---|
| 379 |
</xsl:if> |
|---|
| 380 |
<xsl:if test="cost!=''"> |
|---|
| 381 |
<tr> |
|---|
| 382 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Cost"/></td> |
|---|
| 383 |
<td colspan="2" class="fieldval"><xsl:value-of select="cost"/></td> |
|---|
| 384 |
</tr> |
|---|
| 385 |
</xsl:if> |
|---|
| 386 |
<xsl:if test="link != ''"> |
|---|
| 387 |
<tr> |
|---|
| 388 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-See"/></td> |
|---|
| 389 |
<td colspan="2" class="fieldval"> |
|---|
| 390 |
<xsl:variable name="link" select="link"/> |
|---|
| 391 |
<a href="{$link}"><xsl:value-of select="link"/></a> |
|---|
| 392 |
</td> |
|---|
| 393 |
</tr> |
|---|
| 394 |
</xsl:if> |
|---|
| 395 |
<xsl:if test="contact/name!='none'"> |
|---|
| 396 |
<tr> |
|---|
| 397 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Contact"/></td> |
|---|
| 398 |
<td colspan="2" class="fieldval"> |
|---|
| 399 |
<xsl:choose> |
|---|
| 400 |
<xsl:when test="contact/link=''"> |
|---|
| 401 |
<xsl:value-of select="contact/name"/> |
|---|
| 402 |
</xsl:when> |
|---|
| 403 |
<xsl:otherwise> |
|---|
| 404 |
<xsl:variable name="sponsorLink" select="contact/link"/> |
|---|
| 405 |
<a href="{$sponsorLink}"> |
|---|
| 406 |
<xsl:value-of select="contact/name"/> |
|---|
| 407 |
</a> |
|---|
| 408 |
</xsl:otherwise> |
|---|
| 409 |
</xsl:choose> |
|---|
| 410 |
<xsl:if test="contact/phone!=''"> |
|---|
| 411 |
<br /><xsl:value-of select="contact/phone"/> |
|---|
| 412 |
</xsl:if> |
|---|
| 413 |
<!-- If you want to display email addresses, uncomment the |
|---|
| 414 |
following 8 lines. --> |
|---|
| 415 |
<!-- <xsl:if test="contact/email!=''"> |
|---|
| 416 |
<br /> |
|---|
| 417 |
<xsl:variable name="email" select="contact/email"/> |
|---|
| 418 |
<xsl:variable name="subject" select="summary"/> |
|---|
| 419 |
<a href="mailto:{$email}&subject={$subject}"> |
|---|
| 420 |
<xsl:value-of select="contact/email"/> |
|---|
| 421 |
</a> |
|---|
| 422 |
</xsl:if> --> |
|---|
| 423 |
</td> |
|---|
| 424 |
</tr> |
|---|
| 425 |
</xsl:if> |
|---|
| 426 |
<xsl:if test="comments/comment"> |
|---|
| 427 |
<tr> |
|---|
| 428 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Comments"/></td> |
|---|
| 429 |
<td class="fieldval comments"> |
|---|
| 430 |
<xsl:for-each select="comments/comment"> |
|---|
| 431 |
<p><xsl:value-of select="value"/></p> |
|---|
| 432 |
</xsl:for-each> |
|---|
| 433 |
</td> |
|---|
| 434 |
</tr> |
|---|
| 435 |
</xsl:if> |
|---|
| 436 |
<xsl:if test="xproperties/X-BEDEWORK-ALIAS"> |
|---|
| 437 |
<tr> |
|---|
| 438 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-TopicalArea"/></td> |
|---|
| 439 |
<td class="fieldval"> |
|---|
| 440 |
<xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> |
|---|
| 441 |
<xsl:variable name="calUrl" select="values/text"/> |
|---|
| 442 |
<a href="{$setSelection}&virtualPath={$calUrl}&setappvar=curCollection({$calUrl})"> |
|---|
| 443 |
<xsl:call-template name="substring-afterLastInstanceOf"> |
|---|
| 444 |
<xsl:with-param name="string" select="values/text"/> |
|---|
| 445 |
<xsl:with-param name="char">/</xsl:with-param> |
|---|
| 446 |
</xsl:call-template> |
|---|
| 447 |
</a><xsl:if test="position()!=last()">, </xsl:if> |
|---|
| 448 |
</xsl:for-each> |
|---|
| 449 |
</td> |
|---|
| 450 |
</tr> |
|---|
| 451 |
</xsl:if> |
|---|
| 452 |
<xsl:if test="categories/category"> |
|---|
| 453 |
<tr> |
|---|
| 454 |
<td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Categories"/></td> |
|---|
| 455 |
<td class="fieldval"> |
|---|
| 456 |
<xsl:for-each select="categories/category"> |
|---|
| 457 |
<xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if> |
|---|
| 458 |
</xsl:for-each> |
|---|
| 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 |
</table> |
|---|
| 474 |
</xsl:template> |
|---|
| 475 |
|
|---|
| 476 |
<!--==== LIST VIEW (for day, week, and month) ====--> |
|---|
| 477 |
<xsl:template name="listView"> |
|---|
| 478 |
<table id="listTable" border="0" cellpadding="0" cellspacing="0"> |
|---|
| 479 |
<xsl:choose> |
|---|
| 480 |
<xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> |
|---|
| 481 |
<tr> |
|---|
| 482 |
<td class="noEventsCell"> |
|---|
| 483 |
<xsl:copy-of select="$bwStr-LsVw-NoEventsToDisplay"/> |
|---|
| 484 |
</td> |
|---|
| 485 |
</tr> |
|---|
| 486 |
</xsl:when> |
|---|
| 487 |
<xsl:otherwise> |
|---|
| 488 |
<xsl:for-each select="/bedework/eventscalendar/year/month/week/day[event]"> |
|---|
| 489 |
<xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''"> |
|---|
| 490 |
<tr> |
|---|
| 491 |
<td colspan="5" class="dateRow"> |
|---|
| 492 |
<xsl:variable name="date" select="date"/> |
|---|
| 493 |
<!-- <a href="{$listEvents}&startDate={$date}&endDate={$date}"> --> |
|---|
| 494 |
|
|---|
| 495 |
<xsl:choose> |
|---|
| 496 |
<xsl:when test="/bedework/appvar/key = 'filter'"> |
|---|
| 497 |
<xsl:variable name="filterName" select="substring-before(/bedework/appvar[key='filter']/value,':')"/> |
|---|
| 498 |
<xsl:variable name="filterVal" select="substring-after(/bedework/appvar[key='filter']/value,':')"/> |
|---|
| 499 |
<!-- Define filters here: --> |
|---|
| 500 |
<xsl:choose> |
|---|
| 501 |
<xsl:when test="$filterName = 'grpAndCats'"> |
|---|
| 502 |
<xsl:variable name="group" select="substring-before($filterVal, '~')" /> |
|---|
| 503 |
<xsl:variable name="cats" select="substring-after($filterVal, '~')" /> |
|---|
| 504 |
<a href="{$bwCacheHostUrl}/v1.0/genFeedPeriod/day/{$date}/grid-html/{$group}/{$cats}"> |
|---|
| 505 |
<xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> |
|---|
| 506 |
</a> |
|---|
| 507 |
</xsl:when> |
|---|
| 508 |
<xsl:otherwise> |
|---|
| 509 |
<!-- Filter name not defined? Turn off filtering. --> |
|---|
| 510 |
<a href="{$bwCacheHostUrl}/v1.0/genFeedPeriod/day/{$date}/grid-html/all/all"> |
|---|
| 511 |
<xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> |
|---|
| 512 |
</a> |
|---|
| 513 |
</xsl:otherwise> |
|---|
| 514 |
</xsl:choose> |
|---|
| 515 |
</xsl:when> |
|---|
| 516 |
<xsl:otherwise> |
|---|
| 517 |
<a href="{$bwCacheHostUrl}/v1.0/genFeedPeriod/day/{$date}/grid-html/all/all"> |
|---|
| 518 |
<xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> |
|---|
| 519 |
</a> |
|---|
| 520 |
</xsl:otherwise> |
|---|
| 521 |
</xsl:choose> |
|---|
| 522 |
|
|---|
| 523 |
</td> |
|---|
| 524 |
</tr> |
|---|
| 525 |
</xsl:if> |
|---|
| 526 |
<xsl:for-each select="event"> |
|---|
| 527 |
|
|---|
| 528 |
<xsl:variable name="id" select="id"/> |
|---|
| 529 |
<xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| 530 |
<xsl:variable name="guid" select="guid"/> |
|---|
| 531 |
<xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| 532 |
<tr> |
|---|
| 533 |
<xsl:variable name="dateRangeStyle"> |
|---|
| 534 |
<xsl:choose> |
|---|
| 535 |
<xsl:when test="start/shortdate = parent::day/shortdate"> |
|---|
| 536 |
<xsl:choose> |
|---|
| 537 |
<xsl:when test="start/allday = 'true'">dateRangeCrossDay</xsl:when> |
|---|
| 538 |
<xsl:when test="start/hour24 < 6">dateRangeEarlyMorning</xsl:when> |
|---|
| 539 |
<xsl:when test="start/hour24 < 12">dateRangeMorning</xsl:when> |
|---|
| 540 |
<xsl:when test="start/hour24 < 18">dateRangeAfternoon</xsl:when> |
|---|
| 541 |
<xsl:otherwise>dateRangeEvening</xsl:otherwise> |
|---|
| 542 |
</xsl:choose> |
|---|
| 543 |
</xsl:when> |
|---|
| 544 |
<xsl:otherwise>dateRangeCrossDay</xsl:otherwise> |
|---|
| 545 |
</xsl:choose> |
|---|
| 546 |
</xsl:variable> |
|---|
| 547 |
<xsl:choose> |
|---|
| 548 |
<xsl:when test="start/allday = 'true' and |
|---|
| 549 |
start/shortdate = end/shortdate"> |
|---|
| 550 |
<td class="{$dateRangeStyle} center" colspan="3"> |
|---|
| 551 |
<xsl:copy-of select="$bwStr-LsVw-AllDay"/> |
|---|
| 552 |
</td> |
|---|
| 553 |
</xsl:when> |
|---|
| 554 |
<xsl:when test="start/shortdate = end/shortdate and |
|---|
| 555 |
start/time = end/time"> |
|---|
| 556 |
<td class="{$dateRangeStyle} center" colspan="3"> |
|---|
| 557 |
<!--<a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| 558 |
<xsl:value-of select="start/time"/> --> |
|---|
| 559 |
<a href="{$bwCacheHostUrl}/v1.0/event/blah2/list-html/{$recurrenceId}/{$guid}"> |
|---|
| 560 |
</a> |
|---|
| 561 |
</td> |
|---|
| 562 |
</xsl:when> |
|---|
| 563 |
<xsl:otherwise> |
|---|
| 564 |
<td class="{$dateRangeStyle} right"> |
|---|
| 565 |
<a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| 566 |
<xsl:choose> |
|---|
| 567 |
<xsl:when test="start/allday = 'true' and |
|---|
| 568 |
parent::day/shortdate = start/shortdate"> |
|---|
| 569 |
<xsl:copy-of select="$bwStr-LsVw-Today"/> |
|---|
| 570 |
</xsl:when> |
|---|
| 571 |
<xsl:when test="parent::day/shortdate != start/shortdate"> |
|---|
| 572 |
<span class="littleArrow">«</span>  |
|---|
| 573 |
<xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> |
|---|
| 574 |
</xsl:when> |
|---|
| 575 |
<xsl:otherwise> |
|---|
| 576 |
<xsl:value-of select="start/time"/> |
|---|
| 577 |
</xsl:otherwise> |
|---|
| 578 |
</xsl:choose> |
|---|
| 579 |
</a> |
|---|
| 580 |
</td> |
|---|
| 581 |
<td class="{$dateRangeStyle} center"> |
|---|
| 582 |
<a href="{$bwCacheHostUrl}/v1.0/event/blah3/list-html/{$recurrenceId}/{$guid}"></a> |
|---|
| 583 |
<!-- <a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}">-</a> --> |
|---|
| 584 |
</td> |
|---|
| 585 |
<td class="{$dateRangeStyle} left"> |
|---|
| 586 |
<a href="{$bwCacheHostUrl}/v1.0/event/blah4/list-html/{$recurrenceId}/{$guid}"> |
|---|
| 587 |
<!-- <a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> --> |
|---|
| 588 |
<xsl:choose> |
|---|
| 589 |
<xsl:when test="end/allday = 'true' and |
|---|
| 590 |
parent::day/shortdate = end/shortdate"> |
|---|
| 591 |
<xsl:copy-of select="$bwStr-LsVw-Today"/> |
|---|
| 592 |
</xsl:when> |
|---|
| 593 |
<xsl:when test="parent::day/shortdate != end/shortdate"> |
|---|
| 594 |
<xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> |
|---|
| 595 |
 <span class="littleArrow">»</span> |
|---|
| 596 |
</xsl:when> |
|---|
| 597 |
<xsl:otherwise> |
|---|
| 598 |
<xsl:value-of select="end/time"/> |
|---|
| 599 |
</xsl:otherwise> |
|---|
| 600 |
</xsl:choose> |
|---|
| 601 |
</a> |
|---|
| 602 |
</td> |
|---|
| 603 |
</xsl:otherwise> |
|---|
| 604 |
</xsl:choose> |
|---|
| 605 |
<xsl:variable name="descriptionClass"> |
|---|
| 606 |
<xsl:choose> |
|---|
| 607 |
<xsl:when test="status='CANCELLED'">description bwStatusCancelled</xsl:when> |
|---|
| 608 |
<xsl:when test="status='TENTATIVE'">description bwStatusTentative</xsl:when> |
|---|
| 609 |
<xsl:otherwise><xsl:copy-of select="$bwStr-LsVw-Description"/></xsl:otherwise> |
|---|
| 610 |
</xsl:choose> |
|---|
| 611 |
</xsl:variable> |
|---|
| 612 |
<!-- Subscription styles. |
|---|
| 613 |
These are set in the add/modify subscription forms in the admin client; |
|---|
| 614 |
if present, these override the background-color set by eventClass. The |
|---|
| 615 |
subscription styles should not be used for canceled events (tentative is ok). --> |
|---|
| 616 |
<xsl:variable name="subscriptionClass"> |
|---|
| 617 |
<xsl:if test="status != 'CANCELLED'"> |
|---|
| 618 |
<xsl:apply-templates select="categories" mode="customEventColor"/> |
|---|
| 619 |
</xsl:if> |
|---|
| 620 |
</xsl:variable> |
|---|
| 621 |
<td class="{$descriptionClass} {$subscriptionClass}"> |
|---|
| 622 |
<xsl:if test="status='CANCELLED'"><strong><xsl:copy-of select="$bwStr-LsVw-Canceled"/><xsl:text> </xsl:text></strong></xsl:if> |
|---|
| 623 |
<xsl:choose> |
|---|
| 624 |
<xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> |
|---|
| 625 |
<a href="{$bwCacheHostUrl}/v1.0/event/blah/5/list-html/{$recurrenceId}/{$guid}"> |
|---|
| 626 |
<!-- ><a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> --> |
|---|
| 627 |
<strong> |
|---|
| 628 |
<xsl:value-of select="summary"/>: |
|---|
| 629 |
</strong> |
|---|
| 630 |
<xsl:value-of select="description"/>  |
|---|
| 631 |
<em> |
|---|
| 632 |
<xsl:value-of select="location/address"/> |
|---|
| 633 |
<xsl:if test="location/subaddress != ''"> |
|---|
| 634 |
, <xsl:value-of select="location/subaddress"/> |
|---|
| 635 |
</xsl:if>.  |
|---|
| 636 |
<xsl:if test="cost!=''"> |
|---|
| 637 |
<xsl:value-of select="cost"/>.  |
|---|
| 638 |
</xsl:if> |
|---|
| 639 |
<xsl:if test="contact/name!='none'"> |
|---|
| 640 |
<xsl:copy-of select="$bwStr-LsVw-Contact"/><xsl:text> </xsl:text><xsl:value-of select="contact/name"/> |
|---|
| 641 |
</xsl:if> |
|---|
| 642 |
</em> |
|---|
| 643 |
- |
|---|
| 644 |
<span class="eventSubscription"> |
|---|
| 645 |
<xsl:if test="xproperties/X-BEDEWORK-ALIAS"> |
|---|
| 646 |
<xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> |
|---|
| 647 |
<xsl:call-template name="substring-afterLastInstanceOf"> |
|---|
| 648 |
<xsl:with-param name="string" select="values/text"/> |
|---|
| 649 |
<xsl:with-param name="char">/</xsl:with-param> |
|---|
| 650 |
</xsl:call-template> |
|---|
| 651 |
<xsl:if test="position()!=last()">, </xsl:if> |
|---|
| 652 |
</xsl:for-each> |
|---|
| 653 |
</xsl:if> |
|---|
| 654 |
</span> |
|---|
| 655 |
</a> |
|---|
| 656 |
<xsl:if test="link != ''"> |
|---|
| 657 |
<xsl:variable name="link" select="link"/> |
|---|
| 658 |
<a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> |
|---|
| 659 |
</xsl:if> |
|---|
| 660 |
</xsl:when> |
|---|
| 661 |
<xsl:otherwise> |
|---|
| 662 |
<!-- ><a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> --> |
|---|
| 663 |
<a href="{$bwCacheHostUrl}/v1.0/event/blah6/list-html/{$recurrenceId}/{$guid}"> |
|---|
| 664 |
<xsl:value-of select="summary"/> |
|---|
| 665 |
<xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> |
|---|
| 666 |
- |
|---|
| 667 |
<span class="eventSubscription"> |
|---|
| 668 |
<xsl:if test="xproperties/X-BEDEWORK-ALIAS"> |
|---|
| 669 |
<xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> |
|---|
| 670 |
<xsl:call-template name="substring-afterLastInstanceOf"> |
|---|
| 671 |
<xsl:with-param name="string" select="values/text"/> |
|---|
| 672 |
<xsl:with-param name="char">/</xsl:with-param> |
|---|
| 673 |
</xsl:call-template> |
|---|
| 674 |
<xsl:if test="position()!=last()">, </xsl:if> |
|---|
| 675 |
</xsl:for-each> |
|---|
| 676 |
</xsl:if> |
|---|
| 677 |
</span> |
|---|
| 678 |
</a> |
|---|
| 679 |
</xsl:otherwise> |
|---|
| 680 |
</xsl:choose> |
|---|
| 681 |
</td> |
|---|
| 682 |
<td class="icons"> |
|---|
| 683 |
<a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="{$bwStr-LsVw-AddEventToMyCalendar}" target="myCalendar"> |
|---|
| 684 |
<img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="{$bwStr-LsVw-AddEventToMyCalendar}"/> |
|---|
| 685 |
</a> |
|---|
| 686 |
<xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> |
|---|
| 687 |
<a href="{$export}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&contentName={$eventIcalName}" title="{$bwStr-LsVw-DownloadEvent}"> |
|---|
| 688 |
<img src="{$resourcesRoot}/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="{$bwStr-LsVw-DownloadEvent}"/> |
|---|
| 689 |
</a> |
|---|
| 690 |
</td> |
|---|
| 691 |
</tr> |
|---|
| 692 |
</xsl:for-each> |
|---|
| 693 |
</xsl:for-each> |
|---|
| 694 |
</xsl:otherwise> |
|---|
| 695 |
</xsl:choose> |
|---|
| 696 |
</table> |
|---|
| 697 |
</xsl:template> |
|---|
| 698 |
|
|---|
| 699 |
<!--==== LIST EVENTS - for listing discrete events ====--> |
|---|
| 700 |
<xsl:template match="events" mode="eventList"> |
|---|
| 701 |
<h2 class="bwStatusConfirmed"> |
|---|
| 702 |
<!-- <form name="bwListEventsForm" action="{$listEvents}" method="post"> |
|---|
| 703 |
<input type="hidden" name="setappvar"/>--> |
|---|
| 704 |
<xsl:copy-of select="$bwStr-LsEv-Next7Days"/> |
|---|
| 705 |
<!-- |
|---|
| 706 |
<span id="bwListEventsFormControls"> |
|---|
| 707 |
<select name="catuid" onchange="this.form.submit();"> |
|---|
| 708 |
<option value="">filter by category...</option> |
|---|
| 709 |
<xsl:for-each select="/bedework/categories/category"> |
|---|
| 710 |
<option> |
|---|
| 711 |
<xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> |
|---|
| 712 |
<xsl:value-of select="keyword"/> |
|---|
| 713 |
</option> |
|---|
| 714 |
</xsl:for-each> |
|---|
| 715 |
</select> |
|---|
| 716 |
<select name="days" onchange="this.form.submit();"> |
|---|
| 717 |
<xsl:call-template name="buildListEventsDaysOptions"> |
|---|
| 718 |
<xsl:with-param name="i">1</xsl:with-param> |
|---|
| 719 |
<xsl:with-param name="total">31</xsl:with-param> |
|---|
| 720 |
</xsl:call-template> |
|---|
| 721 |
</select> |
|---|
| 722 |
</span> |
|---|
| 723 |
</form>--> |
|---|
| 724 |
</h2> |
|---|
| 725 |
|
|---|
| 726 |
<div id="listEvents"> |
|---|
| 727 |
<ul> |
|---|
| 728 |
<xsl:choose> |
|---|
| 729 |
<xsl:when test="not(event)"> |
|---|
| 730 |
<li><xsl:copy-of select="$bwStr-LsEv-NoEventsToDisplay"/></li> |
|---|
| 731 |
</xsl:when> |
|---|
| 732 |
<xsl:otherwise> |
|---|
| 733 |
<xsl:for-each select="event"> |
|---|
| 734 |
<xsl:variable name="id" select="id"/> |
|---|
| 735 |
<xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| 736 |
<xsl:variable name="guid" select="guid"/> |
|---|
| 737 |
<xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| 738 |
<li> |
|---|
| 739 |
<xsl:attribute name="class"> |
|---|
| 740 |
<xsl:choose> |
|---|
| 741 |
<xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> |
|---|
| 742 |
<xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> |
|---|
| 743 |
</xsl:choose> |
|---|
| 744 |
</xsl:attribute> |
|---|
| 745 |
|
|---|
| 746 |
<xsl:if test="status='CANCELLED'"><strong><xsl:copy-of select="$bwStr-LsEv-Canceled"/><xsl:text> </xsl:text></strong></xsl:if> |
|---|
| 747 |
<xsl:if test="status='TENTATIVE'"><em><xsl:copy-of select="$bwStr-LsEv-Tentative"/><xsl:text> </xsl:text></em></xsl:if> |
|---|
| 748 |
<a href="{$bwCacheHostUrl}/v1.0/event/blah7/list-html/{$recurrenceId}/{$guid}"> |
|---|
| 749 |
<!-- <a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> --> |
|---|
| 750 |
<xsl:value-of select="summary"/> |
|---|
| 751 |
</a><xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> |
|---|
| 752 |
<xsl:if test="/bedework/appvar[key='listEventsSummaryMode']/value='details'"> |
|---|
| 753 |
<xsl:if test="location/subaddress != ''"> |
|---|
| 754 |
, <xsl:value-of select="location/subaddress"/> |
|---|
| 755 |
</xsl:if> |
|---|
| 756 |
</xsl:if> |
|---|
| 757 |
|
|---|
| 758 |
<xsl:text> </xsl:text> |
|---|
| 759 |
<a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="{$bwStr-LsVw-AddEventToMyCalendar}" target="myCalendar"> |
|---|
| 760 |
<img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="{$bwStr-LsVw-AddEventToMyCalendar}"/> |
|---|
| 761 |
</a> |
|---|
| 762 |
<xsl:text> </xsl:text> |
|---|
| 763 |
<xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> |
|---|
| 764 |
<a href="{$export}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&contentName={$eventIcalName}" title="{$bwStr-LsEv-DownloadEvent}"> |
|---|
| 765 |
<img src="{$resourcesRoot}/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="{$bwStr-LsEv-DownloadEvent}"/> |
|---|
| 766 |
</a> |
|---|
| 767 |
|
|---|
| 768 |
<br/> |
|---|
| 769 |
|
|---|
| 770 |
<xsl:value-of select="substring(start/dayname,1,3)"/>, |
|---|
| 771 |
<xsl:value-of select="start/longdate"/> |
|---|
| 772 |
<xsl:text> </xsl:text> |
|---|
| 773 |
<xsl:if test="start/allday != 'true'"> |
|---|
| 774 |
<xsl:value-of select="start/time"/> |
|---|
| 775 |
</xsl:if> |
|---|
| 776 |
<xsl:choose> |
|---|
| 777 |
<xsl:when test="start/shortdate != end/shortdate"> |
|---|
| 778 |
- |
|---|
| 779 |
<xsl:value-of select="substring(end/dayname,1,3)"/>, |
|---|
| 780 |
<xsl:value-of select="end/longdate"/> |
|---|
| 781 |
<xsl:text> </xsl:text> |
|---|
| 782 |
<xsl:if test="start/allday != 'true'"> |
|---|
| 783 |
<xsl:value-of select="end/time"/> |
|---|
| 784 |
</xsl:if> |
|---|
| 785 |
</xsl:when> |
|---|
| 786 |
<xsl:otherwise> |
|---|
| 787 |
<xsl:if test="start/time != end/time"> |
|---|
| 788 |
- |
|---|
| 789 |
<xsl:value-of select="end/time"/> |
|---|
| 790 |
</xsl:if> |
|---|
| 791 |
</xsl:otherwise> |
|---|
| 792 |
</xsl:choose> |
|---|
| 793 |
|
|---|
| 794 |
<xsl:if test="/bedework/appvar[key='listEventsSummaryMode']/value='details'"> |
|---|
| 795 |
<br/> |
|---|
| 796 |
<xsl:value-of select="description"/> |
|---|
| 797 |
<xsl:if test="link != ''"> |
|---|
| 798 |
<br/> |
|---|
| 799 |
<xsl:variable name="link" select="link"/> |
|---|
| 800 |
<a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> |
|---|
| 801 |
</xsl:if> |
|---|
| 802 |
<xsl:if test="categories/category"> |
|---|
| 803 |
<br/> |
|---|
| 804 |
<xsl:copy-of select="$bwStr-LsEv-Categories"/> |
|---|
| 805 |
<xsl:for-each select="categories/category"> |
|---|
| 806 |
<xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if> |
|---|
| 807 |
</xsl:for-each> |
|---|
| 808 |
</xsl:if> |
|---|
| 809 |
<br/> |
|---|
| 810 |
<em> |
|---|
| 811 |
<xsl:if test="cost!=''"> |
|---|
| 812 |
<xsl:value-of select="cost"/>.  |
|---|
| 813 |
</xsl:if> |
|---|
| 814 |
<xsl:if test="contact/name!='none'"> |
|---|
| 815 |
<xsl:copy-of select="$bwStr-LsEv-Contact"/><xsl:text> </xsl:text><xsl:value-of select="contact/name"/> |
|---|
| 816 |
</xsl:if> |
|---|
| 817 |
</em> |
|---|
| 818 |
</xsl:if> |
|---|
| 819 |
|
|---|
| 820 |
</li> |
|---|
| 821 |
</xsl:for-each> |
|---|
| 822 |
</xsl:otherwise> |
|---|
| 823 |
</xsl:choose> |
|---|
| 824 |
</ul> |
|---|
| 825 |
</div> |
|---|
| 826 |
</xsl:template> |
|---|
| 827 |
|
|---|
| 828 |
<xsl:template name="buildListEventsDaysOptions"> |
|---|
| 829 |
<xsl:param name="i">1</xsl:param> |
|---|
| 830 |
<xsl:param name="total">31</xsl:param> |
|---|
| 831 |
<xsl:param name="default">7</xsl:param> |
|---|
| 832 |
<xsl:variable name="selected"><xsl:value-of select="/bedework/appvar[key='listEventsDays']/value"/></xsl:variable> |
|---|
| 833 |
|
|---|
| 834 |
<option onclick="this.form.setappvar.value='listEventsDay({$i})'"> |
|---|
| 835 |
<xsl:attribute name="value"><xsl:value-of select="$i"/></xsl:attribute> |
|---|
| 836 |
<xsl:if test="($selected != '' and $i = $selected) or ($selected = '' and $i = $default)"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> |
|---|
| 837 |
<xsl:value-of select="$i"/> |
|---|
| 838 |
</option> |
|---|
| 839 |
|
|---|
| 840 |
<xsl:if test="$i < $total"> |
|---|
| 841 |
<xsl:call-template name="buildListEventsDaysOptions"> |
|---|
| 842 |
<xsl:with-param name="i"><xsl:value-of select="$i + 1"/></xsl:with-param> |
|---|
| 843 |
<xsl:with-param name="total"><xsl:value-of select="$total"/></xsl:with-param> |
|---|
| 844 |
<xsl:with-param name="default"><xsl:value-of select="$default"/></xsl:with-param> |
|---|
| 845 |
</xsl:call-template> |
|---|
| 846 |
</xsl:if> |
|---|
| 847 |
|
|---|
| 848 |
</xsl:template> |
|---|
| 849 |
|
|---|
| 850 |
<!--==== WEEK CALENDAR VIEW ====--> |
|---|
| 851 |
<xsl:template name="weekView"> |
|---|
| 852 |
<table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"> |
|---|
| 853 |
<tr> |
|---|
| 854 |
<xsl:for-each select="/bedework/daynames/val"> |
|---|
| 855 |
<th class="dayHeading"><xsl:value-of select="."/></th> |
|---|
| 856 |
</xsl:for-each> |
|---|
| 857 |
</tr> |
|---|
| 858 |
<tr> |
|---|
| 859 |
<xsl:for-each select="/bedework/eventscalendar/year/month/week/day"> |
|---|
| 860 |
<xsl:variable name="dayPos" select="position()"/> |
|---|
| 861 |
<xsl:if test="filler='false'"> |
|---|
| 862 |
<td> |
|---|
| 863 |
<xsl:if test="/bedework/now/date = date"> |
|---|
| 864 |
<xsl:attribute name="class">today</xsl:attribute> |
|---|
| 865 |
</xsl:if> |
|---|
| 866 |
<xsl:variable name="dayDate" select="date"/> |
|---|
| 867 |
<!-- ><a href="{$setViewPeriod}&viewType=dayView&date={$dayDate}" class="dayLink"> --> |
|---|
| 868 |
<a href="{$bwCacheHostUrl}/v1.0/genFeedPeriod/day/{$dayDate}/grid-html/all/all" class="dayLink"> |
|---|
| 869 |
<xsl:value-of select="value"/> |
|---|
| 870 |
</a> |
|---|
| 871 |
<xsl:if test="event"> |
|---|
| 872 |
<ul> |
|---|
| 873 |
<xsl:choose> |
|---|
| 874 |
<xsl:when test="/bedework/appvar/key = 'filter'"> |
|---|
| 875 |
<xsl:variable name="filterName" select="substring-before(/bedework/appvar[key='filter']/value,':')"/> |
|---|
| 876 |
<xsl:variable name="filterVal" select="substring-after(/bedework/appvar[key='filter']/value,':')"/> |
|---|
| 877 |
<!-- Define filters here: --> |
|---|
| 878 |
<xsl:choose> |
|---|
| 879 |
<xsl:when test="$filterName = 'grpAndCats'"> |
|---|
| 880 |
<xsl:call-template name="processGrpAndCats"> |
|---|
| 881 |
<xsl:with-param name="list" select="$filterVal"/> |
|---|
| 882 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 883 |
</xsl:call-template> |
|---|
| 884 |
</xsl:when> |
|---|
| 885 |
<xsl:otherwise> |
|---|
| 886 |
<!-- Filter name not defined? Turn off filtering. --> |
|---|
| 887 |
<xsl:apply-templates select="event" mode="calendarLayout"> |
|---|
| 888 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 889 |
</xsl:apply-templates> |
|---|
| 890 |
</xsl:otherwise> |
|---|
| 891 |
</xsl:choose> |
|---|
| 892 |
</xsl:when> |
|---|
| 893 |
<xsl:otherwise> |
|---|
| 894 |
<xsl:apply-templates select="event" mode="calendarLayout"> |
|---|
| 895 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 896 |
</xsl:apply-templates> |
|---|
| 897 |
</xsl:otherwise> |
|---|
| 898 |
</xsl:choose> |
|---|
| 899 |
</ul> |
|---|
| 900 |
</xsl:if> |
|---|
| 901 |
</td> |
|---|
| 902 |
</xsl:if> |
|---|
| 903 |
</xsl:for-each> |
|---|
| 904 |
</tr> |
|---|
| 905 |
</table> |
|---|
| 906 |
</xsl:template> |
|---|
| 907 |
|
|---|
| 908 |
<!--==== MONTH CALENDAR VIEW ====--> |
|---|
| 909 |
<xsl:template name="monthView"> |
|---|
| 910 |
<table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"> |
|---|
| 911 |
<tr> |
|---|
| 912 |
<xsl:for-each select="/bedework/daynames/val"> |
|---|
| 913 |
<th class="dayHeading"><xsl:value-of select="."/></th> |
|---|
| 914 |
</xsl:for-each> |
|---|
| 915 |
</tr> |
|---|
| 916 |
<xsl:for-each select="/bedework/eventscalendar/year/month/week"> |
|---|
| 917 |
<tr> |
|---|
| 918 |
<xsl:for-each select="day"> |
|---|
| 919 |
<xsl:variable name="dayPos" select="position()"/> |
|---|
| 920 |
<xsl:choose> |
|---|
| 921 |
<xsl:when test="filler='true'"> |
|---|
| 922 |
<td class="filler"> </td> |
|---|
| 923 |
</xsl:when> |
|---|
| 924 |
<xsl:otherwise> |
|---|
| 925 |
<td> |
|---|
| 926 |
<xsl:if test="/bedework/now/date = date"> |
|---|
| 927 |
<xsl:attribute name="class">today</xsl:attribute> |
|---|
| 928 |
</xsl:if> |
|---|
| 929 |
<xsl:variable name="dayDate" select="date"/> |
|---|
| 930 |
<xsl:choose> |
|---|
| 931 |
<xsl:when test="/bedework/appvar/key = 'filter'"> |
|---|
| 932 |
<xsl:variable name="filterName" select="substring-before(/bedework/appvar[key='filter']/value,':')"/> |
|---|
| 933 |
<xsl:variable name="filterVal" select="substring-after(/bedework/appvar[key='filter']/value,':')"/> |
|---|
| 934 |
<!-- Define filters here: --> |
|---|
| 935 |
<xsl:choose> |
|---|
| 936 |
<xsl:when test="$filterName = 'grpAndCats'"> |
|---|
| 937 |
<xsl:variable name="group" select="substring-before($filterVal, '~')" /> |
|---|
| 938 |
<xsl:variable name="cats" select="substring-after($filterVal, '~')" /> |
|---|
| 939 |
<a href="{$bwCacheHostUrl}/v1.0/genFeedPeriod/day/{dayDate}/grid-html/{$group}/{$cats}"> |
|---|
| 940 |
<xsl:value-of select="value"/> |
|---|
| 941 |
</a> |
|---|
| 942 |
</xsl:when> |
|---|
| 943 |
<xsl:otherwise> |
|---|
| 944 |
<!-- Filter name not defined? Turn off filtering. --> |
|---|
| 945 |
<a href="{$bwCacheHostUrl}/v1.0/genFeedPeriod/day/{$dayDate}/grid-html/all/all"> |
|---|
| 946 |
<xsl:value-of select="value"/> |
|---|
| 947 |
</a> |
|---|
| 948 |
</xsl:otherwise> |
|---|
| 949 |
</xsl:choose> |
|---|
| 950 |
</xsl:when> |
|---|
| 951 |
<xsl:otherwise> |
|---|
| 952 |
<a href="{$bwCacheHostUrl}/v1.0/genFeedPeriod/day/{$dayDate}/grid-html/all/all"> |
|---|
| 953 |
<xsl:value-of select="value"/> |
|---|
| 954 |
</a> |
|---|
| 955 |
</xsl:otherwise> |
|---|
| 956 |
</xsl:choose> |
|---|
| 957 |
<xsl:if test="event"> |
|---|
| 958 |
<ul> |
|---|
| 959 |
<xsl:choose> |
|---|
| 960 |
<xsl:when test="/bedework/appvar/key = 'filter'"> |
|---|
| 961 |
<xsl:variable name="filterName" select="substring-before(/bedework/appvar[key='filter']/value,':')"/> |
|---|
| 962 |
<xsl:variable name="filterVal" select="substring-after(/bedework/appvar[key='filter']/value,':')"/> |
|---|
| 963 |
<!-- Define filters here: --> |
|---|
| 964 |
<xsl:choose> |
|---|
| 965 |
<xsl:when test="$filterName = 'grpAndCats'"> |
|---|
| 966 |
<xsl:call-template name="processGrpAndCats"> |
|---|
| 967 |
<xsl:with-param name="list" select="$filterVal"/> |
|---|
| 968 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 969 |
</xsl:call-template> |
|---|
| 970 |
</xsl:when> |
|---|
| 971 |
<xsl:otherwise> |
|---|
| 972 |
<!-- Filter name not defined? Turn off filtering. --> |
|---|
| 973 |
<xsl:apply-templates select="event" mode="calendarLayout"> |
|---|
| 974 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 975 |
</xsl:apply-templates> |
|---|
| 976 |
</xsl:otherwise> |
|---|
| 977 |
</xsl:choose> |
|---|
| 978 |
</xsl:when> |
|---|
| 979 |
<xsl:otherwise> |
|---|
| 980 |
<xsl:apply-templates select="event" mode="calendarLayout"> |
|---|
| 981 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 982 |
</xsl:apply-templates> |
|---|
| 983 |
</xsl:otherwise> |
|---|
| 984 |
</xsl:choose> |
|---|
| 985 |
</ul> |
|---|
| 986 |
</xsl:if> |
|---|
| 987 |
</td> |
|---|
| 988 |
</xsl:otherwise> |
|---|
| 989 |
</xsl:choose> |
|---|
| 990 |
</xsl:for-each> |
|---|
| 991 |
</tr> |
|---|
| 992 |
</xsl:for-each> |
|---|
| 993 |
</table> |
|---|
| 994 |
</xsl:template> |
|---|
| 995 |
|
|---|
| 996 |
<!--== EVENTS IN THE CALENDAR GRID ==--> |
|---|
| 997 |
<xsl:template match="event" mode="calendarLayout"> |
|---|
| 998 |
<xsl:param name="dayPos"/> |
|---|
| 999 |
<xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| 1000 |
<xsl:variable name="guid" select="guid"/> |
|---|
| 1001 |
<xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| 1002 |
<xsl:variable name="eventClass"> |
|---|
| 1003 |
<xsl:choose> |
|---|
| 1004 |
<!-- Special styles for the month grid --> |
|---|
| 1005 |
<xsl:when test="status='CANCELLED'">eventCancelled</xsl:when> |
|---|
| 1006 |
<xsl:when test="status='TENTATIVE'">eventTentative</xsl:when> |
|---|
| 1007 |
<!-- Default alternating colors for all standard events --> |
|---|
| 1008 |
<xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when> |
|---|
| 1009 |
<xsl:otherwise>eventLinkB</xsl:otherwise> |
|---|
| 1010 |
</xsl:choose> |
|---|
| 1011 |
</xsl:variable> |
|---|
| 1012 |
<!-- Subscription styles. |
|---|
| 1013 |
These are set in the add/modify subscription forms in the admin client; |
|---|
| 1014 |
if present, these override the background-color set by eventClass. The |
|---|
| 1015 |
subscription styles should not be used for canceled events (tentative is ok). --> |
|---|
| 1016 |
<xsl:variable name="subscriptionClass"> |
|---|
| 1017 |
<xsl:if test="status != 'CANCELLED'"> |
|---|
| 1018 |
<xsl:apply-templates select="categories" mode="customEventColor"/> |
|---|
| 1019 |
</xsl:if> |
|---|
| 1020 |
</xsl:variable> |
|---|
| 1021 |
<li> |
|---|
| 1022 |
<!-- <a href="{$eventView}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" class="{$eventClass} {$subscriptionClass}"> --> |
|---|
| 1023 |
<a href="{$bwCacheHostUrl}/v1.0/event/list-html/{$recurrenceId}/{$guid}" class="{$eventClass} {$subscriptionClass}"> |
|---|
| 1024 |
<xsl:if test="status='CANCELLED'"><xsl:copy-of select="$bwStr-EvCG-CanceledColon"/><xsl:text> </xsl:text></xsl:if> |
|---|
| 1025 |
<xsl:choose> |
|---|
| 1026 |
<xsl:when test="start/shortdate != ../shortdate"> |
|---|
| 1027 |
<xsl:copy-of select="$bwStr-EvCG-Cont"/> |
|---|
| 1028 |
</xsl:when> |
|---|
| 1029 |
<xsl:when test="start/allday = 'false'"> |
|---|
| 1030 |
<xsl:value-of select="start/time"/>: |
|---|
| 1031 |
</xsl:when> |
|---|
| 1032 |
<xsl:otherwise> |
|---|
| 1033 |
<xsl:copy-of select="$bwStr-EvCG-AllDayColon"/> |
|---|
| 1034 |
</xsl:otherwise> |
|---|
| 1035 |
</xsl:choose> |
|---|
| 1036 |
<xsl:value-of select="summary"/> |
|---|
| 1037 |
<xsl:variable name="eventTipClass"> |
|---|
| 1038 |
<xsl:choose> |
|---|
| 1039 |
<xsl:when test="$dayPos > 5">eventTipReverse</xsl:when> |
|---|
| 1040 |
<xsl:otherwise>eventTip</xsl:otherwise> |
|---|
| 1041 |
</xsl:choose> |
|---|
| 1042 |
</xsl:variable> |
|---|
| 1043 |
<span class="{$eventTipClass}"> |
|---|
| 1044 |
<xsl:if test="status='CANCELLED'"><span class="eventTipStatusCancelled"><xsl:copy-of select="$bwStr-EvCG-CanceledColon"/></span></xsl:if> |
|---|
| 1045 |
<xsl:if test="status='TENTATIVE'"><span class="eventTipStatusTentative"><xsl:copy-of select="$bwStr-EvCG-Tentative"/></span></xsl:if> |
|---|
| 1046 |
<strong><xsl:value-of select="summary"/></strong><br/> |
|---|
| 1047 |
<xsl:copy-of select="$bwStr-EvCG-Time"/> |
|---|
| 1048 |
<xsl:choose> |
|---|
| 1049 |
<xsl:when test="start/allday = 'true'"> |
|---|
| 1050 |
<xsl:copy-of select="$bwStr-EvCG-AllDay"/> |
|---|
| 1051 |
</xsl:when> |
|---|
| 1052 |
<xsl:otherwise> |
|---|
| 1053 |
<xsl:if test="start/shortdate != ../shortdate"> |
|---|
| 1054 |
<xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> |
|---|
| 1055 |
<xsl:text> </xsl:text> |
|---|
| 1056 |
</xsl:if> |
|---|
| 1057 |
<xsl:value-of select="start/time"/> |
|---|
| 1058 |
<xsl:if test="(start/time != end/time) or (start/shortdate != end/shortdate)"> |
|---|
| 1059 |
- |
|---|
| 1060 |
<xsl:if test="end/shortdate != ../shortdate"> |
|---|
| 1061 |
<xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> |
|---|
| 1062 |
<xsl:text> </xsl:text> |
|---|
| 1063 |
</xsl:if> |
|---|
| 1064 |
<xsl:value-of select="end/time"/> |
|---|
| 1065 |
</xsl:if> |
|---|
| 1066 |
</xsl:otherwise> |
|---|
| 1067 |
</xsl:choose><br/> |
|---|
| 1068 |
<xsl:if test="location/address"> |
|---|
| 1069 |
<xsl:copy-of select="$bwStr-EvCG-Location"/><xsl:text> </xsl:text><xsl:value-of select="location/address"/><br/> |
|---|
| 1070 |
</xsl:if> |
|---|
| 1071 |
<xsl:if test="xproperties/X-BEDEWORK-ALIAS"> |
|---|
| 1072 |
<xsl:copy-of select="$bwStr-EvCG-TopicalArea"/> |
|---|
| 1073 |
<xsl:for-each select="xproperties/X-BEDEWORK-ALIAS"> |
|---|
| 1074 |
<xsl:call-template name="substring-afterLastInstanceOf"> |
|---|
| 1075 |
<xsl:with-param name="string" select="values/text"/> |
|---|
| 1076 |
<xsl:with-param name="char">/</xsl:with-param> |
|---|
| 1077 |
</xsl:call-template> |
|---|
| 1078 |
<xsl:if test="position()!=last()">, </xsl:if> |
|---|
| 1079 |
</xsl:for-each> |
|---|
| 1080 |
</xsl:if> |
|---|
| 1081 |
</span> |
|---|
| 1082 |
</a> |
|---|
| 1083 |
</li> |
|---|
| 1084 |
</xsl:template> |
|---|
| 1085 |
|
|---|
| 1086 |
<xsl:template match="categories" mode="customEventColor"> |
|---|
| 1087 |
<!-- Set custom color schemes here. |
|---|
| 1088 |
This template looks at the categories found in the event and |
|---|
| 1089 |
returns a color class for use with the "subscriptionClass" variable. |
|---|
| 1090 |
The classes suggested below come from bwColors.css found in the bedework-common directory. --> |
|---|
| 1091 |
<xsl:choose> |
|---|
| 1092 |
<!-- |
|---|
| 1093 |
<xsl:when test="category/value = 'Athletics'">bwltpurple</xsl:when> |
|---|
| 1094 |
<xsl:when test="category/value = 'Arts'">bwltsalmon</xsl:when> |
|---|
| 1095 |
--> |
|---|
| 1096 |
<xsl:otherwise></xsl:otherwise> <!-- do nothing --> |
|---|
| 1097 |
</xsl:choose> |
|---|
| 1098 |
</xsl:template> |
|---|
| 1099 |
|
|---|
| 1100 |
<!--==== YEAR VIEW ====--> |
|---|
| 1101 |
<xsl:template name="yearView"> |
|---|
| 1102 |
<table id="yearCalendarTable" border="0" cellpadding="0" cellspacing="0"> |
|---|
| 1103 |
<tr> |
|---|
| 1104 |
<xsl:apply-templates select="/bedework/eventscalendar/year/month[position() <= 3]"/> |
|---|
| 1105 |
</tr> |
|---|
| 1106 |
<tr> |
|---|
| 1107 |
<xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() > 3) and (position() <= 6)]"/> |
|---|
| 1108 |
</tr> |
|---|
| 1109 |
<tr> |
|---|
| 1110 |
<xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() > 6) and (position() <= 9)]"/> |
|---|
| 1111 |
</tr> |
|---|
| 1112 |
<tr> |
|---|
| 1113 |
<xsl:apply-templates select="/bedework/eventscalendar/year/month[position() > 9]"/> |
|---|
| 1114 |
</tr> |
|---|
| 1115 |
</table> |
|---|
| 1116 |
</xsl:template> |
|---|
| 1117 |
|
|---|
| 1118 |
<!-- year view month tables --> |
|---|
| 1119 |
<xsl:template match="month"> |
|---|
| 1120 |
<td> |
|---|
| 1121 |
<table class="yearViewMonthTable" border="0" cellpadding="0" cellspacing="0"> |
|---|
| 1122 |
<tr> |
|---|
| 1123 |
<td colspan="8" class="monthName"> |
|---|
| 1124 |
<xsl:variable name="firstDayOfMonth" select="week/day/date"/> |
|---|
| 1125 |
<a href="{$bwCacheHostUrl}/v1.0/v1.0/genFeedPeriod/month/{$firstDayOfMonth}/grid-html/all/all"> |
|---|
| 1126 |
<!-- <a href="{$setViewPeriod}&viewType=monthView&date={$firstDayOfMonth}"> --> |
|---|
| 1127 |
<xsl:value-of select="longname"/> |
|---|
| 1128 |
</a> |
|---|
| 1129 |
</td> |
|---|
| 1130 |
</tr> |
|---|
| 1131 |
<tr> |
|---|
| 1132 |
<th> </th> |
|---|
| 1133 |
<xsl:for-each select="/bedework/shortdaynames/val"> |
|---|
| 1134 |
<th><xsl:value-of select="."/></th> |
|---|
| 1135 |
</xsl:for-each> |
|---|
| 1136 |
</tr> |
|---|
| 1137 |
<xsl:for-each select="week"> |
|---|
| 1138 |
<tr> |
|---|
| 1139 |
<td class="weekCell"> |
|---|
| 1140 |
<xsl:variable name="firstDayOfWeek" select="day/date"/> |
|---|
| 1141 |
<a href="{$bwCacheHostUrl}/v1.0/genFeedPeriod/week/{$firstDayOfWeek}/grid-html/all/all"> |
|---|
| 1142 |
<!-- <a href="{$setViewPeriod}&viewType=weekView&date={$firstDayOfWeek}"> --> |
|---|
| 1143 |
<xsl:value-of select="value"/> |
|---|
| 1144 |
</a> |
|---|
| 1145 |
</td> |
|---|
| 1146 |
<xsl:for-each select="day"> |
|---|
| 1147 |
<xsl:choose> |
|---|
| 1148 |
<xsl:when test="filler='true'"> |
|---|
| 1149 |
<td class="filler"> </td> |
|---|
| 1150 |
</xsl:when> |
|---|
| 1151 |
<xsl:otherwise> |
|---|
| 1152 |
<td> |
|---|
| 1153 |
<xsl:if test="/bedework/now/date = date"> |
|---|
| 1154 |
<xsl:attribute name="class">today</xsl:attribute> |
|---|
| 1155 |
</xsl:if> |
|---|
| 1156 |
<xsl:variable name="dayDate" select="date"/> |
|---|
| 1157 |
<a href="{$bwCacheHostUrl}/v1.0/genFeedPeriod/day/{$dayDate}/grid-html/all/all"> |
|---|
| 1158 |
<!-- <a href="{$setViewPeriod}&viewType=dayView&date={$dayDate}"> --> |
|---|
| 1159 |
<xsl:attribute name="class">today</xsl:attribute> |
|---|
| 1160 |
<xsl:value-of select="value"/> |
|---|
| 1161 |
</a> |
|---|
| 1162 |
</td> |
|---|
| 1163 |
</xsl:otherwise> |
|---|
| 1164 |
</xsl:choose> |
|---|
| 1165 |
</xsl:for-each> |
|---|
| 1166 |
</tr> |
|---|
| 1167 |
</xsl:for-each> |
|---|
| 1168 |
</table> |
|---|
| 1169 |
</td> |
|---|
| 1170 |
</xsl:template> |
|---|
| 1171 |
|
|---|
| 1172 |
<!--==== CALENDARS ====--> |
|---|
| 1173 |
|
|---|
| 1174 |
<!-- calendar export page --> |
|---|
| 1175 |
<xsl:template match="currentCalendar" mode="export"> |
|---|
| 1176 |
<h2 class="bwStatusConfirmed"><xsl:copy-of select="$bwStr-Cals-ExportCals"/></h2> |
|---|
| 1177 |
<div id="export"> |
|---|
| 1178 |
<p> |
|---|
| 1179 |
<strong><xsl:copy-of select="$bwStr-Cals-CalendarToExport"/></strong> |
|---|
| 1180 |
</p> |
|---|
| 1181 |
<div class="indent"> |
|---|
| 1182 |
<xsl:copy-of select="$bwStr-Cals-Name"/><xsl:text> </xsl:text><strong><em><xsl:value-of select="name"/></em></strong><br/> |
|---|
| 1183 |
<xsl:copy-of select="$bwStr-Cals-Path"/><xsl:text> </xsl:text><xsl:value-of select="path"/> |
|---|
| 1184 |
</div> |
|---|
| 1185 |
<p> |
|---|
| 1186 |
<strong><xsl:copy-of select="$bwStr-Cals-EventDateLimits"/></strong> |
|---|
| 1187 |
</p> |
|---|
| 1188 |
<form name="exportCalendarForm" id="exportCalendarForm" action="{$export}" method="post"> |
|---|
| 1189 |
<input type="hidden" name="calPath"> |
|---|
| 1190 |
<xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute> |
|---|
| 1191 |
</input> |
|---|
| 1192 |
<!-- fill these on submit --> |
|---|
| 1193 |
<input type="hidden" name="eventStartDate.year" value=""/> |
|---|
| 1194 |
<input type="hidden" name="eventStartDate.month" value=""/> |
|---|
| 1195 |
<input type="hidden" name="eventStartDate.day" value=""/> |
|---|
| 1196 |
<input type="hidden" name="eventEndDate.year" value=""/> |
|---|
| 1197 |
<input type="hidden" name="eventEndDate.month" value=""/> |
|---|
| 1198 |
<input type="hidden" name="eventEndDate.day" value=""/> |
|---|
| 1199 |
<!-- static fields --> |
|---|
| 1200 |
<input type="hidden" name="nocache" value="no"/> |
|---|
| 1201 |
<input type="hidden" name="contentName"> |
|---|
| 1202 |
<xsl:attribute name="value"><xsl:value-of select="name"/>.ics</xsl:attribute> |
|---|
| 1203 |
</input> |
|---|
| 1204 |
<!-- visible fields --> |
|---|
| 1205 |
<input type="radio" name="dateLimits" value="active" checked="checked" onclick="changeClass('exportDateRange','invisible')"/><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-Cals-TodayForward"/> |
|---|
| 1206 |
<input type="radio" name="dateLimits" value="none" onclick="changeClass('exportDateRange','invisible')"/><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-Cals-AllDates"/> |
|---|
| 1207 |
<input type="radio" name="dateLimits" value="limited" onclick="changeClass('exportDateRange','visible')"/><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-Cals-DateRange"/> |
|---|
| 1208 |
<div id="exportDateRange" class="invisible"> |
|---|
| 1209 |
<xsl:copy-of select="$bwStr-Cals-Start"/><xsl:text> </xsl:text><input type="text" name="bwExportCalendarWidgetStartDate" id="bwExportCalendarWidgetStartDate" size="10"/> |
|---|
| 1210 |
<span id="bwExportEndField">E<xsl:copy-of select="$bwStr-Cals-End"/><xsl:text> </xsl:text><input type="text" name="bwExportCalendarWidgetEndDate" id="bwExportCalendarWidgetEndDate" size="10"/></span> |
|---|
| 1211 |
</div> |
|---|
| 1212 |
<p><input type="submit" value="{$bwStr-Cals-Export}" class="bwWidgetSubmit" onclick="fillExportFields(this.form)"/></p> |
|---|
| 1213 |
</form> |
|---|
| 1214 |
</div> |
|---|
| 1215 |
</xsl:template> |
|---|
| 1216 |
|
|---|
| 1217 |
<xsl:template name="processGrpAndCats"> |
|---|
| 1218 |
<xsl:param name="list" /> |
|---|
| 1219 |
<xsl:param name="dayPos" /> |
|---|
| 1220 |
<xsl:variable name="group" select="substring-before($list, '~')" /> |
|---|
| 1221 |
<xsl:variable name="remaining" select="substring-after($list, '~')" /> |
|---|
| 1222 |
<xsl:call-template name="processCategories"> |
|---|
| 1223 |
<xsl:with-param name="group" select="$group" /> |
|---|
| 1224 |
<xsl:with-param name="list" select="$remaining" /> |
|---|
| 1225 |
<xsl:with-param name="dayPos" select="$remaining" /> |
|---|
| 1226 |
</xsl:call-template> |
|---|
| 1227 |
</xsl:template> |
|---|
| 1228 |
|
|---|
| 1229 |
<xsl:template name="processCategories"> |
|---|
| 1230 |
<xsl:param name="group" /> |
|---|
| 1231 |
<xsl:param name="list" /> |
|---|
| 1232 |
<xsl:param name="dayPos" /> |
|---|
| 1233 |
<xsl:choose> |
|---|
| 1234 |
<xsl:when test="contains($list, '~')"> |
|---|
| 1235 |
<!-- Grab the first off the list and process --> |
|---|
| 1236 |
<xsl:variable name="catid" select="substring-before($list, '~')" /> |
|---|
| 1237 |
<xsl:variable name="remaining" select="substring-after($list, '~')" /> |
|---|
| 1238 |
<xsl:choose> |
|---|
| 1239 |
<xsl:when test="$group = 'all'"> |
|---|
| 1240 |
<xsl:apply-templates select="event[categories/category/id = $catid]"> |
|---|
| 1241 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 1242 |
</xsl:apply-templates> |
|---|
| 1243 |
</xsl:when> |
|---|
| 1244 |
<xsl:otherwise> |
|---|
| 1245 |
<xsl:apply-templates select="event[categories/category/id = $catid]"> |
|---|
| 1246 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 1247 |
</xsl:apply-templates> |
|---|
| 1248 |
</xsl:otherwise> |
|---|
| 1249 |
</xsl:choose> |
|---|
| 1250 |
|
|---|
| 1251 |
<!-- now use recursion to process the remaining categories --> |
|---|
| 1252 |
<xsl:call-template name="processCategories"> |
|---|
| 1253 |
<xsl:with-param name="list" select="$remaining" /> |
|---|
| 1254 |
</xsl:call-template> |
|---|
| 1255 |
</xsl:when> |
|---|
| 1256 |
<xsl:otherwise> |
|---|
| 1257 |
<!-- No more tildes, so this is the last category. Process it --> |
|---|
| 1258 |
<xsl:choose> |
|---|
| 1259 |
<xsl:when test="$group = 'all'"> |
|---|
| 1260 |
<xsl:choose> |
|---|
| 1261 |
<xsl:when test="$list = 'all'"> |
|---|
| 1262 |
<xsl:apply-templates select="event"> |
|---|
| 1263 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 1264 |
</xsl:apply-templates> |
|---|
| 1265 |
</xsl:when> |
|---|
| 1266 |
<xsl:otherwise> |
|---|
| 1267 |
<xsl:apply-templates select="event[categories/category/id = $list]" mode="calendarLayout"> |
|---|
| 1268 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 1269 |
</xsl:apply-templates> |
|---|
| 1270 |
</xsl:otherwise> |
|---|
| 1271 |
</xsl:choose> |
|---|
| 1272 |
</xsl:when> |
|---|
| 1273 |
<xsl:otherwise> |
|---|
| 1274 |
<xsl:choose> |
|---|
| 1275 |
<xsl:when test="$list = 'all'"> |
|---|
| 1276 |
<xsl:apply-templates select="event[creator = $group]" /> |
|---|
| 1277 |
</xsl:when> |
|---|
| 1278 |
<xsl:otherwise> |
|---|
| 1279 |
<xsl:choose> |
|---|
| 1280 |
<xsl:when test="event/creator = $group"> |
|---|
| 1281 |
<xsl:apply-templates select="event[categories/category/id = $list]" mode="calendarLayout"> |
|---|
| 1282 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 1283 |
</xsl:apply-templates> |
|---|
| 1284 |
</xsl:when> |
|---|
| 1285 |
</xsl:choose> |
|---|
| 1286 |
</xsl:otherwise> |
|---|
| 1287 |
</xsl:choose> |
|---|
| 1288 |
</xsl:otherwise> |
|---|
| 1289 |
</xsl:choose> |
|---|
| 1290 |
</xsl:otherwise> |
|---|
| 1291 |
</xsl:choose> |
|---|
| 1292 |
</xsl:template> |
|---|
| 1293 |
|
|---|
| 1294 |
</xsl:stylesheet> |
|---|