root/trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl

Revision 1220 (checked in by johnsa, 6 years ago)

Public web client:

- now rendered in xhtml
- minor css cleanup
- dept calendar skin upgraded to same

Line 
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="xhtml"
5   indent="no"
6   media-type="text/html"
7   doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
8   doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
9   standalone="yes"
10   omit-xml-declaration="yes"/>
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      Bedework Design Guide at
22      http://www.bedework.org/bedework/update.do?artcenterkey=24
23
24 ===============================================================  -->
25 <!-- **********************************************************************
26     Copyright 2006 Rensselaer Polytechnic Institute. All worldwide rights reserved.
27
28     Redistribution and use of this distribution in source and binary forms,
29     with or without modification, are permitted provided that:
30        The above copyright notice and this permission notice appear in all
31         copies and supporting documentation;
32
33         The name, identifiers, and trademarks of Rensselaer Polytechnic
34         Institute are not used in advertising or publicity without the
35         express prior written permission of Rensselaer Polytechnic Institute;
36
37     DISCLAIMER: The software is distributed" AS IS" without any express or
38     implied warranty, including but not limited to, any implied warranties
39     of merchantability or fitness for a particular purpose or any warrant)'
40     of non-infringement of any current or pending patent rights. The authors
41     of the software make no representations about the suitability of this
42     software for any particular purpose. The entire risk as to the quality
43     and performance of the software is with the user. Should the software
44     prove defective, the user assumes the cost of all necessary servicing,
45     repair or correction. In particular, neither Rensselaer Polytechnic
46     Institute, nor the authors of the software are liable for any indirect,
47     special, consequential, or incidental damages related to the software,
48     to the maximum extent the law permits. -->
49
50   <!-- ================================= -->
51   <!--  DEMO PUBLIC CALENDAR STYLESHEET  -->
52   <!-- ================================= -->
53
54   <!-- URL of resources common to all bedework apps (javascript, images) -->
55   <xsl:variable name="resourceCommons">../../../bedework-common</xsl:variable>
56
57   <!-- DEFINE INCLUDES -->
58   <!-- cannot use the resourceCommons variable in xsl:include paths -->
59   <xsl:include href="../../../bedework-common/default/default/errors.xsl"/>
60   <xsl:include href="../../../bedework-common/default/default/messages.xsl"/>
61
62   <!-- DEFINE GLOBAL CONSTANTS -->
63
64   <!-- URL of the XSL template directory -->
65   <!-- The approot is an appropriate place to put
66        included stylesheets and xml fragments. These are generally
67        referenced relatively (like errors.xsl and messages.xsl above);
68        this variable is here for your convenience if you choose to
69        reference it explicitly.  It is not used in this stylesheet, however,
70        and can be safely removed if you so choose. -->
71   <xsl:variable name="appRoot" select="/bedework/approot"/>
72
73   <!-- URL of html resources (images, css, other html); by default this is
74        set to the application root -->
75   <xsl:variable name="resourcesRoot" select="/bedework/approot"/>
76
77   <!-- Properly encoded prefixes to the application actions; use these to build
78        urls; allows the application to be used without cookies or within a portal.
79        These urls are rewritten in header.jsp and simply passed through for use
80        here. Every url includes a query string (either ?b=de or a real query
81        string) so that all links constructed in this stylesheet may begin the
82        query string with an ampersand. -->
83   <xsl:variable name="setup" select="/bedework/urlPrefixes/setup"/>
84   <xsl:variable name="setSelection" select="/bedework/urlPrefixes/main/setSelection"/>
85   <xsl:variable name="fetchPublicCalendars" select="/bedework/urlPrefixes/calendar/fetchPublicCalendars"/>
86   <xsl:variable name="setViewPeriod" select="/bedework/urlPrefixes/main/setViewPeriod"/>
87   <xsl:variable name="eventView" select="/bedework/urlPrefixes/event/eventView"/>
88   <xsl:variable name="addEventRef" select="/bedework/urlPrefixes/event/addEventRef"/>
89   <xsl:variable name="export" select="/bedework/urlPrefixes/misc/export/a/@href"/>
90   <xsl:variable name="search" select="/bedework/urlPrefixes/search/search"/>
91   <xsl:variable name="search-next" select="/bedework/urlPrefixes/search/next"/>
92   <xsl:variable name="mailEvent" select="/bedework/urlPrefixes/mail/mailEvent"/>
93   <xsl:variable name="showPage" select="/bedework/urlPrefixes/main/showPage"/>
94   <xsl:variable name="stats" select="/bedework/urlPrefixes/stats/stats"/>
95
96   <!-- URL of the web application - includes web context -->
97   <xsl:variable name="urlPrefix" select="/bedework/urlprefix"/>
98
99   <!-- Other generally useful global variables -->
100   <xsl:variable name="privateCal">/ucal</xsl:variable>
101   <xsl:variable name="prevdate" select="/bedework/previousdate"/>
102   <xsl:variable name="nextdate" select="/bedework/nextdate"/>
103   <xsl:variable name="curdate" select="/bedework/currentdate/date"/>
104
105
106   <!-- MAIN TEMPLATE -->
107   <xsl:template match="/">
108     <html>
109       <head>
110         <title>Bedework Events Calendar</title>
111         <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
112         <!-- load css -->
113         <xsl:choose>
114           <xsl:when test="/bedework/appvar[key='style']/value='red'">
115             <link rel="stylesheet" href="{$resourcesRoot}/default/default/red.css"/>
116           </xsl:when>
117           <xsl:when test="/bedework/appvar[key='style']/value='green'">
118             <link rel="stylesheet" href="{$resourcesRoot}/default/default/green.css"/>
119           </xsl:when>
120           <xsl:otherwise>
121             <link rel="stylesheet" href="{$resourcesRoot}/default/default/blue.css"/>
122           </xsl:otherwise>
123         </xsl:choose>
124         <link rel="stylesheet" href="{$resourcesRoot}/default/default/subColors.css"/>
125         <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" />
126         <!-- load javascript -->
127         <xsl:if test="/bedework/page='calendarList'">
128           <script type="text/javascript" src="{$resourceCommons}/javascript/dojo/dojo.js">&#160;</script>
129           <script type="text/javascript" src="{$resourcesRoot}/resources/javascript/bedework.js">&#160;</script>
130         </xsl:if>
131         <!-- address bar icon -->
132         <link rel="icon" type="image/ico" href="{$resourcesRoot}/images/bedework.ico" />
133       </head>
134       <body>
135         <xsl:call-template name="headBar"/>
136         <xsl:if test="/bedework/error">
137           <div id="errors">
138             <xsl:apply-templates select="/bedework/error"/>
139           </div>
140         </xsl:if>
141         <xsl:call-template name="tabs"/>
142         <xsl:call-template name="navigation"/>
143         <xsl:call-template name="searchBar"/>
144         <xsl:choose>
145           <xsl:when test="/bedework/page='event'">
146             <!-- show an event -->
147             <xsl:apply-templates select="/bedework/event"/>
148           </xsl:when>
149           <xsl:when test="/bedework/page='showSysStats'">
150             <!-- show system stats -->
151             <xsl:call-template name="stats"/>
152           </xsl:when>
153           <xsl:when test="/bedework/page='calendarList'">
154             <!-- show a list of all calendars -->
155             <xsl:apply-templates select="/bedework/calendars"/>
156           </xsl:when>
157           <xsl:when test="/bedework/page='searchResult'">
158             <!-- display search results -->
159             <xsl:call-template name="searchResult"/>
160           </xsl:when>
161           <xsl:otherwise>
162             <!-- otherwise, show the eventsCalendar -->
163             <!-- main eventCalendar content -->
164             <xsl:choose>
165               <xsl:when test="/bedework/periodname='Day'">
166                 <xsl:call-template name="listView"/>
167               </xsl:when>
168               <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''">
169                 <xsl:choose>
170                   <xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'">
171                     <xsl:call-template name="listView"/>
172                   </xsl:when>
173                   <xsl:otherwise>
174                     <xsl:call-template name="weekView"/>
175                   </xsl:otherwise>
176                 </xsl:choose>
177               </xsl:when>
178               <xsl:when test="/bedework/periodname='Month'">
179                 <xsl:choose>
180                   <xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'">
181                     <xsl:call-template name="listView"/>
182                   </xsl:when>
183                   <xsl:otherwise>
184                     <xsl:call-template name="monthView"/>
185                   </xsl:otherwise>
186                 </xsl:choose>
187               </xsl:when>
188               <xsl:otherwise>
189                 <xsl:call-template name="yearView"/>
190               </xsl:otherwise>
191             </xsl:choose>
192           </xsl:otherwise>
193         </xsl:choose>
194         <!-- footer -->
195         <xsl:call-template name="footer"/>
196       </body>
197     </html>
198   </xsl:template>
199
200   <!--==== HEADER TEMPLATES and NAVIGATION  ====-->
201   <!-- these templates are separated out for convenience and to simplify the default template -->
202
203   <xsl:template name="headBar">
204     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="logoTable">
205       <tr>
206         <td colspan="3" id="logoCell"><a href="{$urlPrefix}"><img src="{$resourcesRoot}/images/bedeworkLogo.gif" width="292" height="75" border="0" alt="Bedework"/></a></td>
207         <td colspan="2" id="schoolLinksCell">
208           <h2>Public Calendar</h2>
209           <a href="{$privateCal}">Personal Calendar</a> |
210           <a href="http://www.yourschoolhere.edu">School Home</a> |
211           <a href="http://www.bedework.org/">Other Link</a> |
212           <a href="http://helpdesk.rpi.edu/update.do?catcenterkey=51">
213             Example Calendar Help
214           </a>
215         </td>
216       </tr>
217     </table>
218     <table id="curDateRangeTable"  cellspacing="0">
219       <tr>
220         <td class="sideBarOpenCloseIcon">
221           &#160;
222           <!--
223           we may choose to implement calendar selection in the public calendar
224           using a sidebar; leave this comment here for now.
225           <xsl:choose>
226             <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'">
227               <a href="?setappvar=sidebar(opened)">
228                 <img alt="open sidebar" src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/>
229               </a>
230             </xsl:when>
231             <xsl:otherwise>
232               <a href="?setappvar=sidebar(closed)">
233                 <img alt="close sidebar" src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/>
234               </a>
235             </xsl:otherwise>
236           </xsl:choose>-->
237         </td>
238         <td class="date">
239           <xsl:choose>
240             <xsl:when test="/bedework/page='event'">
241               Event Information
242             </xsl:when>
243             <xsl:when test="/bedework/page='showSysStats' or
244                             /bedework/page='calendars'">
245               &#160;
246             </xsl:when>
247             <xsl:otherwise>
248               <xsl:value-of select="/bedework/firstday/longdate"/>
249               <xsl:if test="/bedework/periodname!='Day'">
250                 -
251                 <xsl:value-of select="/bedework/lastday/longdate"/>
252               </xsl:if>
253             </xsl:otherwise>
254           </xsl:choose>
255         </td>
256         <td class="rssPrint">
257           <a href="javascript:window.print()" title="print this view">
258             <img alt="print this view" src="{$resourcesRoot}/images/std-print-icon.gif" width="20" height="14" border="0"/> print
259           </a>
260           <a class="rss" href="{$setup}&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a>
261         </td>
262       </tr>
263     </table>
264   </xsl:template>
265
266   <xsl:template name="tabs">
267     <xsl:choose>
268       <xsl:when test="/bedework/page='eventscalendar'">
269         <table border="0" cellpadding="0" cellspacing="0" id="tabsTable">
270           <tr>
271             <td>
272               <xsl:choose>
273                 <xsl:when test="/bedework/periodname='Day'">
274                   <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-day-on.gif" width="91" height="20" border="0" alt="DAY"/></a>
275                 </xsl:when>
276                 <xsl:otherwise>
277                   <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a>
278                 </xsl:otherwise>
279               </xsl:choose>
280             </td>
281             <td>
282               <xsl:choose>
283                 <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''">
284                   <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-week-on.gif" width="92" height="20" border="0" alt="WEEK"/></a>
285                  </xsl:when>
286                 <xsl:otherwise>
287                   <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a>
288                  </xsl:otherwise>
289               </xsl:choose>
290             </td>
291             <td>
292               <xsl:choose>
293                 <xsl:when test="/bedework/periodname='Month'">
294                   <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-month-on.gif" width="90" height="20" border="0" alt="MONTH"/></a>
295                 </xsl:when>
296                 <xsl:otherwise>
297                   <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a>
298                 </xsl:otherwise>
299               </xsl:choose>
300             </td>
301             <td>
302               <xsl:choose>
303                 <xsl:when test="/bedework/periodname='Year'">
304                   <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-year-on.gif" width="92" height="20" border="0" alt="YEAR"/></a>
305                 </xsl:when>
306                 <xsl:otherwise>
307                   <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a>
308                 </xsl:otherwise>
309               </xsl:choose>
310             </td>
311             <td class="centerCell">
312               &#160;<!--<img src="{$resourcesRoot}/images/std-button-today.gif" width="46" height="17" border="0" alt="TODAY"/>-->
313             </td>
314             <td class="rightCell">
315               &#160;
316             </td>
317           </tr>
318         </table>
319       </xsl:when>
320       <xsl:otherwise>
321         <table border="0" cellpadding="0" cellspacing="0" id="tabsTable">
322           <tr>
323             <td>
324               <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a>
325             </td>
326             <td>
327               <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a>
328             </td>
329             <td>
330               <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a>
331             </td>
332             <td>
333               <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a>
334             </td>
335             <td class="centerCell">
336               &#160;<!--<img src="{$resourcesRoot}/images/std-button-today.gif" width="46" height="17" border="0" alt="TODAY"/>-->
337             </td>
338             <td class="rightCell">
339               &#160;
340             </td>
341           </tr>
342         </table>
343       </xsl:otherwise>
344     </xsl:choose>
345   </xsl:template>
346
347   <xsl:template name="navigation">
348     <table border="0" cellpadding="0" cellspacing="0" id="navigationBarTable">
349       <tr>
350         <td class="leftCell">
351           <a id="prevViewPeriod" href="{$setViewPeriod}&amp;date={$prevdate}"><img src="{$resourcesRoot}/images/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a>
352           <a id="nextViewPeriod" href="{$setViewPeriod}&amp;date={$nextdate}"><img src="{$resourcesRoot}/images/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a>
353           <xsl:choose>
354             <xsl:when test="/bedework/periodname='Year'">
355               <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/>
356             </xsl:when>
357             <xsl:when test="/bedework/periodname='Month'">
358               <xsl:value-of select="/bedework/firstday/monthname"/>, <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/>
359             </xsl:when>
360             <xsl:when test="/bedework/periodname='Week'">
361               Week of <xsl:value-of select="substring-after(/bedework/firstday/longdate,', ')"/>
362             </xsl:when>
363             <xsl:otherwise>
364               <xsl:value-of select="/bedework/firstday/longdate"/>
365             </xsl:otherwise>
366           </xsl:choose>
367         </td>
368         <td class="todayButton">
369           <a href="{$setViewPeriod}&amp;viewType=todayView&amp;date={$curdate}">
370             <img src="{$resourcesRoot}/images/std-button-today-off.gif" width="54" height="22" border="0" alt="Go to Today" align="left"/>
371           </a>
372         </td>
373         <td align="right" class="gotoForm">
374           <form name="calForm" method="post" action="{$setViewPeriod}">
375              <table border="0" cellpadding="0" cellspacing="0">
376               <tr>
377                 <xsl:if test="/bedework/periodname!='Year'">
378                   <td>
379                     <select name="viewStartDate.month">
380                       <xsl:for-each select="/bedework/monthvalues/val">
381                         <xsl:variable name="temp" select="."/>
382                         <xsl:variable name="pos" select="position()"/>
383                         <xsl:choose>
384                           <xsl:when test="/bedework/monthvalues[start=$temp]">
385                             <option value="{$temp}" selected="selected">
386                               <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/>
387                             </option>
388                           </xsl:when>
389                           <xsl:otherwise>
390                             <option value="{$temp}">
391                               <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/>
392                             </option>
393                           </xsl:otherwise>
394                         </xsl:choose>
395                       </xsl:for-each>
396                     </select>
397                   </td>
398                   <xsl:if test="/bedework/periodname!='Month'">
399                     <td>
400                       <select name="viewStartDate.day">
401                         <xsl:for-each select="/bedework/dayvalues/val">
402                           <xsl:variable name="temp" select="."/>
403                           <xsl:variable name="pos" select="position()"/>
404                           <xsl:choose>
405                             <xsl:when test="/bedework/dayvalues[start=$temp]">
406                               <option value="{$temp}" selected="selected">
407                                 <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/>
408                               </option>
409                             </xsl:when>
410                             <xsl:otherwise>
411                               <option value="{$temp}">
412                                 <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/>
413                               </option>
414                             </xsl:otherwise>
415                           </xsl:choose>
416                         </xsl:for-each>
417                       </select>
418                     </td>
419                   </xsl:if>
420                 </xsl:if>
421                 <td>
422                   <xsl:variable name="temp" select="/bedework/yearvalues/start"/>
423                   <input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/>
424                 </td>
425                 <td>
426                   <input name="submit" type="submit" value="go"/>
427                 </td>
428               </tr>
429             </table>
430           </form>
431         </td>
432         <td class="rightCell">
433         </td>
434       </tr>
435     </table>
436   </xsl:template>
437
438   <xsl:template name="searchBar">
439     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="searchBarTable">
440        <tr>
441          <td class="leftCell">
442            <xsl:choose>
443              <xsl:when test="/bedework/selectionState/selectionType = 'calendar'">
444                Calendar: <xsl:value-of select="/bedework/selectionState/subscriptions/subscription/calendar/name"/>
445                <span class="link">[<a href="{$setSelection}">default view</a>]</span>
446              </xsl:when>
447              <xsl:when test="/bedework/selectionState/selectionType = 'search'">
448                Current search: <xsl:value-of select="/bedework/search"/>
449                <span class="link">[<a href="{$setSelection}">default view</a>]</span>
450              </xsl:when>
451              <xsl:when test="/bedework/selectionState/selectionType = 'subscription'">
452                Subscription: (not implemented yet)
453                <span class="link">[<a href="{$setSelection}">default view</a>]</span>
454              </xsl:when>
455              <xsl:when test="/bedework/selectionState/selectionType = 'filter'">
456                Filter: (not implemented yet)
457                <span class="link">[<a href="{$setSelection}">default view</a>]</span>
458              </xsl:when>
459              <xsl:otherwise><!-- view -->
460                View:
461                <form name="selectViewForm" method="post" action="{$setSelection}">
462                 <select name="viewName" onchange="submit()" >
463                   <xsl:for-each select="/bedework/views/view">
464                     <xsl:variable name="name" select="name"/>
465                     <xsl:choose>
466                       <xsl:when test="name=/bedework/selectionState/view/name">
467                         <option value="{$name}" selected="selected"><xsl:value-of select="name"/></option>
468                       </xsl:when>
469                       <xsl:otherwise>
470                         <option value="{$name}"><xsl:value-of select="name"/></option>
471                       </xsl:otherwise>
472                     </xsl:choose>
473                   </xsl:for-each>
474                 </select>
475               </form>
476               <span class="link"><a href="{$setSelection}">default view</a> | <a href="{$fetchPublicCalendars}">available calendars</a></span>
477              </xsl:otherwise>
478            </xsl:choose>
479          </td>
480          <td class="rightCell">
481             <xsl:if test="/bedework/page!='searchResult'">
482               <form name="searchForm" id="searchForm" method="post" action="{$search}">
483                 Search:
484                 <input type="text" name="query" size="15">
485                   <xsl:attribute name="value"><xsl:value-of select="/bedework/searchResults/query"/></xsl:attribute>
486                 </input>
487                 <input type="submit" name="submit" value="go"/>
488               </form>
489               <xsl:text> </xsl:text>
490             </xsl:if>
491             <xsl:choose>
492               <xsl:when test="/bedework/periodname='Day'">
493                 <img src="{$resourcesRoot}/images/std-button-listview-off.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/>
494               </xsl:when>
495               <xsl:when test="/bedework/periodname='Year'">
496                 <img src="{$resourcesRoot}/images/std-button-calview-off.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/>
497               </xsl:when>
498               <xsl:when test="/bedework/periodname='Month'">
499                 <xsl:choose>
500                   <xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'">
501                     <a href="{$setup}&amp;setappvar=monthViewMode(cal)" title="toggle list/calendar view">
502                       <img src="{$resourcesRoot}/images/std-button-calview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/>
503                     </a>
504                   </xsl:when>
505                   <xsl:otherwise>
506                     <a href="{$setup}&amp;setappvar=monthViewMode(list)" title="toggle list/calendar view">
507                       <img src="{$resourcesRoot}/images/std-button-listview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/>
508                     </a>
509                   </xsl:otherwise>
510                 </xsl:choose>
511               </xsl:when>
512               <xsl:otherwise>
513                 <xsl:choose>
514                   <xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'">
515                     <a href="{$setup}&amp;setappvar=weekViewMode(cal)" title="toggle list/calendar view">
516                       <img src="{$resourcesRoot}/images/std-button-calview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/>
517                     </a>
518                   </xsl:when>
519                   <xsl:otherwise>
520                     <a href="{$setup}&amp;setappvar=weekViewMode(list)" title="toggle list/calendar view">
521                       <img src="{$resourcesRoot}/images/std-button-listview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/>
522                     </a>
523                   </xsl:otherwise>
524                 </xsl:choose>
525               </xsl:otherwise>
526             </xsl:choose>
527             <xsl:choose>
528               <xsl:when test="/bedework/periodname='Year' or
529                               (/bedework/periodname='Month' and
530                               (/bedework/appvar[key='monthViewMode']/value='cal' or
531                                not(/bedework/appvar[key='monthViewMode']))) or
532                               (/bedework/periodname='Week' and
533                               (/bedework/appvar[key='weekViewMode']/value='cal' or
534                                not(/bedework/appvar[key='weekViewMode'])))">
535                 <xsl:choose>
536                   <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'">
537                     <img src="{$resourcesRoot}/images/std-button-summary-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/>
538                   </xsl:when>
539                   <xsl:otherwise>
540                     <img src="{$resourcesRoot}/images/std-button-details-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/>
541                   </xsl:otherwise>
542                 </xsl:choose>
543               </xsl:when>
544               <xsl:otherwise>
545                 <xsl:choose>
546                   <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'">
547                     <a href="{$setup}&amp;setappvar=summaryMode(summary)" title="toggle summary/detailed view">
548                       <img src="{$resourcesRoot}/images/std-button-summary.gif" width="62" height="21" border="0" alt="toggle summary/detailed view"/>
549                     </a>
550                   </xsl:when>
551                   <xsl:otherwise>
552                     <a href="{$setup}&amp;setappvar=summaryMode(details)" title="toggle summary/detailed view">
553                       <img src="{$resourcesRoot}/images/std-button-details.gif" width="62" height="21" border="0" alt="toggle summary/detailed view"/>
554                     </a>
555                   </xsl:otherwise>
556                 </xsl:choose>
557               </xsl:otherwise>
558             </xsl:choose>
559             <a href="{$setup}"><img src="{$resourcesRoot}/images/std-button-refresh.gif" width="70" height="21" border="0" alt="refresh view"/></a>
560           </td>
561        </tr>
562     </table>
563   </xsl:template>
564
565   <!--==== SINGLE EVENT ====-->
566   <xsl:template match="event">
567     <xsl:variable name="subscriptionId" select="subscription/id"/>
568     <xsl:variable name="calPath" select="calendar/encodedPath"/>
569     <xsl:variable name="guid" select="guid"/>
570     <xsl:variable name="recurrenceId" select="recurrenceId"/>
571     <xsl:variable name="statusClass">
572       <xsl:choose>
573         <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when>
574         <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when>
575         <xsl:otherwise>bwStatusConfirmed</xsl:otherwise>
576       </xsl:choose>
577     </xsl:variable>
578     <h2 class="{$statusClass}">
579       <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if>
580       <xsl:choose>
581         <xsl:when test="link != ''">
582           <xsl:variable name="link" select="link"/>
583           <a href="{$link}">
584             <xsl:value-of select="summary"/>
585           </a>
586         </xsl:when>
587         <xsl:otherwise>
588           <xsl:value-of select="summary"/>
589         </xsl:otherwise>
590       </xsl:choose>
591     </h2>
592     <table id="eventTable" cellpadding="0" cellspacing="0">
593       <tr>
594         <td class="fieldname">When:</td>
595         <td class="fieldval">
596           <!-- always display local time -->
597           <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text>
598           <xsl:if test="start/allday = 'false'">
599             <span class="time"><xsl:value-of select="start/time"/></span>
600           </xsl:if>
601           <xsl:if test="(end/longdate != start/longdate) or
602                         ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if>
603           <xsl:if test="end/longdate != start/longdate">
604             <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text>
605           </xsl:if>
606           <xsl:choose>
607             <xsl:when test="start/allday = 'true'">
608               <span class="time"><em>(all day)</em></span>
609             </xsl:when>
610             <xsl:when test="end/longdate != start/longdate">
611               <span class="time"><xsl:value-of select="end/time"/></span>
612             </xsl:when>
613             <xsl:when test="end/time != start/time">
614               <span class="time"><xsl:value-of select="end/time"/></span>
615             </xsl:when>
616           </xsl:choose>
617           <!-- if timezones are not local, or if floating add labels: -->
618           <xsl:if test="start/timezone/islocal = 'false' or end/timezone/islocal = 'false'">
619             <xsl:text> </xsl:text>
620             --
621             <strong>
622               <xsl:choose>
623                 <xsl:when test="start/floating = 'true'">
624                   Floating time
625                 </xsl:when>
626                 <xsl:otherwise>
627                   Local time
628                 </xsl:otherwise>
629               </xsl:choose>
630             </strong>
631             <br/>
632           </xsl:if>
633           <!-- display in timezone if not local or floating time) -->
634           <xsl:if test="(start/timezone/islocal = 'false' or end/timezone/islocal = 'false') and start/floating = 'false'">
635             <xsl:choose>
636               <xsl:when test="start/timezone/id != end/timezone/id">
637                 <!-- need to display both timezones if they differ from start to end -->
638                 <table border="0" cellspacing="0" id="tztable">
639                   <tr>
640                     <td>
641                       <strong>Start:</strong>
642                     </td>
643                     <td>
644                       <xsl:choose>
645                         <xsl:when test="start/timezone/islocal='true'">
646                           <xsl:value-of select="start/dayname"/>,
647                           <xsl:value-of select="start/longdate"/>
648                           <xsl:text> </xsl:text>
649                           <span class="time"><xsl:value-of select="start/time"/></span>
650                         </xsl:when>
651                         <xsl:otherwise>
652                           <xsl:value-of select="start/timezone/dayname"/>,
653                           <xsl:value-of select="start/timezone/longdate"/>
654                           <xsl:text> </xsl:text>
655                           <span class="time"><xsl:value-of select="start/timezone/time"/></span>
656                         </xsl:otherwise>
657                       </xsl:choose>
658                     </td>
659                     <td>
660                       --
661                       <strong><xsl:value-of select="start/timezone/id"/></strong>
662                     </td>
663                   </tr>
664                   <tr>
665                     <td>
666                       <strong>End:</strong>
667                     </td>
668                     <td>
669                       <xsl:choose>
670                         <xsl:when test="end/timezone/islocal='true'">
671                           <xsl:value-of select="end/dayname"/>,
672                           <xsl:value-of select="end/longdate"/>
673                           <xsl:text> </xsl:text>
674                           <span class="time"><xsl:value-of select="end/time"/></span>
675                         </xsl:when>
676                         <xsl:otherwise>
677                           <xsl:value-of select="end/timezone/dayname"/>,
678                           <xsl:value-of select="end/timezone/longdate"/>
679                           <xsl:text> </xsl:text>
680                           <span class="time"><xsl:value-of select="end/timezone/time"/></span>
681                         </xsl:otherwise>
682                       </xsl:choose>
683                     </td>
684                     <td>
685                       --
686                       <strong><xsl:value-of select="end/timezone/id"/></strong>
687                     </td>
688                   </tr>
689                 </table>
690               </xsl:when>
691               <xsl:otherwise>
692                 <!-- otherwise, timezones are the same: display as a single line  -->
693                 <xsl:value-of select="start/timezone/dayname"/>, <xsl:value-of select="start/timezone/longdate"/><xsl:text> </xsl:text>
694                 <xsl:if test="start/allday = 'false'">
695                   <span class="time"><xsl:value-of select="start/timezone/time"/></span>
696                 </xsl:if>
697                 <xsl:if test="(end/timezone/longdate != start/timezone/longdate) or
698                               ((end/timezone/longdate = start/timezone/longdate) and (end/timezone/time != start/timezone/time))"> - </xsl:if>
699                 <xsl:if test="end/timezone/longdate != start/timezone/longdate">
700                   <xsl:value-of select="substring(end/timezone/dayname,1,3)"/>, <xsl:value-of select="end/timezone/longdate"/><xsl:text> </xsl:text>
701                 </xsl:if>
702                 <xsl:choose>
703                   <xsl:when test="start/allday = 'true'">
704                     <span class="time"><em>(all day)</em></span>
705                   </xsl:when>
706                   <xsl:when test="end/timezone/longdate != start/timezone/longdate">
707                     <span class="time"><xsl:value-of select="end/timezone/time"/></span>
708                   </xsl:when>
709                   <xsl:when test="end/timezone/time != start/timezone/time">
710                     <span class="time"><xsl:value-of select="end/timezone/time"/></span>
711                   </xsl:when>
712                 </xsl:choose>
713                 <xsl:text> </xsl:text>
714                 --
715                 <strong><xsl:value-of select="start/timezone/id"/></strong>
716               </xsl:otherwise>
717             </xsl:choose>
718           </xsl:if>
719         </td>
720         <th class="icalIcon" rowspan="2">
721           <div id="eventIcons">
722             <a href="{$privateCal}/event/addEventRef.do?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar">
723               <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/>
724             add to my calendar</a>
725             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/>
726             <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars">
727               <img src="{$resourcesRoot}/images/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/>
728              download</a>
729           </div>
730         </th>
731       </tr>
732       <tr>
733         <td class="fieldname">Where:</td>
734         <td class="fieldval">
735           <xsl:choose>
736             <xsl:when test="location/link=''">
737               <xsl:value-of select="location/address"/>
738             </xsl:when>
739             <xsl:otherwise>
740               <xsl:variable name="locationLink" select="location/link"/>
741               <a href="{$locationLink}">
742                 <xsl:value-of select="location/address"/>
743               </a>
744             </xsl:otherwise>
745           </xsl:choose>
746           <xsl:if test="location/subaddress!=''">
747             <br/><xsl:value-of select="location/subaddress"/>
748           </xsl:if>
749         </td>
750       </tr>
751       <tr>
752         <td class="fieldname">Description:</td>
753         <td colspan="2" class="fieldval description">
754           <xsl:call-template name="replace">
755             <xsl:with-param name="string" select="description"/>
756             <xsl:with-param name="pattern" select="'&#xA;'"/>
757             <xsl:with-param name="replacement"><br/></xsl:with-param>
758           </xsl:call-template>
759         </td>
760       </tr>
761       <xsl:if test="status !='' and status != 'CONFIRMED'">
762         <tr>
763           <td class="fieldname">Status:</td>
764           <td class="fieldval">
765             <xsl:value-of select="status"/>
766           </td>
767         </tr>
768       </xsl:if>
769       <xsl:if test="cost!=''">
770         <tr>
771           <td class="fieldname">Cost:</td>
772           <td colspan="2" class="fieldval"><xsl:value-of select="cost"/></td>
773         </tr>
774       </xsl:if>
775       <xsl:if test="link != ''">
776         <tr>
777           <td class="fieldname">See:</td>
778           <td colspan="2" class="fieldval">
779             <xsl:variable name="link" select="link"/>
780             <a href="{$link}"><xsl:value-of select="link"/></a>
781           </td>
782         </tr>
783       </xsl:if>
784       <xsl:if test="contact/name!='none'">
785         <tr>
786           <td class="fieldname">Contact:</td>
787           <td colspan="2" class="fieldval">
788             <xsl:choose>
789               <xsl:when test="contact/link=''">
790                 <xsl:value-of select="contact/name"/>
791               </xsl:when>
792               <xsl:otherwise>
793                 <xsl:variable name="sponsorLink" select="contact/link"/>
794                 <a href="{$sponsorLink}">
795                   <xsl:value-of select="contact/name"/>
796                 </a>
797               </xsl:otherwise>
798             </xsl:choose>
799             <xsl:if test="contact/phone!=''">
800               <br /><xsl:value-of select="contact/phone"/>
801             </xsl:if>
802             <!-- If you want to display email addresses, uncomment the
803                  following 8 lines. -->
804             <!-- <xsl:if test="contact/email!=''">
805               <br />
806               <xsl:variable name="email" select="contact/email"/>
807               <xsl:variable name="subject" select="summary"/>
808               <a href="mailto:{$email}&amp;subject={$subject}">
809                 <xsl:value-of select="contact/email"/>
810               </a>
811             </xsl:if> -->
812           </td>
813         </tr>
814       </xsl:if>
815       <xsl:if test="calendar/path!=''">
816         <tr>
817           <td class="fieldname">Calendar:</td>
818           <td class="fieldval">
819             <xsl:variable name="calUrl" select="calendar/encodedPath"/>
820             <a href="{$setSelection}&amp;calUrl={$calUrl}">
821               <xsl:value-of select="calendar/name"/>
822             </a>
823           </td>
824         </tr>
825       </xsl:if>
826       <xsl:if test="categories/category">
827         <tr>
828           <td class="fieldname">Categories:</td>
829           <td class="fieldval">
830             <xsl:for-each select="categories/category">
831               <xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if>
832             </xsl:for-each>
833           </td>
834         </tr>
835       </xsl:if>
836     </table>
837   </xsl:template>
838
839   <!--==== LIST VIEW  (for day, week, and month) ====-->
840   <xsl:template name="listView">
841     <table id="listTable" border="0" cellpadding="0" cellspacing="0">
842       <xsl:choose>
843         <xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)">
844           <tr>
845             <td class="noEventsCell">
846               No events to display.
847             </td>
848           </tr>
849         </xsl:when>
850         <xsl:otherwise>
851           <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[event]">
852             <xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''">
853               <tr>
854                 <td colspan="5" class="dateRow">
855                    <xsl:variable name="date" select="date"/>
856                    <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$date}">
857                      <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/>
858                    </a>
859                 </td>
860               </tr>
861             </xsl:if>
862             <xsl:for-each select="event">
863               <xsl:variable name="id" select="id"/>
864               <xsl:variable name="subscriptionId" select="subscription/id"/>
865               <xsl:variable name="calPath" select="calendar/encodedPath"/>
866               <xsl:variable name="guid" select="guid"/>
867               <xsl:variable name="recurrenceId" select="recurrenceId"/>
868               <tr>
869                 <xsl:variable name="dateRangeStyle">
870                   <xsl:choose>
871                     <xsl:when test="start/shortdate = parent::day/shortdate">
872                       <xsl:choose>
873                         <xsl:when test="start/allday = 'true'">dateRangeCrossDay</xsl:when>
874                         <xsl:when test="start/hour24 &lt; 6">dateRangeEarlyMorning</xsl:when>
875                         <xsl:when test="start/hour24 &lt; 12">dateRangeMorning</xsl:when>
876                         <xsl:when test="start/hour24 &lt; 18">dateRangeAfternoon</xsl:when>
877                         <xsl:otherwise>dateRangeEvening</xsl:otherwise>
878                       </xsl:choose>
879                     </xsl:when>
880                     <xsl:otherwise>dateRangeCrossDay</xsl:otherwise>
881                   </xsl:choose>
882                 </xsl:variable>
883                 <xsl:choose>
884                   <xsl:when test="start/allday = 'true' and
885                                   start/shortdate = end/shortdate">
886                     <td class="{$dateRangeStyle} center" colspan="3">
887                       all day
888                     </td>
889                   </xsl:when>
890                   <xsl:when test="start/shortdate = end/shortdate and
891                                   start/time = end/time">
892                     <td class="{$dateRangeStyle} center" colspan="3">
893                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
894                         <xsl:value-of select="start/time"/>
895                       </a>
896                     </td>
897                   </xsl:when>
898                   <xsl:otherwise>
899                     <td class="{$dateRangeStyle} right">
900                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
901                       <xsl:choose>
902                         <xsl:when test="start/allday = 'true' and
903                                         parent::day/shortdate = start/shortdate">
904                           today
905                         </xsl:when>
906                         <xsl:when test="parent::day/shortdate != start/shortdate">
907                           <span class="littleArrow">&#171;</span>&#160;
908                           <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/>
909                         </xsl:when>
910                         <xsl:otherwise>
911                           <xsl:value-of select="start/time"/>
912                         </xsl:otherwise>
913                       </xsl:choose>
914                       </a>
915                     </td>
916                     <td class="{$dateRangeStyle} center">
917                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">-</a>
918                     </td>
919                     <td class="{$dateRangeStyle} left">
920                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
921                       <xsl:choose>
922                         <xsl:when test="end/allday = 'true' and
923                                         parent::day/shortdate = end/shortdate">
924                           today
925                         </xsl:when>
926                         <xsl:when test="parent::day/shortdate != end/shortdate">
927                           <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/>
928                           &#160;<span class="littleArrow">&#187;</span>
929                         </xsl:when>
930                         <xsl:otherwise>
931                           <xsl:value-of select="end/time"/>
932                         </xsl:otherwise>
933                       </xsl:choose>
934                       </a>
935                     </td>
936                   </xsl:otherwise>
937                 </xsl:choose>
938                 <xsl:variable name="descriptionClass">
939                   <xsl:choose>
940                     <xsl:when test="status='CANCELLED'">description bwStatusCancelled</xsl:when>
941                     <xsl:when test="status='TENTATIVE'">description bwStatusTentative</xsl:when>
942                     <xsl:otherwise>description</xsl:otherwise>
943                   </xsl:choose>
944                 </xsl:variable>
945                 <td class="{$descriptionClass}">
946                   <xsl:if test="status='CANCELLED'"><strong>CANCELLED: </strong></xsl:if>
947                   <xsl:choose>
948                     <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'">
949                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
950                         <strong>
951                           <xsl:value-of select="summary"/>:
952                         </strong>
953                         <xsl:value-of select="description"/>&#160;
954                         <em>
955                           <xsl:value-of select="location/address"/>
956                           <xsl:if test="location/subaddress != ''">
957                             , <xsl:value-of select="location/subaddress"/>
958                           </xsl:if>.&#160;
959                           <xsl:if test="cost!=''">
960                             <xsl:value-of select="cost"/>.&#160;
961                           </xsl:if>
962                           <xsl:if test="contact/name!='none'">
963                             Contact: <xsl:value-of select="contact/name"/>
964                           </xsl:if>
965                         </em>
966                         - <xsl:value-of select="calendar/name"/>
967                       </a>
968                       <xsl:if test="link != ''">
969                         <xsl:variable name="link" select="link"/>
970                         <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a>
971                       </xsl:if>
972                     </xsl:when>
973                     <xsl:otherwise>
974                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
975                         <xsl:value-of select="summary"/>
976                         <xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if>
977                          - <em><xsl:value-of select="calendar/name"/></em>
978                       </a>
979                     </xsl:otherwise>
980                   </xsl:choose>
981                 </td>
982                 <td class="icons">
983                   <a href="{$privateCal}/event/addEventRef.do?subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="Add event to MyCalendar" target="myCalendar">
984                     <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="Add event to MyCalendar"/>
985                   </a>
986                   <xsl:variable name="eventIcalName" select="concat($id,'.ics')"/>
987                   <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars">
988                     <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"/>
989                   </a>
990                 </td>
991               </tr>
992             </xsl:for-each>
993           </xsl:for-each>
994         </xsl:otherwise>
995       </xsl:choose>
996     </table>
997   </xsl:template>
998
999   <!--==== WEEK CALENDAR VIEW ====-->
1000   <xsl:template name="weekView">
1001     <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0">
1002       <tr>
1003         <xsl:for-each select="/bedework/daynames/val">
1004           <th class="dayHeading"><xsl:value-of select="."/></th>
1005         </xsl:for-each>
1006       </tr>
1007       <tr>
1008         <xsl:for-each select="/bedework/eventscalendar/year/month/week/day">
1009           <xsl:variable name="dayPos" select="position()"/>
1010           <xsl:if test="filler='false'">
1011             <td>
1012               <xsl:if test="/bedework/now/date = date">
1013                 <xsl:attribute name="class">today</xsl:attribute>
1014               </xsl:if>
1015               <xsl:variable name="dayDate" select="date"/>
1016               <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}" class="dayLink">
1017                 <xsl:value-of select="value"/>
1018               </a>
1019               <xsl:if test="event">
1020                 <ul>
1021                   <xsl:apply-templates select="event" mode="calendarLayout">
1022                     <xsl:with-param name="dayPos" select="$dayPos"/>
1023                   </xsl:apply-templates>
1024                 </ul>
1025               </xsl:if>
1026             </td>
1027           </xsl:if>
1028         </xsl:for-each>
1029       </tr>
1030     </table>
1031   </xsl:template>
1032
1033   <!--==== MONTH CALENDAR VIEW ====-->
1034   <xsl:template name="monthView">
1035     <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0">
1036       <tr>
1037         <xsl:for-each select="/bedework/daynames/val">
1038           <th class="dayHeading"><xsl:value-of select="."/></th>
1039         </xsl:for-each>
1040       </tr>
1041       <xsl:for-each select="/bedework/eventscalendar/year/month/week">
1042         <tr>
1043           <xsl:for-each select="day">
1044             <xsl:variable name="dayPos" select="position()"/>
1045             <xsl:choose>
1046               <xsl:when test="filler='true'">
1047                 <td class="filler">&#160;</td>
1048               </xsl:when>
1049               <xsl:otherwise>
1050                 <td>
1051                   <xsl:if test="/bedework/now/date = date">
1052                     <xsl:attribute name="class">today</xsl:attribute>
1053                   </xsl:if>
1054                   <xsl:variable name="dayDate" select="date"/>
1055                   <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}" class="dayLink">
1056                     <xsl:value-of select="value"/>
1057                   </a>
1058                   <xsl:if test="event">
1059                     <ul>
1060                       <xsl:apply-templates select="event" mode="calendarLayout">
1061                         <xsl:with-param name="dayPos" select="$dayPos"/>
1062                       </xsl:apply-templates>
1063                     </ul>
1064                   </xsl:if>
1065                 </td>
1066               </xsl:otherwise>
1067             </xsl:choose>
1068           </xsl:for-each>
1069         </tr>
1070       </xsl:for-each>
1071     </table>
1072   </xsl:template>
1073
1074   <!--== EVENTS IN THE CALENDAR GRID ==-->
1075   <xsl:template match="event" mode="calendarLayout">
1076     <xsl:param name="dayPos"/>
1077     <xsl:variable name="subscriptionId" select="subscription/id"/>
1078     <xsl:variable name="calPath" select="calendar/encodedPath"/>
1079     <xsl:variable name="guid" select="guid"/>
1080     <xsl:variable name="recurrenceId" select="recurrenceId"/>
1081     <xsl:variable name="eventClass">
1082       <xsl:choose>
1083         <!-- Special styles for the month grid -->
1084         <xsl:when test="status='CANCELLED'">eventCancelled</xsl:when>
1085         <xsl:when test="status='TENTATIVE'">eventTentative</xsl:when>
1086         <!-- Default alternating colors for all standard events -->
1087         <xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when>
1088         <xsl:otherwise>eventLinkB</xsl:otherwise>
1089       </xsl:choose>
1090     </xsl:variable>
1091     <!-- Subscription styles.
1092          These are set in the add/modify subscription forms in the admin client;
1093          if present, these override the background-color set by eventClass. The
1094          subscription styles should not be used for cancelled events (tentative is ok). -->
1095     <xsl:variable name="subscriptionClass">
1096       <xsl:if test="status != 'CANCELLED' and
1097                     subscription/subStyle != '' and
1098                     subscription/subStyle != 'default'"><xsl:value-of select="subscription/subStyle"/></xsl:if>
1099     </xsl:variable>
1100     <li>
1101       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" class="{$eventClass} {$subscriptionClass}">
1102         <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if>
1103         <xsl:choose>
1104           <xsl:when test="start/shortdate != ../shortdate">
1105             (cont)
1106           </xsl:when>
1107           <xsl:when test="start/allday = 'false'">
1108             <xsl:value-of select="start/time"/>:
1109           </xsl:when>
1110           <xsl:otherwise>
1111             all day:
1112           </xsl:otherwise>
1113         </xsl:choose>
1114         <xsl:value-of select="summary"/>
1115         <xsl:variable name="eventTipClass">
1116           <xsl:choose>
1117             <xsl:when test="$dayPos &gt; 5">eventTipReverse</xsl:when>
1118             <xsl:otherwise>eventTip</xsl:otherwise>
1119           </xsl:choose>
1120         </xsl:variable>
1121         <span class="{$eventTipClass}">
1122           <xsl:if test="status='CANCELLED'"><span class="eventTipStatusCancelled">CANCELLED</span></xsl:if>
1123           <xsl:if test="status='TENTATIVE'"><span class="eventTipStatusTentative">TENTATIVE</span></xsl:if>
1124           <strong><xsl:value-of select="summary"/></strong><br/>
1125           Time:
1126           <xsl:choose>
1127             <xsl:when test="start/allday = 'true'">
1128               all day
1129             </xsl:when>
1130             <xsl:otherwise>
1131               <xsl:if test="start/shortdate != ../shortdate">
1132                 <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/>
1133                 <xsl:text> </xsl:text>
1134               </xsl:if>
1135               <xsl:value-of select="start/time"/>
1136               <xsl:if test="(start/time != end/time) or (start/shortdate != end/shortdate)">
1137                 -
1138                 <xsl:if test="end/shortdate != ../shortdate">
1139                   <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/>
1140                   <xsl:text> </xsl:text>
1141                 </xsl:if>
1142                 <xsl:value-of select="end/time"/>
1143               </xsl:if>
1144             </xsl:otherwise>
1145           </xsl:choose><br/>
1146           <xsl:if test="location/address">
1147             Location: <xsl:value-of select="location/address"/><br/>
1148           </xsl:if>
1149           Calendar: <xsl:value-of select="calendar/name"/>
1150         </span>
1151       </a>
1152     </li>
1153   </xsl:template>
1154
1155   <!--==== YEAR VIEW ====-->
1156   <xsl:template name="yearView">
1157     <table id="yearCalendarTable" border="0" cellpadding="0" cellspacing="0">
1158       <tr>
1159         <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &lt;= 3]"/>
1160       </tr>
1161       <tr>
1162         <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 3) and (position() &lt;= 6)]"/>
1163       </tr>
1164       <tr>
1165         <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 6) and (position() &lt;= 9)]"/>
1166       </tr>
1167       <tr>
1168         <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &gt; 9]"/>
1169       </tr>
1170     </table>
1171   </xsl:template>
1172
1173   <!-- year view month tables -->
1174   <xsl:template match="month">
1175     <td>
1176       <table class="yearViewMonthTable" border="0" cellpadding="0" cellspacing="0">
1177         <tr>
1178           <td colspan="8" class="monthName">
1179             <xsl:variable name="firstDayOfMonth" select="week/day/date"/>
1180             <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$firstDayOfMonth}">
1181               <xsl:value-of select="longname"/>
1182             </a>
1183           </td>
1184         </tr>
1185         <tr>
1186           <th>&#160;</th>
1187           <xsl:for-each select="/bedework/shortdaynames/val">
1188             <th><xsl:value-of select="."/></th>
1189           </xsl:for-each>
1190         </tr>
1191         <xsl:for-each select="week">
1192           <tr>
1193             <td class="weekCell">
1194               <xsl:variable name="firstDayOfWeek" select="day/date"/>
1195               <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$firstDayOfWeek}">
1196                 <xsl:value-of select="value"/>
1197               </a>
1198             </td>
1199             <xsl:for-each select="day">
1200               <xsl:choose>
1201                 <xsl:when test="filler='true'">
1202                   <td class="filler">&#160;</td>
1203                 </xsl:when>
1204                 <xsl:otherwise>
1205                   <td>
1206                     <xsl:if test="/bedework/now/date = date">
1207                       <xsl:attribute name="class">today</xsl:attribute>
1208                     </xsl:if>
1209                     <xsl:variable name="dayDate" select="date"/>
1210                     <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}">
1211                       <xsl:attribute name="class">today</xsl:attribute>
1212                       <xsl:value-of select="value"/>
1213                     </a>
1214                   </td>
1215                 </xsl:otherwise>
1216               </xsl:choose>
1217             </xsl:for-each>
1218           </tr>
1219         </xsl:for-each>
1220       </table>
1221     </td>
1222   </xsl:template>
1223
1224   <!--==== CALENDARS PAGE ====-->
1225   <xsl:template match="calendars">
1226     <xsl:variable name="topLevelCalCount" select="count(calendar/calendar)"/>
1227     <table id="calPageTable" border="0" cellpadding="0" cellspacing="0">
1228       <tr>
1229         <th colspan="2">
1230           All Calendars
1231         </th>
1232       </tr>
1233       <tr>
1234         <td colspan="2" class="infoCell">
1235           <p class="info">
1236             Select a calendar from the list below to see only that calendar's events.
1237           </p>
1238           <div dojoType="FloatingPane" id="bwCalendarExportWidget"
1239                title="Export Calendar as iCal" toggle="fade" toggleDuration="150"
1240                windowState="minimized" hasShadow="true" displayMinimizeAction="true"
1241                resizable="false">
1242              <p>
1243               <strong>Calendar to export:</strong>
1244               <span id="bwCalendarExportWidgetCalName"></span>
1245             </p>
1246             <strong>Event date limits:</strong>
1247             <form name="exportCalendarForm" id="exportCalendarForm" action="{$export}" method="post">
1248               <!-- this value is passed into the form when the widget is requested -->
1249               <input type="hidden" name="calPath" value=""/>
1250               <!-- fill these on submit -->
1251               <input type="hidden" name="eventStartDate.year" value=""/>
1252               <input type="hidden" name="eventStartDate.month" value=""/>
1253               <input type="hidden" name="eventStartDate.day" value=""/>
1254               <input type="hidden" name="eventEndDate.year" value=""/>
1255               <input type="hidden" name="eventEndDate.month" value=""/>
1256               <input type="hidden" name="eventEndDate.day" value=""/>
1257               <!-- static fields -->
1258               <input type="hidden" name="nocache" value="no"/>
1259               <input type="hidden" name="skinName" value="ical"/>
1260               <input type="hidden" name="contentType" value="text/calendar"/>
1261               <input type="hidden" name="contentName" value="calendar.ics"/>
1262               <!-- visible fields -->
1263               <input type="radio" name="dateLimits" value="active" checked="checked" onclick="changeClass('exportDateRange','invisible')"/> today forward
1264               <input type="radio" name="dateLimits" value="none" onclick="changeClass('exportDateRange','invisible')"/> all dates
1265               <input type="radio" name="dateLimits" value="limited" onclick="changeClass('exportDateRange','visible')"/> date range
1266               <div id="exportDateRange" class="invisible">
1267                 Start: <div dojoType="dropdowndatepicker" formatLength="medium" saveFormat="yyyyMMdd" id="bwExportCalendarWidgetStartDate"><xsl:text> </xsl:text></div>
1268                 End: <div dojoType="dropdowndatepicker" formatLength="medium" saveFormat="yyyyMMdd" id="bwExportCalendarWidgetEndDate"><xsl:text> </xsl:text></div>
1269               </div>
1270               <p><input type="submit" value="export" class="bwWidgetSubmit" onclick="fillExportFields('exportCalendarForm');hideWidget('bwCalendarExportWidget')"/></p>
1271             </form>
1272           </div>
1273         </td>
1274       </tr>
1275       <tr>
1276         <td class="leftCell">
1277           <ul class="calendarTree">
1278             <xsl:apply-templates select="calendar/calendar[position() &lt;= ceiling($topLevelCalCount div 2)]" mode="calTree"/>
1279           </ul>
1280         </td>
1281         <td>
1282           <ul class="calendarTree">
1283             <xsl:apply-templates select="calendar/calendar[position() &gt; ceiling($topLevelCalCount div 2)]" mode="calTree"/>
1284           </ul>
1285         </td>
1286       </tr>
1287     </table>
1288   </xsl:template>
1289
1290   <xsl:template match="calendar" mode="calTree">
1291     <xsl:variable name="itemClass">
1292       <xsl:choose>
1293         <xsl:when test="calendarCollection='false'">folder</xsl:when>
1294         <xsl:otherwise>calendar</xsl:otherwise>
1295       </xsl:choose>
1296     </xsl:variable>
1297     <xsl:variable name="url" select="encodedPath"/>
1298     <li class="{$itemClass}">
1299       <a href="{$setSelection}&amp;calUrl={$url}" title="view calendar"><xsl:value-of select="name"/></a>
1300       <xsl:if test="calendarCollection='true'">
1301         <xsl:variable name="name" select="name"/>
1302         <xsl:variable name="calPath" select="path"/>
1303         <xsl:variable name="idForCal" select="translate(translate(path,'/','S'),' ','s')"/>
1304         <span class="exportCalLink">
1305           <a href="javascript:launchExportWidget('exportCalendarForm','{$export}','{$name}','{$calPath}')" id="{$idForCal}" title="export calendar as iCal">
1306             <img src="{$resourcesRoot}/images/calIconExport-sm.gif" width="13" height="13" alt="export calendar" border="0"/>
1307           </a>
1308         </span>
1309       </xsl:if>
1310       <xsl:if test="calendar">
1311         <ul>
1312           <xsl:apply-templates select="calendar" mode="calTree"/>
1313         </ul>
1314       </xsl:if>
1315     </li>
1316   </xsl:template>
1317
1318   <!--==== SEARCH RESULT ====-->
1319   <xsl:template name="searchResult">
1320     <h2 class="bwStatusConfirmed">
1321       <div id="searchFilter">
1322         <form name="searchForm" method="post" action="{$search}">
1323           Search:
1324           <input type="text" name="query" size="15">
1325             <xsl:attribute name="value"><xsl:value-of select="/bedework/searchResults/query"/></xsl:attribute>
1326           </input>
1327           <input type="submit" name="submit" value="go"/>
1328           Limit:
1329           <xsl:choose>
1330             <xsl:when test="/bedework/searchResults/searchLimits = 'beforeToday'">
1331               <input type="radio" name="searchLimits" value="fromToday"/>today forward
1332               <input type="radio" name="searchLimits" value="beforeToday" checked="checked"/>past dates
1333               <input type="radio" name="searchLimits" value="none"/>all dates
1334             </xsl:when>
1335             <xsl:when test="/bedework/searchResults/searchLimits = 'none'">
1336               <input type="radio" name="searchLimits" value="fromToday"/>today forward
1337               <input type="radio" name="searchLimits" value="beforeToday"/>past dates
1338               <input type="radio" name="searchLimits" value="none" checked="checked"/>all dates
1339             </xsl:when>
1340             <xsl:otherwise>
1341               <input type="radio" name="searchLimits" value="fromToday" checked="checked"/>today forward
1342               <input type="radio" name="searchLimits" value="beforeToday"/>past dates
1343               <input type="radio" name="searchLimits" value="none"/>all dates
1344             </xsl:otherwise>
1345           </xsl:choose>
1346         </form>
1347       </div>
1348       Search Result
1349     </h2>
1350     <table id="searchTable" cellpadding="0" cellspacing="0">
1351       <tr>
1352         <th colspan="5">
1353           <xsl:if test="/bedework/searchResults/numPages &gt; 1">
1354             <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/>
1355             <div id="searchPageForm">
1356               page:
1357               <xsl:if test="/bedework/searchResults/curPage != 1">
1358                 <xsl:variable name="prevPage" select="number($curPage) - 1"/>
1359                 &lt;<a href="{$search-next}&amp;pageNum={$prevPage}">prev</a>
1360               </xsl:if>
1361               <xsl:text> </xsl:text>
1362
1363               <xsl:call-template name="searchResultPageNav">
1364                 <xsl:with-param name="page">
1365                   <xsl:choose>
1366                     <xsl:when test="number($curPage) - 10 &lt; 1">1</xsl:when>
1367                     <xsl:otherwise><xsl:value-of select="number($curPage) - 6"/></xsl:otherwise>
1368                   </xsl:choose>
1369                 </xsl:with-param>
1370               </xsl:call-template>
1371
1372               <xsl:text> </xsl:text>
1373               <xsl:choose>
1374                 <xsl:when test="$curPage != /bedework/searchResults/numPages">
1375                   <xsl:variable name="nextPage" select="number($curPage) + 1"/>
1376                   <a href="{$search-next}&amp;pageNum={$nextPage}">next</a>&gt;
1377                 </xsl:when>
1378                 <xsl:otherwise>
1379                   <span class="hidden">next&gt;</span><!-- occupy the space to keep the navigation from moving around -->
1380                 </xsl:otherwise>
1381               </xsl:choose>
1382             </div>
1383           </xsl:if>
1384           <xsl:value-of select="/bedework/searchResults/resultSize"/>
1385           result<xsl:if test="/bedework/searchResults/resultSize != 1">s</xsl:if> returned
1386           for <em><xsl:value-of select="/bedework/searchResults/query"/></em>
1387         </th>
1388       </tr>
1389       <xsl:if test="/bedework/searchResults/searchResult">
1390         <tr class="fieldNames">
1391           <td>
1392             relevance
1393           </td>
1394           <td>
1395             summary
1396           </td>
1397           <td>
1398             date &amp; time
1399           </td>
1400           <td>
1401             calendar
1402           </td>
1403           <td>
1404             location
1405           </td>
1406         </tr>
1407       </xsl:if>
1408       <xsl:for-each select="/bedework/searchResults/searchResult">
1409         <xsl:variable name="subscriptionId" select="event/subscription/id"/>
1410         <xsl:variable name="calPath" select="event/calendar/encodedPath"/>
1411         <xsl:variable name="guid" select="event/guid"/>
1412         <xsl:variable name="recurrenceId" select="event/recurrenceId"/>
1413         <tr>
1414           <td class="relevance">
1415             <xsl:value-of select="ceiling(number(score)*100)"/>%
1416             <img src="{$resourcesRoot}/images/spacer.gif" height="4" class="searchRelevance">
1417               <xsl:attribute name="width"><xsl:value-of select="ceiling((number(score)*100) div 1.5)"/></xsl:attribute>
1418             </img>
1419           </td>
1420           <td>
1421             <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
1422               <xsl:value-of select="event/summary"/>
1423             </a>
1424           </td>
1425           <td>
1426             <xsl:value-of select="event/start/longdate"/>
1427             <xsl:text> </xsl:text>
1428             <xsl:value-of select="event/start/time"/>
1429             <xsl:choose>
1430               <xsl:when test="event/start/longdate != event/end/longdate">
1431                 - <xsl:value-of select="event/start/longdate"/>
1432                 <xsl:text> </xsl:text>
1433                 <xsl:value-of select="event/end/time"/>
1434               </xsl:when>
1435               <xsl:when test="event/start/time != event/end/time">
1436                 - <xsl:value-of select="event/end/time"/>
1437               </xsl:when>
1438             </xsl:choose>
1439           </td>
1440           <td>
1441             <xsl:variable name="calUrl" select="event/calendar/encodedPath"/>
1442             <a href="{$setSelection}&amp;calUrl={$calUrl}">
1443               <xsl:value-of select="event/calendar/name"/>
1444             </a>
1445           </td>
1446           <td>
1447             <xsl:value-of select="event/location/address"/>
1448           </td>
1449         </tr>
1450       </xsl:for-each>
1451     </table>
1452   </xsl:template>
1453
1454   <xsl:template name="searchResultPageNav">
1455     <xsl:param name="page">1</xsl:param>
1456     <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/>
1457     <xsl:variable name="numPages" select="/bedework/searchResults/numPages"/>
1458     <xsl:variable name="endPage">
1459       <xsl:choose>
1460         <xsl:when test="number($curPage) + 6 &gt; number($numPages)"><xsl:value-of select="$numPages"/></xsl:when>
1461         <xsl:otherwise><xsl:value-of select="number($curPage) + 6"/></xsl:otherwise>
1462       </xsl:choose>
1463     </xsl:variable>
1464     <xsl:choose>
1465       <xsl:when test="$page = $curPage">
1466         <xsl:value-of select="$page"/>
1467       </xsl:when>
1468       <xsl:otherwise>
1469         <a href="{$search-next}&amp;pageNum={$page}">
1470           <xsl:value-of select="$page"/>
1471         </a>
1472       </xsl:otherwise>
1473     </xsl:choose>
1474     <xsl:text> </xsl:text>
1475     <xsl:if test="$page &lt; $endPage">
1476        <xsl:call-template name="searchResultPageNav">
1477          <xsl:with-param name="page" select="number($page)+1"/>
1478       </xsl:call-template>
1479     </xsl:if>
1480   </xsl:template>
1481
1482   <!--+++++++++++++++ System Stats ++++++++++++++++++++-->
1483   <xsl:template name="stats">
1484     <div id="stats">
1485       <h2>System Statistics</h2>
1486
1487       <p>
1488         Stats collection:
1489       </p>
1490       <ul>
1491         <li>
1492           <a href="{$stats}&amp;enable=yes">enable</a> |
1493           <a href="{$stats}&amp;disable=yes">disable</a>
1494         </li>
1495         <li><a href="{$stats}&amp;fetch=yes">fetch statistics</a></li>
1496         <li><a href="{$stats}&amp;dump=yes">dump stats to log</a></li>
1497       </ul>
1498       <table id="statsTable" cellpadding="0">
1499         <xsl:for-each select="/bedework/sysStats/*">
1500           <xsl:choose>
1501             <xsl:when test="name(.) = 'header'">
1502               <tr>
1503                 <th colspan="2">
1504                   <xsl:value-of select="."/>
1505                 </th>
1506               </tr>
1507             </xsl:when>
1508             <xsl:otherwise>
1509               <tr>
1510                 <td class="label">
1511                   <xsl:value-of select="label"/>
1512                 </td>
1513                 <td class="value">
1514                   <xsl:value-of select="value"/>
1515                 </td>
1516               </tr>
1517             </xsl:otherwise>
1518           </xsl:choose>
1519         </xsl:for-each>
1520       </table>
1521     </div>
1522   </xsl:template>
1523
1524   <!--==== UTILITY TEMPLATES ====-->
1525
1526   <!-- search and replace template taken from
1527        http://www.biglist.com/lists/xsl-list/archives/200211/msg00337.html -->
1528   <xsl:template name="replace">
1529     <xsl:param name="string" select="''"/>
1530     <xsl:param name="pattern" select="''"/>
1531     <xsl:param name="replacement" select="''"/>
1532     <xsl:choose>
1533       <xsl:when test="$pattern != '' and $string != '' and contains($string, $pattern)">
1534         <xsl:value-of select="substring-before($string, $pattern)"/>
1535         <xsl:copy-of select="$replacement"/>
1536         <xsl:call-template name="replace">
1537           <xsl:with-param name="string" select="substring-after($string, $pattern)"/>
1538           <xsl:with-param name="pattern" select="$pattern"/>
1539           <xsl:with-param name="replacement" select="$replacement"/>
1540         </xsl:call-template>
1541       </xsl:when>
1542       <xsl:otherwise>
1543         <xsl:value-of select="$string"/>
1544       </xsl:otherwise>
1545     </xsl:choose>
1546   </xsl:template>
1547
1548   <!--==== FOOTER ====-->
1549
1550   <xsl:template name="footer">
1551     <div id="footer">
1552       Demonstration calendar; place footer information here.
1553     </div>
1554     <table id="skinSelectorTable" border="0" cellpadding="0" cellspacing="0">
1555       <tr>
1556         <td class="leftCell">
1557           Based on the <a href="http://www.bedework.org/">Bedework Website</a> |
1558           <a href="?noxslt=yes">show XML</a> |
1559           <a href="?refreshXslt=yes">refresh XSLT</a>
1560         </td>
1561         <td class="rightCell">
1562           <form name="styleSelectForm" method="post" action="{$setup}">
1563             <select name="setappvar" onchange="submit()">
1564               <option>example styles:</option>
1565               <option value="style(green)">green</option>
1566               <option value="style(red)">red</option>
1567               <option value="style(blue)">blue</option>
1568             </select>
1569           </form>
1570           <form name="skinSelectForm" method="post" action="{$setup}">
1571             <input type="hidden" name="setappvar" value="summaryMode(details)"/>
1572             <select name="skinPicker" onchange="window.location = this.value">
1573               <option>example skins:</option>
1574               <option value="{$setViewPeriod}&amp;viewType=weekView&amp;skinName=rss&amp;setappvar=summaryMode(details)">rss feed</option>
1575               <option value="{$setViewPeriod}&amp;viewType=todayView&amp;skinName=jsToday&amp;contentType=text/javascript&amp;contentName=bedework.js">javascript feed</option>
1576               <option value="{$setViewPeriod}&amp;viewType=todayView&amp;skinName=videocal">video feed</option>
1577               <option value="{$setup}&amp;skinName=default">reset to calendar default</option>
1578             </select>
1579           </form>
1580           <form name="skinSelectForm" method="post" action="">
1581             <select name="sitePicker" onchange="window.location = this.value">
1582               <option>production examples:</option>
1583               <option value="http://events.dal.ca/">Dalhousie</option>
1584               <option value="http://events.rpi.edu">Rensselaer</option>
1585               <option value="http://myuw.washington.edu/cal/">Washington</option>
1586             </select>
1587           </form>
1588         </td>
1589       </tr>
1590     </table>
1591   </xsl:template>
1592 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.