| 1 |
<?xml version="1.0" encoding="UTF-8"?> |
|---|
| 2 |
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> |
|---|
| 3 |
<xsl:output |
|---|
| 4 |
method="html" |
|---|
| 5 |
indent="yes" |
|---|
| 6 |
media-type="text/html" |
|---|
| 7 |
doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" |
|---|
| 8 |
doctype-system="http://www.w3.org/TR/html4/loose.dtd" |
|---|
| 9 |
standalone="yes" |
|---|
| 10 |
/> |
|---|
| 11 |
|
|---|
| 12 |
<!-- ========================================================= |
|---|
| 13 |
|
|---|
| 14 |
DEMONSTRATION CALENDAR STYLESHEET |
|---|
| 15 |
|
|---|
| 16 |
This stylesheet is devoid of school branding. It is a good |
|---|
| 17 |
starting point for development of a customized calendar. |
|---|
| 18 |
|
|---|
| 19 |
For detailed instructions on how to work with the XSLT |
|---|
| 20 |
stylesheets included with this distribution, please see the |
|---|
| 21 |
helper web site found at |
|---|
| 22 |
http://localhost:8080/cal/info/designhelp/ |
|---|
| 23 |
|
|---|
| 24 |
(you can also get it from the source at ../info/designhelp/) |
|---|
| 25 |
|
|---|
| 26 |
=============================================================== --> |
|---|
| 27 |
|
|---|
| 28 |
<!-- ================================= --> |
|---|
| 29 |
<!-- DEMO PUBLIC CALENDAR STYLESHEET --> |
|---|
| 30 |
<!-- ================================= --> |
|---|
| 31 |
|
|---|
| 32 |
<!-- DEFINE INCLUDES --> |
|---|
| 33 |
<xsl:include href="errors.xsl"/> |
|---|
| 34 |
|
|---|
| 35 |
<!-- DEFINE GLOBAL CONSTANTS --> |
|---|
| 36 |
|
|---|
| 37 |
<!-- URL of the XSL template directory --> |
|---|
| 38 |
<!-- The approot is an appropriate place to put |
|---|
| 39 |
included stylesheets and xml fragments. These are generally |
|---|
| 40 |
referenced relatively (like errors.xsl and messages.xsl above); |
|---|
| 41 |
this variable is here for your convenience if you choose to |
|---|
| 42 |
reference it explicitly. It is not used in this stylesheet, however, |
|---|
| 43 |
and can be safely removed if you so choose. --> |
|---|
| 44 |
<xsl:variable name="appRoot" select="/bedework/approot"/> |
|---|
| 45 |
|
|---|
| 46 |
<!-- URL of html resources (images, css, other html); by default this is |
|---|
| 47 |
set to the application root --> |
|---|
| 48 |
<xsl:variable name="resourcesRoot" select="/bedework/approot"/> |
|---|
| 49 |
|
|---|
| 50 |
<!-- Properly encoded prefixes to the application actions; use these to build |
|---|
| 51 |
urls; allows the application to be used without cookies or within a portal. --> |
|---|
| 52 |
<xsl:variable name="setup" select="/bedework/urlPrefixes/setup"/> |
|---|
| 53 |
<xsl:variable name="setSelection" select="/bedework/urlPrefixes/setSelection"/> |
|---|
| 54 |
<xsl:variable name="fetchPublicCalendars" select="/bedework/urlPrefixes/fetchPublicCalendars"/> |
|---|
| 55 |
<xsl:variable name="setViewPeriod" select="/bedework/urlPrefixes/setViewPeriod"/> |
|---|
| 56 |
<xsl:variable name="eventView" select="/bedework/urlPrefixes/eventView"/> |
|---|
| 57 |
<xsl:variable name="addEventRef" select="/bedework/urlPrefixes/addEventRef"/> |
|---|
| 58 |
<xsl:variable name="export" select="/bedework/urlPrefixes/export"/> |
|---|
| 59 |
<xsl:variable name="mailEvent" select="/bedework/urlPrefixes/mailEvent"/> |
|---|
| 60 |
<xsl:variable name="showPage" select="/bedework/urlPrefixes/showPage"/> |
|---|
| 61 |
<xsl:variable name="stats" select="/bedework/urlPrefixes/stats"/> |
|---|
| 62 |
|
|---|
| 63 |
<!-- Other generally useful global variables --> |
|---|
| 64 |
<xsl:variable name="privateCal">/ucal</xsl:variable> |
|---|
| 65 |
<xsl:variable name="prevdate" select="/bedework/previousdate"/> |
|---|
| 66 |
<xsl:variable name="nextdate" select="/bedework/nextdate"/> |
|---|
| 67 |
<xsl:variable name="curdate" select="/bedework/currentdate/date"/> |
|---|
| 68 |
<xsl:variable name="skin">default</xsl:variable> |
|---|
| 69 |
|
|---|
| 70 |
<!--========= BEGIN DEPRECATED VARIABLES =========--> |
|---|
| 71 |
<!-- URL of the web application - includes host, port, and web context. This |
|---|
| 72 |
value was originally prepended to all URLs generated in this stylesheet |
|---|
| 73 |
but will probably be deprecated in favor of relative references |
|---|
| 74 |
<xsl:variable name="urlPrefix" select="/bedework/urlprefix"/> --> |
|---|
| 75 |
<!--========= END DEPRECATED VARIABLES =========--> |
|---|
| 76 |
|
|---|
| 77 |
<!-- MAIN TEMPLATE --> |
|---|
| 78 |
<xsl:template match="/"> |
|---|
| 79 |
<html lang="en"> |
|---|
| 80 |
<head> |
|---|
| 81 |
<title>Bedework Events Calendar</title> |
|---|
| 82 |
<link rel="stylesheet" type="text/css" href="{$resourcesRoot}/default/default/common.css" /> |
|---|
| 83 |
<link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> |
|---|
| 84 |
<xsl:choose> |
|---|
| 85 |
<xsl:when test="/bedework/appvar[key='style']/value='red'"> |
|---|
| 86 |
<link rel="stylesheet" href="{$resourcesRoot}/default/default/red.css"/> |
|---|
| 87 |
</xsl:when> |
|---|
| 88 |
<xsl:when test="/bedework/appvar[key='style']/value='green'"> |
|---|
| 89 |
<link rel="stylesheet" href="{$resourcesRoot}/default/default/green.css"/> |
|---|
| 90 |
</xsl:when> |
|---|
| 91 |
<xsl:otherwise> |
|---|
| 92 |
<link rel="stylesheet" href="{$resourcesRoot}/default/default/blue.css"/> |
|---|
| 93 |
</xsl:otherwise> |
|---|
| 94 |
</xsl:choose> |
|---|
| 95 |
<link rel="icon" type="image/ico" href="{$resourcesRoot}/images/bedework.ico" /> |
|---|
| 96 |
</head> |
|---|
| 97 |
<body> |
|---|
| 98 |
<xsl:call-template name="headBar"/> |
|---|
| 99 |
<xsl:if test="/bedework/error"> |
|---|
| 100 |
<div id="errors"> |
|---|
| 101 |
<xsl:apply-templates select="/bedework/error"/> |
|---|
| 102 |
</div> |
|---|
| 103 |
</xsl:if> |
|---|
| 104 |
<xsl:call-template name="tabs"/> |
|---|
| 105 |
<xsl:call-template name="navigation"/> |
|---|
| 106 |
<xsl:choose> |
|---|
| 107 |
<xsl:when test="/bedework/page='event'"> |
|---|
| 108 |
<!-- show an event --> |
|---|
| 109 |
<xsl:apply-templates select="/bedework/event"/> |
|---|
| 110 |
</xsl:when> |
|---|
| 111 |
<xsl:when test="/bedework/page='showSysStats'"> |
|---|
| 112 |
<!-- show system stats --> |
|---|
| 113 |
<xsl:call-template name="stats"/> |
|---|
| 114 |
</xsl:when> |
|---|
| 115 |
<xsl:when test="/bedework/page='calendarList'"> |
|---|
| 116 |
<!-- show a list of all calendars --> |
|---|
| 117 |
<xsl:apply-templates select="/bedework/calendars"/> |
|---|
| 118 |
</xsl:when> |
|---|
| 119 |
<xsl:otherwise> |
|---|
| 120 |
<!-- otherwise, show the eventsCalendar --> |
|---|
| 121 |
<xsl:if test="/bedework/periodname!='Year'"> |
|---|
| 122 |
<xsl:call-template name="searchBar"/> |
|---|
| 123 |
</xsl:if> |
|---|
| 124 |
<!-- main eventCalendar content --> |
|---|
| 125 |
<xsl:choose> |
|---|
| 126 |
<xsl:when test="/bedework/periodname='Day'"> |
|---|
| 127 |
<xsl:call-template name="listView"/> |
|---|
| 128 |
</xsl:when> |
|---|
| 129 |
<xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> |
|---|
| 130 |
<xsl:choose> |
|---|
| 131 |
<xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> |
|---|
| 132 |
<xsl:call-template name="listView"/> |
|---|
| 133 |
</xsl:when> |
|---|
| 134 |
<xsl:otherwise> |
|---|
| 135 |
<xsl:call-template name="weekView"/> |
|---|
| 136 |
</xsl:otherwise> |
|---|
| 137 |
</xsl:choose> |
|---|
| 138 |
</xsl:when> |
|---|
| 139 |
<xsl:when test="/bedework/periodname='Month'"> |
|---|
| 140 |
<xsl:choose> |
|---|
| 141 |
<xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> |
|---|
| 142 |
<xsl:call-template name="listView"/> |
|---|
| 143 |
</xsl:when> |
|---|
| 144 |
<xsl:otherwise> |
|---|
| 145 |
<xsl:call-template name="monthView"/> |
|---|
| 146 |
</xsl:otherwise> |
|---|
| 147 |
</xsl:choose> |
|---|
| 148 |
</xsl:when> |
|---|
| 149 |
<xsl:otherwise> |
|---|
| 150 |
<xsl:call-template name="yearView"/> |
|---|
| 151 |
</xsl:otherwise> |
|---|
| 152 |
</xsl:choose> |
|---|
| 153 |
</xsl:otherwise> |
|---|
| 154 |
</xsl:choose> |
|---|
| 155 |
<!-- footer --> |
|---|
| 156 |
<xsl:call-template name="footer"/> |
|---|
| 157 |
</body> |
|---|
| 158 |
</html> |
|---|
| 159 |
</xsl:template> |
|---|
| 160 |
|
|---|
| 161 |
<!--==== HEADER TEMPLATES and NAVIGATION ====--> |
|---|
| 162 |
<!-- these templates are separated out for convenience and to simplify the default template --> |
|---|
| 163 |
|
|---|
| 164 |
<xsl:template name="headBar"> |
|---|
| 165 |
<h1 id="titleBar"> |
|---|
| 166 |
Bedework: Demonstration Calendar |
|---|
| 167 |
</h1> |
|---|
| 168 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="logoTable"> |
|---|
| 169 |
<tr> |
|---|
| 170 |
<td colspan="3" id="logoCell"><a href="http://www.bedework.org/"><img src="{$resourcesRoot}/images/bedeworkLogo.gif" width="292" height="75" border="0" alt="Bedework"/></a></td> |
|---|
| 171 |
<td colspan="2" id="schoolLinksCell"> |
|---|
| 172 |
<h2>Public Calendar</h2> |
|---|
| 173 |
<a href="{$privateCal}">Personal Calendar</a> | |
|---|
| 174 |
<a href="http://www.yourschoolhere.edu">School Home</a> | |
|---|
| 175 |
<a href="http://www.bedework.org/">Other Link</a> | |
|---|
| 176 |
<a href="http://helpdesk.rpi.edu/update.do?catcenterkey=51"> |
|---|
| 177 |
Example Calendar Help |
|---|
| 178 |
</a> |
|---|
| 179 |
</td> |
|---|
| 180 |
</tr> |
|---|
| 181 |
</table> |
|---|
| 182 |
<table id="curDateRangeTable" cellspacing="0"> |
|---|
| 183 |
<td class="sideBarOpenCloseIcon"> |
|---|
| 184 |
  |
|---|
| 185 |
<!-- |
|---|
| 186 |
we may choose to implement calendar selection in the public calendar |
|---|
| 187 |
using a sidebar; leave this comment here for now. |
|---|
| 188 |
<xsl:choose> |
|---|
| 189 |
<xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> |
|---|
| 190 |
<a href="?setappvar=sidebar(opened)"> |
|---|
| 191 |
<img alt="open sidebar" src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/> |
|---|
| 192 |
</a> |
|---|
| 193 |
</xsl:when> |
|---|
| 194 |
<xsl:otherwise> |
|---|
| 195 |
<a href="?setappvar=sidebar(closed)"> |
|---|
| 196 |
<img alt="close sidebar" src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/> |
|---|
| 197 |
</a> |
|---|
| 198 |
</xsl:otherwise> |
|---|
| 199 |
</xsl:choose>--> |
|---|
| 200 |
</td> |
|---|
| 201 |
<td class="date"> |
|---|
| 202 |
<xsl:choose> |
|---|
| 203 |
<xsl:when test="/bedework/page='event'"> |
|---|
| 204 |
Event Information |
|---|
| 205 |
</xsl:when> |
|---|
| 206 |
<xsl:when test="/bedework/page='showSysStats' or |
|---|
| 207 |
/bedework/page='calendars'"> |
|---|
| 208 |
  |
|---|
| 209 |
</xsl:when> |
|---|
| 210 |
<xsl:otherwise> |
|---|
| 211 |
<xsl:value-of select="/bedework/firstday/longdate"/> |
|---|
| 212 |
<xsl:if test="/bedework/periodname!='Day'"> |
|---|
| 213 |
- |
|---|
| 214 |
<xsl:value-of select="/bedework/lastday/longdate"/> |
|---|
| 215 |
</xsl:if> |
|---|
| 216 |
</xsl:otherwise> |
|---|
| 217 |
</xsl:choose> |
|---|
| 218 |
</td> |
|---|
| 219 |
<td class="rssPrint"> |
|---|
| 220 |
<a href="javascript:window.print()" title="print this view"> |
|---|
| 221 |
<img alt="print this view" src="{$resourcesRoot}/images/std-print-icon.gif" width="20" height="14" border="0"/> print |
|---|
| 222 |
</a> |
|---|
| 223 |
<a class="rss" href="{$setSelection}?setappvar=summaryMode(details)&skinName=rss" title="RSS feed">RSS</a> |
|---|
| 224 |
</td> |
|---|
| 225 |
</table> |
|---|
| 226 |
</xsl:template> |
|---|
| 227 |
|
|---|
| 228 |
<xsl:template name="tabs"> |
|---|
| 229 |
<xsl:choose> |
|---|
| 230 |
<xsl:when test="/bedework/page='eventscalendar'"> |
|---|
| 231 |
<table border="0" cellpadding="0" cellspacing="0" id="tabsTable"> |
|---|
| 232 |
<tr> |
|---|
| 233 |
<td> |
|---|
| 234 |
<xsl:choose> |
|---|
| 235 |
<xsl:when test="/bedework/periodname='Day'"> |
|---|
| 236 |
<a href="{$setViewPeriod}?viewType=dayView&date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-day-on.gif" width="91" height="20" border="0" alt="DAY"/></a> |
|---|
| 237 |
</xsl:when> |
|---|
| 238 |
<xsl:otherwise> |
|---|
| 239 |
<a href="{$setViewPeriod}?viewType=dayView&date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a> |
|---|
| 240 |
</xsl:otherwise> |
|---|
| 241 |
</xsl:choose> |
|---|
| 242 |
</td> |
|---|
| 243 |
<td> |
|---|
| 244 |
<xsl:choose> |
|---|
| 245 |
<xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> |
|---|
| 246 |
<a href="{$setViewPeriod}?viewType=weekView&date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-week-on.gif" width="92" height="20" border="0" alt="WEEK"/></a> |
|---|
| 247 |
</xsl:when> |
|---|
| 248 |
<xsl:otherwise> |
|---|
| 249 |
<a href="{$setViewPeriod}?viewType=weekView&date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> |
|---|
| 250 |
</xsl:otherwise> |
|---|
| 251 |
</xsl:choose> |
|---|
| 252 |
</td> |
|---|
| 253 |
<td> |
|---|
| 254 |
<xsl:choose> |
|---|
| 255 |
<xsl:when test="/bedework/periodname='Month'"> |
|---|
| 256 |
<a href="{$setViewPeriod}?viewType=monthView&date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-month-on.gif" width="90" height="20" border="0" alt="MONTH"/></a> |
|---|
| 257 |
</xsl:when> |
|---|
| 258 |
<xsl:otherwise> |
|---|
| 259 |
<a href="{$setViewPeriod}?viewType=monthView&date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> |
|---|
| 260 |
</xsl:otherwise> |
|---|
| 261 |
</xsl:choose> |
|---|
| 262 |
</td> |
|---|
| 263 |
<td> |
|---|
| 264 |
<xsl:choose> |
|---|
| 265 |
<xsl:when test="/bedework/periodname='Year'"> |
|---|
| 266 |
<a href="{$setViewPeriod}?viewType=yearView&date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-year-on.gif" width="92" height="20" border="0" alt="YEAR"/></a> |
|---|
| 267 |
</xsl:when> |
|---|
| 268 |
<xsl:otherwise> |
|---|
| 269 |
<a href="{$setViewPeriod}?viewType=yearView&date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> |
|---|
| 270 |
</xsl:otherwise> |
|---|
| 271 |
</xsl:choose> |
|---|
| 272 |
</td> |
|---|
| 273 |
<td class="centerCell"> |
|---|
| 274 |
 <!--<img src="{$resourcesRoot}/images/std-button-today.gif" width="46" height="17" border="0" alt="TODAY"/>--> |
|---|
| 275 |
</td> |
|---|
| 276 |
<td class="rightCell"> |
|---|
| 277 |
  |
|---|
| 278 |
</td> |
|---|
| 279 |
</tr> |
|---|
| 280 |
</table> |
|---|
| 281 |
</xsl:when> |
|---|
| 282 |
<xsl:otherwise> |
|---|
| 283 |
<table border="0" cellpadding="0" cellspacing="0" id="tabsTable"> |
|---|
| 284 |
<tr> |
|---|
| 285 |
<td> |
|---|
| 286 |
<a href="{$setViewPeriod}?viewType=dayView&date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a> |
|---|
| 287 |
</td> |
|---|
| 288 |
<td> |
|---|
| 289 |
<a href="{$setViewPeriod}?viewType=weekView&date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> |
|---|
| 290 |
</td> |
|---|
| 291 |
<td> |
|---|
| 292 |
<a href="{$setViewPeriod}?viewType=monthView&date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> |
|---|
| 293 |
</td> |
|---|
| 294 |
<td> |
|---|
| 295 |
<a href="{$setViewPeriod}?viewType=yearView&date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> |
|---|
| 296 |
</td> |
|---|
| 297 |
<td class="centerCell"> |
|---|
| 298 |
 <!--<img src="{$resourcesRoot}/images/std-button-today.gif" width="46" height="17" border="0" alt="TODAY"/>--> |
|---|
| 299 |
</td> |
|---|
| 300 |
<td class="rightCell"> |
|---|
| 301 |
  |
|---|
| 302 |
</td> |
|---|
| 303 |
</tr> |
|---|
| 304 |
</table> |
|---|
| 305 |
</xsl:otherwise> |
|---|
| 306 |
</xsl:choose> |
|---|
| 307 |
</xsl:template> |
|---|
| 308 |
|
|---|
| 309 |
<xsl:template name="navigation"> |
|---|
| 310 |
<table border="0" cellpadding="0" cellspacing="0" id="navigationBarTable"> |
|---|
| 311 |
<tr> |
|---|
| 312 |
<td class="leftCell"> |
|---|
| 313 |
<a id="prevViewPeriod" href="{$setViewPeriod}?date={$prevdate}"><img src="{$resourcesRoot}/images/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a> |
|---|
| 314 |
<a id="nextViewPeriod" href="{$setViewPeriod}?date={$nextdate}"><img src="{$resourcesRoot}/images/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a> |
|---|
| 315 |
<xsl:choose> |
|---|
| 316 |
<xsl:when test="/bedework/periodname='Year'"> |
|---|
| 317 |
<xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> |
|---|
| 318 |
</xsl:when> |
|---|
| 319 |
<xsl:when test="/bedework/periodname='Month'"> |
|---|
| 320 |
<xsl:value-of select="/bedework/firstday/monthname"/>, <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> |
|---|
| 321 |
</xsl:when> |
|---|
| 322 |
<xsl:when test="/bedework/periodname='Week'"> |
|---|
| 323 |
Week of <xsl:value-of select="substring-after(/bedework/firstday/longdate,', ')"/> |
|---|
| 324 |
</xsl:when> |
|---|
| 325 |
<xsl:otherwise> |
|---|
| 326 |
<xsl:value-of select="/bedework/firstday/longdate"/> |
|---|
| 327 |
</xsl:otherwise> |
|---|
| 328 |
</xsl:choose> |
|---|
| 329 |
</td> |
|---|
| 330 |
<td class="todayButton"> |
|---|
| 331 |
<a href="{$setViewPeriod}?viewType=todayView&date={$curdate}"> |
|---|
| 332 |
<img src="{$resourcesRoot}/images/std-button-today-off.gif" width="54" height="22" border="0" alt="Go to Today" align="left"/> |
|---|
| 333 |
</a> |
|---|
| 334 |
</td> |
|---|
| 335 |
<td align="right" class="gotoForm"> |
|---|
| 336 |
<form name="calForm" method="get" action="{$setViewPeriod}"> |
|---|
| 337 |
<table border="0" cellpadding="0" cellspacing="0"> |
|---|
| 338 |
<tr> |
|---|
| 339 |
<xsl:if test="/bedework/periodname!='Year'"> |
|---|
| 340 |
<td> |
|---|
| 341 |
<select name="viewStartDate.month"> |
|---|
| 342 |
<xsl:for-each select="/bedework/monthvalues/val"> |
|---|
| 343 |
<xsl:variable name="temp" select="."/> |
|---|
| 344 |
<xsl:variable name="pos" select="position()"/> |
|---|
| 345 |
<xsl:choose> |
|---|
| 346 |
<xsl:when test="/bedework/monthvalues[start=$temp]"> |
|---|
| 347 |
<option value="{$temp}" selected="selected"> |
|---|
| 348 |
<xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> |
|---|
| 349 |
</option> |
|---|
| 350 |
</xsl:when> |
|---|
| 351 |
<xsl:otherwise> |
|---|
| 352 |
<option value="{$temp}"> |
|---|
| 353 |
<xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> |
|---|
| 354 |
</option> |
|---|
| 355 |
</xsl:otherwise> |
|---|
| 356 |
</xsl:choose> |
|---|
| 357 |
</xsl:for-each> |
|---|
| 358 |
</select> |
|---|
| 359 |
</td> |
|---|
| 360 |
<xsl:if test="/bedework/periodname!='Month'"> |
|---|
| 361 |
<td> |
|---|
| 362 |
<select name="viewStartDate.day"> |
|---|
| 363 |
<xsl:for-each select="/bedework/dayvalues/val"> |
|---|
| 364 |
<xsl:variable name="temp" select="."/> |
|---|
| 365 |
<xsl:variable name="pos" select="position()"/> |
|---|
| 366 |
<xsl:choose> |
|---|
| 367 |
<xsl:when test="/bedework/dayvalues[start=$temp]"> |
|---|
| 368 |
<option value="{$temp}" selected="selected"> |
|---|
| 369 |
<xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> |
|---|
| 370 |
</option> |
|---|
| 371 |
</xsl:when> |
|---|
| 372 |
<xsl:otherwise> |
|---|
| 373 |
<option value="{$temp}"> |
|---|
| 374 |
<xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> |
|---|
| 375 |
</option> |
|---|
| 376 |
</xsl:otherwise> |
|---|
| 377 |
</xsl:choose> |
|---|
| 378 |
</xsl:for-each> |
|---|
| 379 |
</select> |
|---|
| 380 |
</td> |
|---|
| 381 |
</xsl:if> |
|---|
| 382 |
</xsl:if> |
|---|
| 383 |
<td> |
|---|
| 384 |
<xsl:variable name="temp" select="/bedework/yearvalues/start"/> |
|---|
| 385 |
<input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/> |
|---|
| 386 |
</td> |
|---|
| 387 |
<td> |
|---|
| 388 |
<input name="submit" type="submit" value="go"/> |
|---|
| 389 |
</td> |
|---|
| 390 |
</tr> |
|---|
| 391 |
</table> |
|---|
| 392 |
</form> |
|---|
| 393 |
</td> |
|---|
| 394 |
<td class="rightCell"> |
|---|
| 395 |
</td> |
|---|
| 396 |
</tr> |
|---|
| 397 |
</table> |
|---|
| 398 |
</xsl:template> |
|---|
| 399 |
|
|---|
| 400 |
<xsl:template name="searchBar"> |
|---|
| 401 |
<table width="100%" border="0" cellpadding="0" cellspacing="0" id="searchBarTable"> |
|---|
| 402 |
<tr> |
|---|
| 403 |
<td class="leftCell"> |
|---|
| 404 |
<xsl:choose> |
|---|
| 405 |
<xsl:when test="/bedework/selectionState/selectionType = 'calendar'"> |
|---|
| 406 |
Calendar: <xsl:value-of select="/bedework/selectionState/subscriptions/subscription/calendar/name"/> |
|---|
| 407 |
<span class="link">[<a href="{$setSelection}">default view</a>]</span> |
|---|
| 408 |
</xsl:when> |
|---|
| 409 |
<xsl:when test="/bedework/selectionState/selectionType = 'search'"> |
|---|
| 410 |
Current search: <xsl:value-of select="/bedework/search"/> |
|---|
| 411 |
<span class="link">[<a href="{$setSelection}">default view</a>]</span> |
|---|
| 412 |
</xsl:when> |
|---|
| 413 |
<xsl:when test="/bedework/selectionState/selectionType = 'subscription'"> |
|---|
| 414 |
Subscription: (not implemented yet) |
|---|
| 415 |
<span class="link">[<a href="{$setSelection}">default view</a>]</span> |
|---|
| 416 |
</xsl:when> |
|---|
| 417 |
<xsl:when test="/bedework/selectionState/selectionType = 'filter'"> |
|---|
| 418 |
Filter: (not implemented yet) |
|---|
| 419 |
<span class="link">[<a href="{$setSelection}">default view</a>]</span> |
|---|
| 420 |
</xsl:when> |
|---|
| 421 |
<xsl:otherwise><!-- view --> |
|---|
| 422 |
View: |
|---|
| 423 |
<form name="selectViewForm" method="get" action="{$setSelection}"> |
|---|
| 424 |
<select name="viewName" onChange="submit()" > |
|---|
| 425 |
<xsl:for-each select="/bedework/views/view"> |
|---|
| 426 |
<xsl:variable name="name" select="name"/> |
|---|
| 427 |
<xsl:choose> |
|---|
| 428 |
<xsl:when test="name=/bedework/selectionState/view/name"> |
|---|
| 429 |
<option value="{$name}" selected="selected"><xsl:value-of select="name"/></option> |
|---|
| 430 |
</xsl:when> |
|---|
| 431 |
<xsl:otherwise> |
|---|
| 432 |
<option value="{$name}"><xsl:value-of select="name"/></option> |
|---|
| 433 |
</xsl:otherwise> |
|---|
| 434 |
</xsl:choose> |
|---|
| 435 |
</xsl:for-each> |
|---|
| 436 |
</select> |
|---|
| 437 |
</form> |
|---|
| 438 |
<span class="calLinks"><a href="{$setSelection}">default view</a> | <a href="{$fetchPublicCalendars}">available calendars</a></span> |
|---|
| 439 |
</xsl:otherwise> |
|---|
| 440 |
</xsl:choose> |
|---|
| 441 |
</td> |
|---|
| 442 |
<td class="rightCell"> |
|---|
| 443 |
<xsl:choose> |
|---|
| 444 |
<xsl:when test="/bedework/periodname='Day'"> |
|---|
| 445 |
<img src="{$resourcesRoot}/images/std-button-listview-off.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> |
|---|
| 446 |
</xsl:when> |
|---|
| 447 |
<xsl:when test="/bedework/periodname='Year'"> |
|---|
| 448 |
<img src="{$resourcesRoot}/images/std-button-calview-off.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> |
|---|
| 449 |
</xsl:when> |
|---|
| 450 |
<xsl:when test="/bedework/periodname='Month'"> |
|---|
| 451 |
<xsl:choose> |
|---|
| 452 |
<xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> |
|---|
| 453 |
<a href="{$setup}?setappvar=monthViewMode(cal)" title="toggle list/calendar view"> |
|---|
| 454 |
<img src="{$resourcesRoot}/images/std-button-calview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> |
|---|
| 455 |
</a> |
|---|
| 456 |
</xsl:when> |
|---|
| 457 |
<xsl:otherwise> |
|---|
| 458 |
<a href="{$setup}?setappvar=monthViewMode(list)" title="toggle list/calendar view"> |
|---|
| 459 |
<img src="{$resourcesRoot}/images/std-button-listview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> |
|---|
| 460 |
</a> |
|---|
| 461 |
</xsl:otherwise> |
|---|
| 462 |
</xsl:choose> |
|---|
| 463 |
</xsl:when> |
|---|
| 464 |
<xsl:otherwise> |
|---|
| 465 |
<xsl:choose> |
|---|
| 466 |
<xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> |
|---|
| 467 |
<a href="{$setup}?setappvar=weekViewMode(cal)" title="toggle list/calendar view"> |
|---|
| 468 |
<img src="{$resourcesRoot}/images/std-button-calview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> |
|---|
| 469 |
</a> |
|---|
| 470 |
</xsl:when> |
|---|
| 471 |
<xsl:otherwise> |
|---|
| 472 |
<a href="{$setup}?setappvar=weekViewMode(list)" title="toggle list/calendar view"> |
|---|
| 473 |
<img src="{$resourcesRoot}/images/std-button-listview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> |
|---|
| 474 |
</a> |
|---|
| 475 |
</xsl:otherwise> |
|---|
| 476 |
</xsl:choose> |
|---|
| 477 |
</xsl:otherwise> |
|---|
| 478 |
</xsl:choose> |
|---|
| 479 |
<xsl:choose> |
|---|
| 480 |
<xsl:when test="/bedework/periodname='Year' or |
|---|
| 481 |
(/bedework/periodname='Month' and |
|---|
| 482 |
(/bedework/appvar[key='monthViewMode']/value='cal' or |
|---|
| 483 |
not(/bedework/appvar[key='monthViewMode']))) or |
|---|
| 484 |
(/bedework/periodname='Week' and |
|---|
| 485 |
(/bedework/appvar[key='weekViewMode']/value='cal' or |
|---|
| 486 |
not(/bedework/appvar[key='weekViewMode'])))"> |
|---|
| 487 |
<xsl:choose> |
|---|
| 488 |
<xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> |
|---|
| 489 |
<img src="{$resourcesRoot}/images/std-button-summary-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> |
|---|
| 490 |
</xsl:when> |
|---|
| 491 |
<xsl:otherwise> |
|---|
| 492 |
<img src="{$resourcesRoot}/images/std-button-details-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> |
|---|
| 493 |
</xsl:otherwise> |
|---|
| 494 |
</xsl:choose> |
|---|
| 495 |
</xsl:when> |
|---|
| 496 |
<xsl:otherwise> |
|---|
| 497 |
<xsl:choose> |
|---|
| 498 |
<xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> |
|---|
| 499 |
<a href="{$setup}?setappvar=summaryMode(summary)" title="toggle summary/detailed view"> |
|---|
| 500 |
<img src="{$resourcesRoot}/images/std-button-summary.gif" width="62" height="21" border="0" alt="toggle summary/detailed view"/> |
|---|
| 501 |
</a> |
|---|
| 502 |
</xsl:when> |
|---|
| 503 |
<xsl:otherwise> |
|---|
| 504 |
<a href="{$setup}?setappvar=summaryMode(details)" title="toggle summary/detailed view"> |
|---|
| 505 |
<img src="{$resourcesRoot}/images/std-button-details.gif" width="62" height="21" border="0" alt="toggle summary/detailed view"/> |
|---|
| 506 |
</a> |
|---|
| 507 |
</xsl:otherwise> |
|---|
| 508 |
</xsl:choose> |
|---|
| 509 |
</xsl:otherwise> |
|---|
| 510 |
</xsl:choose> |
|---|
| 511 |
<a href="setup.do"><img src="{$resourcesRoot}/images/std-button-refresh.gif" width="70" height="21" border="0" alt="refresh view"/></a> |
|---|
| 512 |
</td> |
|---|
| 513 |
</tr> |
|---|
| 514 |
</table> |
|---|
| 515 |
</xsl:template> |
|---|
| 516 |
|
|---|
| 517 |
<!--==== SINGLE EVENT ====--> |
|---|
| 518 |
<xsl:template match="event"> |
|---|
| 519 |
<h2> |
|---|
| 520 |
<xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> |
|---|
| 521 |
<xsl:choose> |
|---|
| 522 |
<xsl:when test="link != ''"> |
|---|
| 523 |
<xsl:variable name="link" select="link"/> |
|---|
| 524 |
<a href="{$link}"> |
|---|
| 525 |
<xsl:value-of select="summary"/> |
|---|
| 526 |
</a> |
|---|
| 527 |
</xsl:when> |
|---|
| 528 |
<xsl:otherwise> |
|---|
| 529 |
<xsl:value-of select="summary"/> |
|---|
| 530 |
</xsl:otherwise> |
|---|
| 531 |
</xsl:choose> |
|---|
| 532 |
</h2> |
|---|
| 533 |
<table id="eventTable" cellpadding="0" cellspacing="0"> |
|---|
| 534 |
<tr> |
|---|
| 535 |
<td class="fieldname">When:</td> |
|---|
| 536 |
<td class="fieldval"> |
|---|
| 537 |
<xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> |
|---|
| 538 |
<xsl:if test="start/allday = 'false'"> |
|---|
| 539 |
<span class="time"><xsl:value-of select="start/time"/></span> |
|---|
| 540 |
</xsl:if> |
|---|
| 541 |
<xsl:if test="(end/longdate != start/longdate) or |
|---|
| 542 |
((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> |
|---|
| 543 |
<xsl:if test="end/longdate != start/longdate"> |
|---|
| 544 |
<xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> |
|---|
| 545 |
</xsl:if> |
|---|
| 546 |
<xsl:choose> |
|---|
| 547 |
<xsl:when test="start/allday = 'true'"> |
|---|
| 548 |
<span class="time"><em>(all day)</em></span> |
|---|
| 549 |
</xsl:when> |
|---|
| 550 |
<xsl:when test="end/longdate != start/longdate"> |
|---|
| 551 |
<span class="time"><xsl:value-of select="end/time"/></span> |
|---|
| 552 |
</xsl:when> |
|---|
| 553 |
<xsl:when test="end/time != start/time"> |
|---|
| 554 |
<span class="time"><xsl:value-of select="end/time"/></span> |
|---|
| 555 |
</xsl:when> |
|---|
| 556 |
</xsl:choose> |
|---|
| 557 |
</td> |
|---|
| 558 |
<th class="icalIcon" rowspan="2"> |
|---|
| 559 |
<div id="eventIcons"> |
|---|
| 560 |
<xsl:variable name="id" select="id"/> |
|---|
| 561 |
<xsl:variable name="subscriptionId" select="subscription/id"/> |
|---|
| 562 |
<xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| 563 |
<xsl:variable name="guid" select="guid"/> |
|---|
| 564 |
<xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| 565 |
<a href="{$privateCal}/addEventRef.do?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar"> |
|---|
| 566 |
<img class="addref" src="{$resourcesRoot}/images/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/> |
|---|
| 567 |
add to my calendar</a> |
|---|
| 568 |
<xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> |
|---|
| 569 |
<a href="{$export}?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&skinName=ical&contentType=text/calendar&contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> |
|---|
| 570 |
<img src="{$resourcesRoot}/images/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/> |
|---|
| 571 |
download</a> |
|---|
| 572 |
</div> |
|---|
| 573 |
</th> |
|---|
| 574 |
</tr> |
|---|
| 575 |
<tr> |
|---|
| 576 |
<td class="fieldname">Where:</td> |
|---|
| 577 |
<td class="fieldval"> |
|---|
| 578 |
<xsl:choose> |
|---|
| 579 |
<xsl:when test="location/link=''"> |
|---|
| 580 |
<xsl:value-of select="location/address"/> |
|---|
| 581 |
</xsl:when> |
|---|
| 582 |
<xsl:otherwise> |
|---|
| 583 |
<xsl:variable name="locationLink" select="location/link"/> |
|---|
| 584 |
<a href="{$locationLink}"> |
|---|
| 585 |
<xsl:value-of select="location/address"/> |
|---|
| 586 |
</a> |
|---|
| 587 |
</xsl:otherwise> |
|---|
| 588 |
</xsl:choose> |
|---|
| 589 |
<xsl:if test="location/subaddress!=''"> |
|---|
| 590 |
<br/><xsl:value-of select="location/subaddress"/> |
|---|
| 591 |
</xsl:if> |
|---|
| 592 |
</td> |
|---|
| 593 |
</tr> |
|---|
| 594 |
<tr> |
|---|
| 595 |
<td class="fieldname">Description:</td> |
|---|
| 596 |
<td colspan="2" class="fieldval description"> |
|---|
| 597 |
<xsl:call-template name="replace"> |
|---|
| 598 |
<xsl:with-param name="string" select="description"/> |
|---|
| 599 |
<xsl:with-param name="pattern" select="'
'"/> |
|---|
| 600 |
<xsl:with-param name="replacement"><br/></xsl:with-param> |
|---|
| 601 |
</xsl:call-template> |
|---|
| 602 |
</td> |
|---|
| 603 |
</tr> |
|---|
| 604 |
<xsl:if test="status !='' and status != 'CONFIRMED'"> |
|---|
| 605 |
<tr> |
|---|
| 606 |
<td class="fieldname">Status:</td> |
|---|
| 607 |
<td class="fieldval"> |
|---|
| 608 |
<xsl:value-of select="status"/> |
|---|
| 609 |
</td> |
|---|
| 610 |
</tr> |
|---|
| 611 |
</xsl:if> |
|---|
| 612 |
<xsl:if test="cost!=''"> |
|---|
| 613 |
<tr> |
|---|
| 614 |
<td class="fieldname">Cost:</td> |
|---|
| 615 |
<td colspan="2" class="fieldval"><xsl:value-of select="cost"/></td> |
|---|
| 616 |
</tr> |
|---|
| 617 |
</xsl:if> |
|---|
| 618 |
<xsl:if test="link != ''"> |
|---|
| 619 |
<tr> |
|---|
| 620 |
<td class="fieldname">See:</td> |
|---|
| 621 |
<td colspan="2" class="fieldval"> |
|---|
| 622 |
<xsl:variable name="link" select="link"/> |
|---|
| 623 |
<a href="{$link}"><xsl:value-of select="link"/></a> |
|---|
| 624 |
</td> |
|---|
| 625 |
</tr> |
|---|
| 626 |
</xsl:if> |
|---|
| 627 |
<xsl:if test="sponsor/name!='none'"> |
|---|
| 628 |
<tr> |
|---|
| 629 |
<td class="fieldname">Contact:</td> |
|---|
| 630 |
<td colspan="2" class="fieldval"> |
|---|
| 631 |
<xsl:choose> |
|---|
| 632 |
<xsl:when test="sponsor/link=''"> |
|---|
| 633 |
<xsl:value-of select="sponsor/name"/> |
|---|
| 634 |
</xsl:when> |
|---|
| 635 |
<xsl:otherwise> |
|---|
| 636 |
<xsl:variable name="sponsorLink" select="sponsor/link"/> |
|---|
| 637 |
<a href="{$sponsorLink}"> |
|---|
| 638 |
<xsl:value-of select="sponsor/name"/> |
|---|
| 639 |
</a> |
|---|
| 640 |
</xsl:otherwise> |
|---|
| 641 |
</xsl:choose> |
|---|
| 642 |
<xsl:if test="sponsor/phone!=''"> |
|---|
| 643 |
<br /><xsl:value-of select="sponsor/phone"/> |
|---|
| 644 |
</xsl:if> |
|---|
| 645 |
<!-- If you want to display email addresses, uncomment the |
|---|
| 646 |
following 8 lines. --> |
|---|
| 647 |
<!-- <xsl:if test="sponsor/email!=''"> |
|---|
| 648 |
<br /> |
|---|
| 649 |
<xsl:variable name="email" select="sponsor/email"/> |
|---|
| 650 |
<xsl:variable name="subject" select="summary"/> |
|---|
| 651 |
<a href="mailto:{$email}?subject={$subject}"> |
|---|
| 652 |
<xsl:value-of select="sponsor/email"/> |
|---|
| 653 |
</a> |
|---|
| 654 |
</xsl:if> --> |
|---|
| 655 |
</td> |
|---|
| 656 |
</tr> |
|---|
| 657 |
</xsl:if> |
|---|
| 658 |
<tr> |
|---|
| 659 |
<td class="fieldname">Calendar:</td> |
|---|
| 660 |
<td class="fieldval"> |
|---|
| 661 |
<xsl:variable name="calUrl" select="calendar/path"/> |
|---|
| 662 |
<a href="{$setSelection}?calUrl={$calUrl}"> |
|---|
| 663 |
<xsl:value-of select="calendar/name"/> |
|---|
| 664 |
</a> |
|---|
| 665 |
</td> |
|---|
| 666 |
</tr> |
|---|
| 667 |
</table> |
|---|
| 668 |
</xsl:template> |
|---|
| 669 |
|
|---|
| 670 |
<!--==== LIST VIEW (for day, week, and month) ====--> |
|---|
| 671 |
<xsl:template name="listView"> |
|---|
| 672 |
<table id="listTable" border="0" cellpadding="0" cellspacing="0"> |
|---|
| 673 |
<xsl:choose> |
|---|
| 674 |
<xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> |
|---|
| 675 |
<tr> |
|---|
| 676 |
<td class="noEventsCell"> |
|---|
| 677 |
No events to display. |
|---|
| 678 |
</td> |
|---|
| 679 |
</tr> |
|---|
| 680 |
</xsl:when> |
|---|
| 681 |
<xsl:otherwise> |
|---|
| 682 |
<xsl:for-each select="/bedework/eventscalendar/year/month/week/day[event]"> |
|---|
| 683 |
<xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''"> |
|---|
| 684 |
<tr> |
|---|
| 685 |
<td colspan="5" class="dateRow"> |
|---|
| 686 |
<xsl:variable name="date" select="date"/> |
|---|
| 687 |
<a href="{$setViewPeriod}?viewType=dayView&date={$date}"> |
|---|
| 688 |
<xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> |
|---|
| 689 |
</a> |
|---|
| 690 |
</td> |
|---|
| 691 |
</tr> |
|---|
| 692 |
</xsl:if> |
|---|
| 693 |
<xsl:for-each select="event"> |
|---|
| 694 |
<xsl:variable name="id" select="id"/> |
|---|
| 695 |
<xsl:variable name="subscriptionId" select="subscription/id"/> |
|---|
| 696 |
<xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| 697 |
<xsl:variable name="guid" select="guid"/> |
|---|
| 698 |
<xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| 699 |
<tr> |
|---|
| 700 |
<xsl:variable name="dateRangeStyle"> |
|---|
| 701 |
<xsl:choose> |
|---|
| 702 |
<xsl:when test="start/shortdate = parent::day/shortdate"> |
|---|
| 703 |
<xsl:choose> |
|---|
| 704 |
<xsl:when test="start/allday = 'true'">dateRangeCrossDay</xsl:when> |
|---|
| 705 |
<xsl:when test="start/hour24 < 6">dateRangeEarlyMorning</xsl:when> |
|---|
| 706 |
<xsl:when test="start/hour24 < 12">dateRangeMorning</xsl:when> |
|---|
| 707 |
<xsl:when test="start/hour24 < 18">dateRangeAfternoon</xsl:when> |
|---|
| 708 |
<xsl:otherwise>dateRangeEvening</xsl:otherwise> |
|---|
| 709 |
</xsl:choose> |
|---|
| 710 |
</xsl:when> |
|---|
| 711 |
<xsl:otherwise>dateRangeCrossDay</xsl:otherwise> |
|---|
| 712 |
</xsl:choose> |
|---|
| 713 |
</xsl:variable> |
|---|
| 714 |
<xsl:choose> |
|---|
| 715 |
<xsl:when test="start/allday = 'true' and |
|---|
| 716 |
start/shortdate = end/shortdate"> |
|---|
| 717 |
<td class="{$dateRangeStyle} center" colspan="3"> |
|---|
| 718 |
all day |
|---|
| 719 |
</td> |
|---|
| 720 |
</xsl:when> |
|---|
| 721 |
<xsl:when test="start/shortdate = end/shortdate and |
|---|
| 722 |
start/time = end/time"> |
|---|
| 723 |
<td class="{$dateRangeStyle} center" colspan="3"> |
|---|
| 724 |
<a href="{$eventView}?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| 725 |
<xsl:value-of select="start/time"/> |
|---|
| 726 |
</a> |
|---|
| 727 |
</td> |
|---|
| 728 |
</xsl:when> |
|---|
| 729 |
<xsl:otherwise> |
|---|
| 730 |
<td class="{$dateRangeStyle} right"> |
|---|
| 731 |
<a href="{$eventView}?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| 732 |
<xsl:choose> |
|---|
| 733 |
<xsl:when test="start/allday = 'true' and |
|---|
| 734 |
parent::day/shortdate = start/shortdate"> |
|---|
| 735 |
today |
|---|
| 736 |
</xsl:when> |
|---|
| 737 |
<xsl:when test="parent::day/shortdate != start/shortdate"> |
|---|
| 738 |
<span class="littleArrow">«</span>  |
|---|
| 739 |
<xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> |
|---|
| 740 |
</xsl:when> |
|---|
| 741 |
<xsl:otherwise> |
|---|
| 742 |
<xsl:value-of select="start/time"/> |
|---|
| 743 |
</xsl:otherwise> |
|---|
| 744 |
</xsl:choose> |
|---|
| 745 |
</a> |
|---|
| 746 |
</td> |
|---|
| 747 |
<td class="{$dateRangeStyle} center"> |
|---|
| 748 |
<a href="{$eventView}?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}">-</a> |
|---|
| 749 |
</td> |
|---|
| 750 |
<td class="{$dateRangeStyle} left"> |
|---|
| 751 |
<a href="{$eventView}?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| 752 |
<xsl:choose> |
|---|
| 753 |
<xsl:when test="end/allday = 'true' and |
|---|
| 754 |
parent::day/shortdate = end/shortdate"> |
|---|
| 755 |
today |
|---|
| 756 |
</xsl:when> |
|---|
| 757 |
<xsl:when test="parent::day/shortdate != end/shortdate"> |
|---|
| 758 |
<xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> |
|---|
| 759 |
 <span class="littleArrow">»</span> |
|---|
| 760 |
</xsl:when> |
|---|
| 761 |
<xsl:otherwise> |
|---|
| 762 |
<xsl:value-of select="end/time"/> |
|---|
| 763 |
</xsl:otherwise> |
|---|
| 764 |
</xsl:choose> |
|---|
| 765 |
</a> |
|---|
| 766 |
</td> |
|---|
| 767 |
</xsl:otherwise> |
|---|
| 768 |
</xsl:choose> |
|---|
| 769 |
<xsl:variable name="descriptionClass"> |
|---|
| 770 |
<xsl:choose> |
|---|
| 771 |
<xsl:when test="status='CANCELLED'">description cancelled</xsl:when> |
|---|
| 772 |
<xsl:otherwise>description</xsl:otherwise> |
|---|
| 773 |
</xsl:choose> |
|---|
| 774 |
</xsl:variable> |
|---|
| 775 |
<td class="{$descriptionClass}"> |
|---|
| 776 |
<xsl:if test="status='CANCELLED'"><strong>CANCELLED: </strong></xsl:if> |
|---|
| 777 |
<xsl:choose> |
|---|
| 778 |
<xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> |
|---|
| 779 |
<a href="{$eventView}?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| 780 |
<strong> |
|---|
| 781 |
<xsl:value-of select="summary"/>: |
|---|
| 782 |
</strong> |
|---|
| 783 |
<xsl:value-of select="description"/>  |
|---|
| 784 |
<em> |
|---|
| 785 |
<xsl:value-of select="location/address"/> |
|---|
| 786 |
<xsl:if test="location/subaddress != ''"> |
|---|
| 787 |
, <xsl:value-of select="location/subaddress"/> |
|---|
| 788 |
</xsl:if>.  |
|---|
| 789 |
<xsl:if test="cost!=''"> |
|---|
| 790 |
<xsl:value-of select="cost"/>.  |
|---|
| 791 |
</xsl:if> |
|---|
| 792 |
<xsl:if test="sponsor/name!='none'"> |
|---|
| 793 |
Contact: <xsl:value-of select="sponsor/name"/> |
|---|
| 794 |
</xsl:if> |
|---|
| 795 |
</em> |
|---|
| 796 |
</a> |
|---|
| 797 |
<xsl:if test="link != ''"> |
|---|
| 798 |
<xsl:variable name="link" select="link"/> |
|---|
| 799 |
<a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> |
|---|
| 800 |
</xsl:if> |
|---|
| 801 |
</xsl:when> |
|---|
| 802 |
<xsl:otherwise> |
|---|
| 803 |
<a href="{$eventView}?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}"> |
|---|
| 804 |
<xsl:value-of select="summary"/> |
|---|
| 805 |
<xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> |
|---|
| 806 |
</a> |
|---|
| 807 |
</xsl:otherwise> |
|---|
| 808 |
</xsl:choose> |
|---|
| 809 |
</td> |
|---|
| 810 |
<td class="icons"> |
|---|
| 811 |
<variable name="confId" select="/bedework/confirmationid"/> |
|---|
| 812 |
<a href="{$privateCal}/addEventRef.do?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar"> |
|---|
| 813 |
<img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="Add event to MyCalendar"/> |
|---|
| 814 |
</a> |
|---|
| 815 |
<xsl:variable name="eventIcalName" select="concat($id,'.ics')"/> |
|---|
| 816 |
<a href="{$export}?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}&nocache=no&skinName=ical&contentType=text/calendar&contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> |
|---|
| 817 |
<img src="{$resourcesRoot}/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"/> |
|---|
| 818 |
</a> |
|---|
| 819 |
</td> |
|---|
| 820 |
</tr> |
|---|
| 821 |
</xsl:for-each> |
|---|
| 822 |
</xsl:for-each> |
|---|
| 823 |
</xsl:otherwise> |
|---|
| 824 |
</xsl:choose> |
|---|
| 825 |
</table> |
|---|
| 826 |
</xsl:template> |
|---|
| 827 |
|
|---|
| 828 |
<!--==== WEEK CALENDAR VIEW ====--> |
|---|
| 829 |
<xsl:template name="weekView"> |
|---|
| 830 |
<table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"> |
|---|
| 831 |
<tr> |
|---|
| 832 |
<xsl:for-each select="/bedework/daynames/val"> |
|---|
| 833 |
<th class="dayHeading"><xsl:value-of select="."/></th> |
|---|
| 834 |
</xsl:for-each> |
|---|
| 835 |
</tr> |
|---|
| 836 |
<tr> |
|---|
| 837 |
<xsl:for-each select="/bedework/eventscalendar/year/month/week/day"> |
|---|
| 838 |
<xsl:variable name="dayPos" select="position()"/> |
|---|
| 839 |
<xsl:if test="filler='false'"> |
|---|
| 840 |
<td> |
|---|
| 841 |
<xsl:variable name="dayDate" select="date"/> |
|---|
| 842 |
<a href="{$setViewPeriod}?viewType=dayView&date={$dayDate}" class="dayLink"> |
|---|
| 843 |
<xsl:value-of select="value"/> |
|---|
| 844 |
</a> |
|---|
| 845 |
<ul> |
|---|
| 846 |
<xsl:apply-templates select="event" mode="calendarLayout"> |
|---|
| 847 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 848 |
</xsl:apply-templates> |
|---|
| 849 |
</ul> |
|---|
| 850 |
</td> |
|---|
| 851 |
</xsl:if> |
|---|
| 852 |
</xsl:for-each> |
|---|
| 853 |
</tr> |
|---|
| 854 |
</table> |
|---|
| 855 |
</xsl:template> |
|---|
| 856 |
|
|---|
| 857 |
<!--==== MONTH CALENDAR VIEW ====--> |
|---|
| 858 |
<xsl:template name="monthView"> |
|---|
| 859 |
<table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"> |
|---|
| 860 |
<tr> |
|---|
| 861 |
<xsl:for-each select="/bedework/daynames/val"> |
|---|
| 862 |
<th class="dayHeading"><xsl:value-of select="."/></th> |
|---|
| 863 |
</xsl:for-each> |
|---|
| 864 |
</tr> |
|---|
| 865 |
<xsl:for-each select="/bedework/eventscalendar/year/month/week"> |
|---|
| 866 |
<tr> |
|---|
| 867 |
<xsl:for-each select="day"> |
|---|
| 868 |
<xsl:variable name="dayPos" select="position()"/> |
|---|
| 869 |
<xsl:choose> |
|---|
| 870 |
<xsl:when test="filler='true'"> |
|---|
| 871 |
<td class="filler"> </td> |
|---|
| 872 |
</xsl:when> |
|---|
| 873 |
<xsl:otherwise> |
|---|
| 874 |
<td> |
|---|
| 875 |
<xsl:variable name="dayDate" select="date"/> |
|---|
| 876 |
<a href="{$setViewPeriod}?viewType=dayView&date={$dayDate}" class="dayLink"> |
|---|
| 877 |
<xsl:value-of select="value"/> |
|---|
| 878 |
</a> |
|---|
| 879 |
<ul> |
|---|
| 880 |
<xsl:apply-templates select="event" mode="calendarLayout"> |
|---|
| 881 |
<xsl:with-param name="dayPos" select="$dayPos"/> |
|---|
| 882 |
</xsl:apply-templates> |
|---|
| 883 |
</ul> |
|---|
| 884 |
</td> |
|---|
| 885 |
</xsl:otherwise> |
|---|
| 886 |
</xsl:choose> |
|---|
| 887 |
</xsl:for-each> |
|---|
| 888 |
</tr> |
|---|
| 889 |
</xsl:for-each> |
|---|
| 890 |
</table> |
|---|
| 891 |
</xsl:template> |
|---|
| 892 |
|
|---|
| 893 |
<xsl:template match="event" mode="calendarLayout"> |
|---|
| 894 |
<xsl:param name="dayPos"/> |
|---|
| 895 |
<xsl:variable name="subscriptionId" select="subscription/id"/> |
|---|
| 896 |
<xsl:variable name="calPath" select="calendar/encodedPath"/> |
|---|
| 897 |
<xsl:variable name="guid" select="guid"/> |
|---|
| 898 |
<xsl:variable name="recurrenceId" select="recurrenceId"/> |
|---|
| 899 |
<xsl:variable name="eventClass"> |
|---|
| 900 |
<xsl:choose> |
|---|
| 901 |
<!-- Special styles for the month grid --> |
|---|
| 902 |
<xsl:when test="status='CANCELLED'">eventCancelled</xsl:when> |
|---|
| 903 |
<xsl:when test="calendar/name='Holidays'">holiday</xsl:when> |
|---|
| 904 |
<!-- Alternating colors for all standard events --> |
|---|
| 905 |
<xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when> |
|---|
| 906 |
<xsl:otherwise>eventLinkB</xsl:otherwise> |
|---|
| 907 |
</xsl:choose> |
|---|
| 908 |
</xsl:variable> |
|---|
| 909 |
<li> |
|---|
| 910 |
<a href="{$eventView}?subid={$subscriptionId}&calPath={$calPath}&guid={$guid}&recurrenceId={$recurrenceId}" class="{$eventClass}"> |
|---|
| 911 |
<xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> |
|---|
| 912 |
<xsl:value-of select="summary"/> |
|---|
| 913 |
<xsl:variable name="eventTipClass"> |
|---|
| 914 |
<xsl:choose> |
|---|
| 915 |
<xsl:when test="$dayPos > 5">eventTipReverse</xsl:when> |
|---|
| 916 |
<xsl:otherwise>eventTip</xsl:otherwise> |
|---|
| 917 |
</xsl:choose> |
|---|
| 918 |
</xsl:variable> |
|---|
| 919 |
<span class="{$eventTipClass}"> |
|---|
| 920 |
<xsl:if test="status='CANCELLED'"><span class="eventTipStatus">CANCELLED: </span></xsl:if> |
|---|
| 921 |
<strong><xsl:value-of select="summary"/></strong><br/> |
|---|
| 922 |
Time: |
|---|
| 923 |
<xsl:choose> |
|---|
| 924 |
<xsl:when test="start/allday = 'false'"> |
|---|
| 925 |
<xsl:value-of select="start/time"/> |
|---|
| 926 |
<xsl:if test="start/time != end/time"> |
|---|
| 927 |
- <xsl:value-of select="end/time"/> |
|---|
| 928 |
</xsl:if> |
|---|
| 929 |
</xsl:when> |
|---|
| 930 |
<xsl:otherwise> |
|---|
| 931 |
all day |
|---|
| 932 |
</xsl:otherwise> |
|---|
| 933 |
</xsl:choose><br/> |
|---|
| 934 |
<xsl:if test="location/address"> |
|---|
| 935 |
Location: <xsl:value-of select="location/address"/><br/> |
|---|
| 936 |
</xsl:if> |
|---|
| 937 |
Calendar: <xsl:value-of select="calendar/name"/> |
|---|
| 938 |
</span> |
|---|
| 939 |
</a> |
|---|
| 940 |
</li> |
|---|
| 941 |
</xsl:template> |
|---|
| 942 |
|
|---|
| 943 |
<!--==== YEAR VIEW ====--> |
|---|
| 944 |
<xsl:template name="yearView"> |
|---|
| 945 |
<table id="yearCalendarTable" border="0" cellpadding="0" cellspacing="0"> |
|---|
| 946 |
<tr> |
|---|
| 947 |
<xsl:apply-templates select="/bedework/eventscalendar/year/month[position() <= 3]"/> |
|---|
| 948 |
</tr> |
|---|
| 949 |
<tr> |
|---|
| 950 |
<xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() > 3) and (position() <= 6)]"/> |
|---|
| 951 |
</tr> |
|---|
| 952 |
<tr> |
|---|
| 953 |
<xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() > 6) and (position() <= 9)]"/> |
|---|
| 954 |
</tr> |
|---|
| 955 |
<tr> |
|---|
| 956 |
<xsl:apply-templates select="/bedework/eventscalendar/year/month[position() > 9]"/> |
|---|
| 957 |
</tr> |
|---|
| 958 |
</table> |
|---|
| 959 |
</xsl:template> |
|---|
| 960 |
|
|---|
| 961 |
<!-- year view month tables --> |
|---|
| 962 |
<xsl:template match="month"> |
|---|
| 963 |
<td> |
|---|
| 964 |
<table class="yearViewMonthTable" border="0" cellpadding="0" cellspacing="0"> |
|---|
| 965 |
<tr> |
|---|
| 966 |
<td colspan="8" class="monthName"> |
|---|
| 967 |
<xsl:variable name="firstDayOfMonth" select="week/day/date"/> |
|---|
| 968 |
<a href="{$setViewPeriod}?viewType=monthView&date={$firstDayOfMonth}"> |
|---|
| 969 |
<xsl:value-of select="longname"/> |
|---|
| 970 |
</a> |
|---|
| 971 |
</td> |
|---|
| 972 |
</tr> |
|---|
| 973 |
<tr> |
|---|
| 974 |
<th> </th> |
|---|
| 975 |
<xsl:for-each select="/bedework/shortdaynames/val"> |
|---|
| 976 |
<th><xsl:value-of select="."/></th> |
|---|
| 977 |
</xsl:for-each> |
|---|
| 978 |
</tr> |
|---|
| 979 |
<xsl:for-each select="week"> |
|---|
| 980 |
<tr> |
|---|
| 981 |
<td class="weekCell"> |
|---|
| 982 |
<xsl:variable name="firstDayOfWeek" select="day/date"/> |
|---|
| 983 |
<a href="{$setViewPeriod}?viewType=weekView&date={$firstDayOfWeek}"> |
|---|
| 984 |
<xsl:value-of select="value"/> |
|---|
| 985 |
</a> |
|---|
| 986 |
</td> |
|---|
| 987 |
<xsl:for-each select="day"> |
|---|
| 988 |
<xsl:choose> |
|---|
| 989 |
<xsl:when test="filler='true'"> |
|---|
| 990 |
<td class="filler"> </td> |
|---|
| 991 |
</xsl:when> |
|---|
| 992 |
<xsl:otherwise> |
|---|
| 993 |
<td> |
|---|
| 994 |
<xsl:variable name="dayDate" select="date"/> |
|---|
| 995 |
<a href="{$setViewPeriod}?viewType=dayView&date={$dayDate}"> |
|---|
| 996 |
<xsl:value-of select="value"/> |
|---|
| 997 |
</a> |
|---|
| 998 |
</td> |
|---|
| 999 |
</xsl:otherwise> |
|---|
| 1000 |
</xsl:choose> |
|---|
| 1001 |
</xsl:for-each> |
|---|
| 1002 |
</tr> |
|---|
| 1003 |
</xsl:for-each> |
|---|
| 1004 |
</table> |
|---|
| 1005 |
</td> |
|---|
| 1006 |
</xsl:template> |
|---|
| 1007 |
|
|---|
| 1008 |
<!--==== CALENDARS PAGE ====--> |
|---|
| 1009 |
<xsl:template match="calendars"> |
|---|
| 1010 |
<xsl:variable name="topLevelCalCount" select="count(calendar/calendar)"/> |
|---|
| 1011 |
<table id="calPageTable" border="0" cellpadding="0" cellspacing="0"> |
|---|
| 1012 |
<tr> |
|---|
| 1013 |
<th colspan="2"> |
|---|
| 1014 |
All Calendars |
|---|
| 1015 |
</th> |
|---|
| 1016 |
</tr> |
|---|
| 1017 |
<tr> |
|---|
| 1018 |
<td colspan="2" class="infoCell"> |
|---|
| 1019 |
Select a calendar from the list below to see only that calendar's events. |
|---|
| 1020 |
</td> |
|---|
| 1021 |
</tr> |
|---|
| 1022 |
<tr> |
|---|
| 1023 |
<td class="leftCell"> |
|---|
| 1024 |
<ul class="calendarTree"> |
|---|
| 1025 |
<xsl:apply-templates select="calendar/calendar[position() <= ceiling($topLevelCalCount div 2)]" mode="calTree"/> |
|---|
| 1026 |
</ul> |
|---|
| 1027 |
</td> |
|---|
| 1028 |
<td> |
|---|
| 1029 |
<ul class="calendarTree"> |
|---|
| 1030 |
<xsl:apply-templates select="calendar/calendar[position() > ceiling($topLevelCalCount div 2)]" mode="calTree"/> |
|---|
| 1031 |
</ul> |
|---|
| 1032 |
</td> |
|---|
| 1033 |
</tr> |
|---|
| 1034 |
</table> |
|---|
| 1035 |
</xsl:template> |
|---|
| 1036 |
|
|---|
| 1037 |
<xsl:template match="calendar" mode="calTree"> |
|---|
| 1038 |
<xsl:variable name="itemClass"> |
|---|
| 1039 |
<xsl:choose> |
|---|
| 1040 |
<xsl:when test="calendarCollection='false'">folder</xsl:when> |
|---|
| 1041 |
<xsl:otherwise>calendar</xsl:otherwise> |
|---|
| 1042 |
</xsl:choose> |
|---|
| 1043 |
</xsl:variable> |
|---|
| 1044 |
<xsl:variable name="url" select="path"/> |
|---|
| 1045 |
<li class="{$itemClass}"> |
|---|
| 1046 |
<a href="{$setSelection}?calUrl={$url}"><xsl:value-of select="name"/></a> |
|---|
| 1047 |
<xsl:if test="calendar"> |
|---|
| 1048 |
<ul> |
|---|
| 1049 |
<xsl:apply-templates select="calendar" mode="calTree"/> |
|---|
| 1050 |
</ul> |
|---|
| 1051 |
</xsl:if> |
|---|
| 1052 |
</li> |
|---|
| 1053 |
</xsl:template> |
|---|
| 1054 |
|
|---|
| 1055 |
<!--+++++++++++++++ System Stats ++++++++++++++++++++--> |
|---|
| 1056 |
<xsl:template name="stats"> |
|---|
| 1057 |
<div id="stats"> |
|---|
| 1058 |
<h2>System Statistics</h2> |
|---|
| 1059 |
|
|---|
| 1060 |
<p> |
|---|
| 1061 |
Stats collection: |
|---|
| 1062 |
</p> |
|---|
| 1063 |
<ul> |
|---|
| 1064 |
<li> |
|---|
| 1065 |
<a href="{$stats}&enable=yes">enable</a> | |
|---|
| 1066 |
<a href="{$stats}&disable=yes">disable</a> |
|---|
| 1067 |
</li> |
|---|
| 1068 |
<li><a href="{$stats}&fetch=yes">fetch statistics</a></li> |
|---|
| 1069 |
<li><a href="{$stats}&dump=yes">dump stats to log</a></li> |
|---|
| 1070 |
</ul> |
|---|
| 1071 |
<table id="statsTable" cellpadding="0"> |
|---|
| 1072 |
<xsl:for-each select="/bedework/sysStats/*"> |
|---|
| 1073 |
<xsl:choose> |
|---|
| 1074 |
<xsl:when test="name(.) = 'header'"> |
|---|
| 1075 |
<tr> |
|---|
| 1076 |
<th colspan="2"> |
|---|
| 1077 |
<xsl:value-of select="."/> |
|---|
| 1078 |
</th> |
|---|
| 1079 |
</tr> |
|---|
| 1080 |
</xsl:when> |
|---|
| 1081 |
<xsl:otherwise> |
|---|
| 1082 |
<tr> |
|---|
| 1083 |
<td class="label"> |
|---|
| 1084 |
<xsl:value-of select="label"/> |
|---|
| 1085 |
</td> |
|---|
| 1086 |
<td class="value"> |
|---|
| 1087 |
<xsl:value-of select="value"/> |
|---|
| 1088 |
</td> |
|---|
| 1089 |
</tr> |
|---|
| 1090 |
</xsl:otherwise> |
|---|
| 1091 |
</xsl:choose> |
|---|
| 1092 |
</xsl:for-each> |
|---|
| 1093 |
</table> |
|---|
| 1094 |
</div> |
|---|
| 1095 |
</xsl:template> |
|---|
| 1096 |
|
|---|
| 1097 |
<!--==== UTILITY TEMPLATES ====--> |
|---|
| 1098 |
|
|---|
| 1099 |
<!-- search and replace template taken from |
|---|
| 1100 |
http://www.biglist.com/lists/xsl-list/archives/200211/msg00337.html --> |
|---|
| 1101 |
<xsl:template name="replace"> |
|---|
| 1102 |
<xsl:param name="string" select="''"/> |
|---|
| 1103 |
<xsl:param name="pattern" select="''"/> |
|---|
| 1104 |
<xsl:param name="replacement" select="''"/> |
|---|
| 1105 |
<xsl:choose> |
|---|
| 1106 |
<xsl:when test="$pattern != '' and $string != '' and contains($string, $pattern)"> |
|---|
| 1107 |
<xsl:value-of select="substring-before($string, $pattern)"/> |
|---|
| 1108 |
<xsl:copy-of select="$replacement"/> |
|---|
| 1109 |
<xsl:call-template name="replace"> |
|---|
| 1110 |
<xsl:with-param name="string" select="substring-after($string, $pattern)"/> |
|---|
| 1111 |
<xsl:with-param name="pattern" select="$pattern"/> |
|---|
| 1112 |
<xsl:with-param name="replacement" select="$replacement"/> |
|---|
| 1113 |
</xsl:call-template> |
|---|
| 1114 |
</xsl:when> |
|---|
| 1115 |
<xsl:otherwise> |
|---|
| 1116 |
<xsl:value-of select="$string"/> |
|---|
| 1117 |
</xsl:otherwise> |
|---|
| 1118 |
</xsl:choose> |
|---|
| 1119 |
</xsl:template> |
|---|
| 1120 |
|
|---|
| 1121 |
<!--==== FOOTER ====--> |
|---|
| 1122 |
|
|---|
| 1123 |
<xsl:template name="footer"> |
|---|
| 1124 |
<div id="footer"> |
|---|
| 1125 |
Demonstration calendar; place footer information here. |
|---|
| 1126 |
</div> |
|---|
| 1127 |
<table id="skinSelectorTable" border="0" cellpadding="0" cellspacing="0"> |
|---|
| 1128 |
<tr> |
|---|
| 1129 |
<td class="leftCell"> |
|---|
| 1130 |
Based on the <a href="http://www.bedework.org/">Bedework Calendar</a> | |
|---|
| 1131 |
<a href="?noxslt=yes">show XML</a> | |
|---|
| 1132 |
<a href="?refreshXslt=yes">refresh XSLT</a> |
|---|
| 1133 |
</td> |
|---|
| 1134 |
<td class="rightCell"> |
|---|
| 1135 |
<form name="styleSelectForm" method="get" action="{$setup}"> |
|---|
| 1136 |
<select name="setappvar" onChange="submit()"> |
|---|
| 1137 |
<option>example styles:</option> |
|---|
| 1138 |
<option value="style(green)">green</option> |
|---|
| 1139 |
<option value="style(red)">red</option> |
|---|
| 1140 |
<option value="style(blue)">blue</option> |
|---|
| 1141 |
</select> |
|---|
| 1142 |
</form> |
|---|
| 1143 |
<form name="skinSelectForm" method="get" action="{$setup}"> |
|---|
| 1144 |
<input type="hidden" name="setappvar" value="summaryMode(details)"/> |
|---|
| 1145 |
<select name="skinPicker" onchange="window.location = this.value"> |
|---|
| 1146 |
<option>example skins:</option> |
|---|
| 1147 |
<option value="{$setViewPeriod}?viewType=weekView&skinName=rss&setappvar=summaryMode(details)">rss feed</option> |
|---|
| 1148 |
<option value="{$setViewPeriod}?viewType=todayView&skinName=jsToday&contentType=text/javascript&contentName=bedework.js">javascript feed</option> |
|---|
| 1149 |
<option value="{$setViewPeriod}?viewType=todayView&skinName=videocal">video feed</option> |
|---|
| 1150 |
<option value="{$setup}?skinName=default">reset to calendar default</option> |
|---|
| 1151 |
</select> |
|---|
| 1152 |
</form> |
|---|
| 1153 |
<form name="skinSelectForm" method="get" action=""> |
|---|
| 1154 |
<select name="sitePicker" onchange="window.location = this.value"> |
|---|
| 1155 |
<option>production examples:</option> |
|---|
| 1156 |
<option value="http://events.dal.ca/">Dalhousie</option> |
|---|
| 1157 |
<option value="http://events.rpi.edu">Rensselaer</option> |
|---|
| 1158 |
<option value="http://myuw.washington.edu/cal/">Washington</option> |
|---|
| 1159 |
</select> |
|---|
| 1160 |
</form> |
|---|
| 1161 |
</td> |
|---|
| 1162 |
</tr> |
|---|
| 1163 |
</table> |
|---|
| 1164 |
</xsl:template> |
|---|
| 1165 |
</xsl:stylesheet> |
|---|