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

Revision 81 (checked in by johnsa, 7 years ago)

updated ical download in public stylsheet to work with new export action
modified ical and vcal skins to use new export data

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="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="/ucalendar/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="/ucalendar/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="/ucalendar/urlPrefixes/setup"/>
53   <xsl:variable name="selectView" select="/ucalendar/urlPrefixes/selectView"/>
54   <xsl:variable name="showCals" select="/ucalendar/urlPrefixes/showCals"/>
55   <xsl:variable name="setView" select="/ucalendar/urlPrefixes/setView"/>
56   <xsl:variable name="eventView" select="/ucalendar/urlPrefixes/eventView"/>
57   <xsl:variable name="addEventRef" select="/ucalendar/urlPrefixes/addEventRef"/>
58   <xsl:variable name="export" select="/ucalendar/urlPrefixes/export"/>
59   <xsl:variable name="mailEvent" select="/ucalendar/urlPrefixes/mailEvent"/>
60   <xsl:variable name="showPage" select="/ucalendar/urlPrefixes/showPage"/>
61
62   <!-- Other generally useful global variables -->
63   <xsl:variable name="privateCal">/ucal</xsl:variable>
64   <xsl:variable name="prevdate" select="/ucalendar/previousdate"/>
65   <xsl:variable name="nextdate" select="/ucalendar/nextdate"/>
66   <xsl:variable name="curdate" select="/ucalendar/currentdate/date"/>
67   <xsl:variable name="skin">default</xsl:variable>
68
69   <!--========= BEGIN DEPRECATED VARIABLES =========-->
70   <!-- Rewritten URL pattern for the web application - includes web context, a
71        dummy action (DUMMYACTION.do) and all container or portal generated
72        strings; the latter are needed for proper behavior in portal environments
73        or if users have cookies turned off, etc.
74   <xsl:variable name="urlPattern" select="/ucalendar/urlpattern"/> -->
75
76   <!-- All values that follow DUMMYACTION.do in the urlPattern; may include
77        session ids (before the query string), a query string, etc.
78        We must append our actions with this suffix *followed by*
79        any other query parameters we add ourselves.
80   <xsl:variable name="urlSuffix" select="substring-after($urlPattern,'DUMMYACTION.do')"/>-->
81
82   <!-- Query string start character:
83        If the container or portal has added a query string to the URL, we need
84        to append our own query parameters using an ampersand.  Otherwise, we
85        need to begin with a question mark.
86   <xsl:variable name="queryChar">
87     <xsl:choose>
88       <xsl:when test="contains($urlSuffix,'?')">&amp;</xsl:when>
89       <xsl:otherwise>?</xsl:otherwise>
90     </xsl:choose>
91   </xsl:variable>-->
92
93   <!-- URL of the web application - includes host, port, and web context.  This
94        value was originally prepended to all URLs generated in this stylesheet
95        but will probably be deprecated in favor of relative references
96   <xsl:variable name="urlPrefix" select="/ucalendar/urlprefix"/>  -->
97   <!--========= END DEPRECATED VARIABLES =========-->
98
99
100   <!-- MAIN TEMPLATE -->
101   <xsl:template match="/">
102     <html lang="en">
103       <head>
104         <title>Calendar of Events</title>
105         <xsl:choose>
106           <xsl:when test="/ucalendar/appvar[key='style']/value='red'">
107             <link rel="stylesheet" href="{$resourcesRoot}/default/default/red.css"/>
108           </xsl:when>
109           <xsl:when test="/ucalendar/appvar[key='style']/value='blue'">
110             <link rel="stylesheet" href="{$resourcesRoot}/default/default/blue.css"/>
111           </xsl:when>
112           <xsl:otherwise>
113             <link rel="stylesheet" href="{$resourcesRoot}/default/default/green.css"/>
114           </xsl:otherwise>
115         </xsl:choose>
116         <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" />
117       </head>
118       <body>
119         <xsl:call-template name="headBar"/>
120         <xsl:if test="/ucalendar/error">
121           <div id="errors">
122             <p><xsl:apply-templates select="/ucalendar/error"/></p>
123           </div>
124         </xsl:if>
125         <!-- <xsl:call-template name="alerts"/> -->
126         <xsl:call-template name="tabs"/>
127         <xsl:choose>
128           <xsl:when test="/ucalendar/page='event'">
129             <!-- show an event -->
130             <xsl:apply-templates select="/ucalendar/event"/>
131           </xsl:when>
132           <xsl:when test="/ucalendar/page='calendars'">
133             <!-- show a list of all calendars -->
134             <xsl:apply-templates select="/ucalendar/calendars"/>
135           </xsl:when>
136           <xsl:when test="/ucalendar/page='emailOptions'">
137             <xsl:call-template name="emailOptions" />
138           </xsl:when>
139           <xsl:otherwise>
140             <!-- otherwise, show the eventsCalendar -->
141             <xsl:call-template name="navigation"/>
142             <xsl:if test="/ucalendar/periodname!='Year'">
143               <xsl:call-template name="searchBar"/>
144             </xsl:if>
145             <!-- main eventCalendar content -->
146             <xsl:choose>
147               <xsl:when test="/ucalendar/periodname='Day'">
148                 <xsl:call-template name="listView"/>
149               </xsl:when>
150               <xsl:when test="/ucalendar/periodname='Week' or /ucalendar/periodname=''">
151                 <xsl:choose>
152                   <xsl:when test="/ucalendar/appvar[key='weekViewMode']/value='list'">
153                     <xsl:call-template name="listView"/>
154                   </xsl:when>
155                   <xsl:otherwise>
156                     <xsl:call-template name="weekView"/>
157                   </xsl:otherwise>
158                 </xsl:choose>
159               </xsl:when>
160               <xsl:when test="/ucalendar/periodname='Month'">
161                 <xsl:choose>
162                   <xsl:when test="/ucalendar/appvar[key='monthViewMode']/value='list'">
163                     <xsl:call-template name="listView"/>
164                   </xsl:when>
165                   <xsl:otherwise>
166                     <xsl:call-template name="monthView"/>
167                   </xsl:otherwise>
168                 </xsl:choose>
169               </xsl:when>
170               <xsl:otherwise>
171                 <xsl:call-template name="yearView"/>
172               </xsl:otherwise>
173             </xsl:choose>
174           </xsl:otherwise>
175         </xsl:choose>
176         <!-- footer -->
177         <xsl:call-template name="footer"/>
178       </body>
179     </html>
180   </xsl:template>
181
182   <!--==== SINGLE EVENT ====-->
183   <xsl:template match="event">
184     <table id="eventTable" cellpadding="0" cellspacing="0">
185       <tr>
186         <th class="fieldname">Event:</th>
187         <th class="fieldval">
188           <xsl:choose>
189             <xsl:when test="link != ''">
190               <xsl:variable name="link" select="link"/>
191               <a href="{$link}">
192                 <xsl:value-of select="summary"/>
193               </a>
194             </xsl:when>
195             <xsl:otherwise>
196               <xsl:value-of select="summary"/>
197             </xsl:otherwise>
198           </xsl:choose>
199         </th>
200         <th class="icalIcon" rowspan="2">
201           <xsl:variable name="id" select="id"/>
202           <xsl:variable name="subscriptionId" select="subscription/id"/>
203           <xsl:variable name="guid" select="guid"/>
204           <xsl:variable name="recurrenceId" select="recurrenceId"/>
205           <a href="{$privateCal}/addEventRef.do?eventId={$id}" title="Add event to MyCalendar" target="myCalendar">
206             <img class="addref" src="{$resourcesRoot}/images/demo/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/>
207           </a>
208           <xsl:variable name="eventIcalName" select="concat($id,'.ics')"/>
209           <a href="{$export}?subid={$subscriptionId}&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">
210             <img src="{$resourcesRoot}/images/demo/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/>
211           </a>
212         </th>
213       </tr>
214       <tr>
215         <td class="fieldname">When:</td>
216         <td class="fieldval">
217           <!-- was using abbrev dayname: substring(start/dayname,1,3) -->
218           <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text>
219           <span class="time"><xsl:value-of select="start/time"/></span>
220           <xsl:if test="end/time != '' or end/longdate != start/longdate"> - </xsl:if>
221           <xsl:if test="end/longdate != start/longdate"><xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text></xsl:if>
222           <xsl:if test="end/time != ''"><span class="time"><xsl:value-of select="end/time"/></span></xsl:if>
223         </td>
224       </tr>
225       <tr>
226         <td class="fieldname">Where:</td>
227         <td colspan="2" class="fieldval">
228           <xsl:choose>
229             <xsl:when test="location/link=''">
230               <xsl:value-of select="location/address"/>
231             </xsl:when>
232             <xsl:otherwise>
233               <xsl:variable name="locationLink" select="location/link"/>
234               <a href="{$locationLink}">
235                 <xsl:value-of select="location/address"/>
236               </a>
237             </xsl:otherwise>
238           </xsl:choose>
239           <xsl:if test="location/subaddress!=''">
240             <br/><xsl:value-of select="location/subaddress"/>
241           </xsl:if>
242         </td>
243       </tr>
244       <tr>
245         <td class="fieldname">Description:</td>
246         <td colspan="2" class="fieldval">
247           <xsl:value-of select="description"/>
248         </td>
249       </tr>
250        <xsl:if test="cost!=''">
251         <tr>
252           <td class="fieldname">Cost:</td>
253           <td colspan="2" class="fieldval"><xsl:value-of select="cost"/></td>
254         </tr>
255       </xsl:if>
256       <xsl:if test="link != ''">
257         <tr>
258           <td class="fieldname">See:</td>
259           <td colspan="2" class="fieldval">
260             <xsl:variable name="link" select="link"/>
261             <a href="{$link}"><xsl:value-of select="link"/></a>
262           </td>
263         </tr>
264       </xsl:if>
265       <xsl:if test="sponsor/name!='none'">
266         <tr>
267           <td class="fieldname">Contact:</td>
268           <td colspan="2" class="fieldval">
269             <xsl:choose>
270               <xsl:when test="sponsor/link=''">
271                 <xsl:value-of select="sponsor/name"/>
272               </xsl:when>
273               <xsl:otherwise>
274                 <xsl:variable name="sponsorLink" select="sponsor/link"/>
275                 <a href="{$sponsorLink}">
276                   <xsl:value-of select="sponsor/name"/>
277                 </a>
278               </xsl:otherwise>
279             </xsl:choose>
280             <xsl:if test="sponsor/phone!=''">
281               <br /><xsl:value-of select="sponsor/phone"/>
282             </xsl:if>
283             <!-- If you want to display email addresses, uncomment the
284                  following 8 lines. -->
285             <!-- <xsl:if test="sponsor/email!=''">
286               <br />
287               <xsl:variable name="email" select="sponsor/email"/>
288               <xsl:variable name="subject" select="summary"/>
289               <a href="mailto:{$email}?subject={$subject}">
290                 <xsl:value-of select="sponsor/email"/>
291               </a>
292             </xsl:if> -->
293           </td>
294         </tr>
295       </xsl:if>
296     </table>
297   </xsl:template>
298
299   <!--==== LIST VIEW  (for day, week, and month) ====-->
300   <xsl:template name="listView">
301     <table id="listTable" border="0" cellpadding="0" cellspacing="0">
302       <xsl:choose>
303         <xsl:when test="count(/ucalendar/eventscalendar/year/month/week/day/event)=0">
304           <tr>
305             <td class="noEventsCell">
306               There are no events posted
307               <xsl:choose>
308                 <xsl:when test="/ucalendar/periodname='Day'">
309                   today<xsl:if test="/ucalendar/title!=''"> for <strong><xsl:value-of select="/ucalendar/title"/></strong></xsl:if><xsl:if test="/ucalendar/search!=''"> for search term <strong>"<xsl:value-of select="/ucalendar/search"/>"</strong></xsl:if>.
310                 </xsl:when>
311                 <xsl:when test="/ucalendar/periodname='Month'">
312                   this month<xsl:if test="/ucalendar/title!=''"> for <strong><xsl:value-of select="/ucalendar/title"/></strong></xsl:if><xsl:if test="/ucalendar/search!=''"> for search term <strong>"<xsl:value-of select="/ucalendar/search"/>"</strong></xsl:if>.
313                 </xsl:when>
314                 <xsl:otherwise>
315                   this week<xsl:if test="/ucalendar/title!=''"> for <strong><xsl:value-of select="/ucalendar/title"/></strong></xsl:if><xsl:if test="/ucalendar/search!=''"> for search term <strong>"<xsl:value-of select="/ucalendar/search"/>"</strong></xsl:if>.
316                 </xsl:otherwise>
317               </xsl:choose>
318             </td>
319           </tr>
320         </xsl:when>
321         <xsl:otherwise>
322           <xsl:for-each select="/ucalendar/eventscalendar/year/month/week/day[count(event)!=0]">
323             <xsl:if test="/ucalendar/periodname='Week' or /ucalendar/periodname='Month' or /ucalendar/periodname=''">
324               <tr>
325                 <td colspan="5" class="dateRow">
326                    <xsl:variable name="date" select="date"/>
327                    <a href="{$setView}?viewType=dayView&amp;date={$date}">
328                      <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/>
329                    </a>
330                 </td>
331               </tr>
332             </xsl:if>
333             <xsl:for-each select="event">
334               <xsl:variable name="id" select="id"/>
335               <xsl:variable name="subscriptionId" select="subscription/id"/>
336               <xsl:variable name="guid" select="guid"/>
337               <xsl:variable name="recurrenceId" select="recurrenceId"/>
338               <tr>
339                 <xsl:variable name="dateRangeStyle">
340                   <xsl:choose>
341                     <xsl:when test="start/date = parent::day/date">
342                       <xsl:choose>
343                         <xsl:when test="(start/hour24 = '0') and (end/hour24 = '0')">dateRangeCrossDay</xsl:when>
344                         <xsl:when test="start/hour24 &lt; 6">dateRangeEarlyMorning</xsl:when>
345                         <xsl:when test="start/hour24 &lt; 12">dateRangeMorning</xsl:when>
346                         <xsl:when test="start/hour24 &lt; 18">dateRangeAfternoon</xsl:when>
347                         <xsl:otherwise>dateRangeEvening</xsl:otherwise>
348                       </xsl:choose>
349                     </xsl:when>
350                     <xsl:otherwise>dateRangeCrossDay</xsl:otherwise>
351                   </xsl:choose>
352                 </xsl:variable>
353                 <td class="{$dateRangeStyle}" style="text-align:right;">
354                   <xsl:choose>
355                     <xsl:when test="start/time!=''">
356                       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
357                       <xsl:choose>
358                         <xsl:when test="parent::day/shortdate != start/shortdate">
359                           <span class="littleArrow">&#171;</span>&#160;
360                           <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/>
361                         </xsl:when>
362                         <xsl:otherwise>
363                           <xsl:value-of select="start/time"/>
364                         </xsl:otherwise>
365                       </xsl:choose>
366                       </a>
367                     </xsl:when>
368                     <xsl:otherwise>
369                       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
370                         All day
371                       </a>
372                     </xsl:otherwise>
373                   </xsl:choose>
374                 </td>
375                 <td class="{$dateRangeStyle}" style="text-align:center;padding:0em;">
376                   <xsl:choose>
377                     <xsl:when test="end/time!=''">
378                       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">-</a>
379                     </xsl:when>
380                     <xsl:otherwise>
381                       &#160;
382                     </xsl:otherwise>
383                   </xsl:choose>
384                 </td>
385                 <td class="{$dateRangeStyle}" style="text-align:left;">
386                   <xsl:choose>
387                     <xsl:when  test="end/time!=''">
388                       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
389                       <xsl:choose>
390                         <xsl:when test="parent::day/shortdate != end/shortdate">
391                           <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/>
392                           &#160;<span class="littleArrow">&#187;</span>
393                         </xsl:when>
394                         <xsl:otherwise>
395                           <xsl:value-of select="end/time"/>
396                         </xsl:otherwise>
397                       </xsl:choose>
398                       </a>
399                     </xsl:when>
400                     <xsl:otherwise>
401                       &#160;
402                     </xsl:otherwise>
403                   </xsl:choose>
404                 </td>
405                 <xsl:variable name="descriptionClass">
406                   <xsl:choose>
407                     <xsl:when test="contains(summary,'CANCELLED')">description cancelled</xsl:when>
408                     <xsl:otherwise>description</xsl:otherwise>
409                   </xsl:choose>
410                 </xsl:variable>
411                 <td class="{$descriptionClass}">
412                   <xsl:choose>
413                     <xsl:when test="/ucalendar/appvar[key='summaryMode']/value='details'">
414                       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
415                         <strong><xsl:value-of select="summary"/>: </strong>
416                         <xsl:value-of select="description"/>&#160;
417                         <em>
418                           <xsl:value-of select="location/address"/>
419                           <xsl:if test="location/subaddress != ''">
420                             , <xsl:value-of select="location/subaddress"/>
421                           </xsl:if>.&#160;
422                           <xsl:if test="cost!=''">
423                             <xsl:value-of select="cost"/>.&#160;
424                           </xsl:if>
425                           <xsl:if test="sponsor/name!='none'">
426                             Contact: <xsl:value-of select="sponsor/name"/>
427                           </xsl:if>
428                         </em>
429                       </a>
430                       <xsl:if test="link != ''">
431                         <xsl:variable name="link" select="link"/>
432                         <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a>
433                       </xsl:if>
434                     </xsl:when>
435                     <xsl:otherwise>
436                       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
437                         <xsl:value-of select="summary"/>, <xsl:value-of select="location/address"/>
438                       </a>
439                     </xsl:otherwise>
440                   </xsl:choose>
441                 </td>
442                 <td class="icons">
443                   <variable name="confId" select="/ucalendar/confirmationid"/>
444                   <a href="{$privateCal}/addEventRef.do?eventId={$id}" title="Add event to MyCalendar" target="myCalendar">
445                     <img class="addref" src="{$resourcesRoot}/images/demo/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="Add event to MyCalendar"/>
446                   </a>
447                   <xsl:variable name="icalName" select="concat($id,'.ics')"/>
448                   <a href="{$eventView}?eventId=subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$icalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars">
449                     <img src="{$resourcesRoot}/images/demo/std-ical_icon_small.gif" width="12" height="16" border="0" alt="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"/>
450                   </a>
451                 </td>
452               </tr>
453             </xsl:for-each>
454           </xsl:for-each>
455         </xsl:otherwise>
456       </xsl:choose>
457     </table>
458   </xsl:template>
459
460   <!--==== WEEK CALENDAR VIEW ====-->
461   <xsl:template name="weekView">
462     <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0">
463       <tr>
464         <xsl:for-each select="/ucalendar/daynames/val">
465           <th class="dayHeading"><xsl:value-of select="."/></th>
466         </xsl:for-each>
467       </tr>
468       <tr>
469         <xsl:for-each select="/ucalendar/eventscalendar/year/month/week/day">
470           <xsl:variable name="dayPos" select="position()"/>
471           <xsl:if test="filler='false'">
472             <td>
473               <xsl:variable name="dayDate" select="date"/>
474               <a href="{$setView}?viewType=dayView&amp;date={$dayDate}" class="dayLink">
475                 <xsl:value-of select="value"/>
476               </a>
477               <ul>
478                 <xsl:apply-templates select="event" mode="calendarLayout">
479                   <xsl:with-param name="dayPos" select="$dayPos"/>
480                 </xsl:apply-templates>
481               </ul>
482             </td>
483           </xsl:if>
484         </xsl:for-each>
485       </tr>
486     </table>
487   </xsl:template>
488
489   <!--==== MONTH CALENDAR VIEW ====-->
490   <xsl:template name="monthView">
491     <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0">
492       <tr>
493         <xsl:for-each select="/ucalendar/daynames/val">
494           <th class="dayHeading"><xsl:value-of select="."/></th>
495         </xsl:for-each>
496       </tr>
497       <xsl:for-each select="/ucalendar/eventscalendar/year/month/week">
498         <tr>
499           <xsl:for-each select="day">
500            <xsl:variable name="dayPos" select="position()"/>
501             <xsl:choose>
502               <xsl:when test="filler='true'">
503                 <td class="filler">&#160;</td>
504               </xsl:when>
505               <xsl:otherwise>
506                 <td>
507                   <xsl:variable name="dayDate" select="date"/>
508                   <a href="{$setView}?viewType=dayView&amp;date={$dayDate}" class="dayLink">
509                     <xsl:value-of select="value"/>
510                   </a>
511                   <ul>
512                     <xsl:apply-templates select="event" mode="calendarLayout">
513                       <xsl:with-param name="dayPos" select="$dayPos"/>
514                     </xsl:apply-templates>
515                   </ul>
516                 </td>
517               </xsl:otherwise>
518             </xsl:choose>
519           </xsl:for-each>
520         </tr>
521       </xsl:for-each>
522     </table>
523   </xsl:template>
524
525   <xsl:template match="event" mode="calendarLayout">
526     <xsl:param name="dayPos"/>
527     <xsl:variable name="subscriptionId" select="subscription/id"/>
528     <xsl:variable name="guid" select="guid"/>
529     <xsl:variable name="recurrenceId" select="recurrenceId"/>
530     <xsl:variable name="eventClass">
531       <xsl:choose>
532         <!-- Special styles for the month grid -->
533         <xsl:when test="contains(summary,'CANCELLED')">eventCancelled</xsl:when>
534         <xsl:when test="calendar/name='Holidays'">holiday</xsl:when>
535         <!-- Alternating colors for all standard events -->
536         <xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when>
537         <xsl:otherwise>eventLinkB</xsl:otherwise>
538       </xsl:choose>
539     </xsl:variable>
540     <li>
541       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" class="{$eventClass}">
542         <xsl:value-of select="summary"/>
543         <xsl:variable name="eventTipClass">
544           <xsl:choose>
545             <xsl:when test="$dayPos &gt; 5">eventTipReverse</xsl:when>
546             <xsl:otherwise>eventTip</xsl:otherwise>
547           </xsl:choose>
548         </xsl:variable>
549         <span class="{$eventTipClass}">
550           <strong><xsl:value-of select="summary"/></strong><br/>
551           <xsl:if test="start/time != ''">
552             Time: <xsl:value-of select="start/time"/>
553             <xsl:if test="end/time != ''">
554               - <xsl:value-of select="end/time"/>
555             </xsl:if>
556             <br/>
557           </xsl:if>
558           <xsl:if test="location/address">
559             Location: <xsl:value-of select="location/address"/><br/>
560           </xsl:if>
561           Calendar: <xsl:value-of select="calendar/name"/>
562         </span>
563       </a>
564     </li>
565   </xsl:template>
566
567   <!--==== YEAR VIEW ====-->
568   <xsl:template name="yearView">
569     <table id="yearCalendarTable" border="0" cellpadding="0" cellspacing="0">
570       <tr>
571         <xsl:apply-templates select="/ucalendar/eventscalendar/year/month[position() &lt;= 3]"/>
572       </tr>
573       <tr>
574         <xsl:apply-templates select="/ucalendar/eventscalendar/year/month[(position() &gt; 3) and (position() &lt;= 6)]"/>
575       </tr>
576       <tr>
577         <xsl:apply-templates select="/ucalendar/eventscalendar/year/month[(position() &gt; 6) and (position() &lt;= 9)]"/>
578       </tr>
579       <tr>
580         <xsl:apply-templates select="/ucalendar/eventscalendar/year/month[position() &gt; 9]"/>
581       </tr>
582     </table>
583   </xsl:template>
584
585   <!-- year view month tables -->
586   <xsl:template match="month">
587     <td>
588       <table class="yearViewMonthTable" border="0" cellpadding="0" cellspacing="0">
589         <tr>
590           <td colspan="8" class="monthName">
591             <xsl:variable name="firstDayOfMonth" select="week/day/date"/>
592             <a href="{$setView}?viewType=monthView&amp;date={$firstDayOfMonth}">
593               <xsl:value-of select="longname"/>
594             </a>
595           </td>
596         </tr>
597         <tr>
598           <th>&#160;</th>
599           <xsl:for-each select="/ucalendar/shortdaynames/val">
600             <th><xsl:value-of select="."/></th>
601           </xsl:for-each>
602         </tr>
603         <xsl:for-each select="week">
604           <tr>
605             <td class="weekCell">
606               <xsl:variable name="firstDayOfWeek" select="day/date"/>
607               <a href="{$setView}?viewType=weekView&amp;date={$firstDayOfWeek}">
608                 <xsl:value-of select="value"/>
609               </a>
610             </td>
611             <xsl:for-each select="day">
612               <xsl:choose>
613                 <xsl:when test="filler='true'">
614                   <td class="filler">&#160;</td>
615                 </xsl:when>
616                 <xsl:otherwise>
617                   <td>
618                     <xsl:variable name="dayDate" select="date"/>
619                     <a href="{$setView}?viewType=dayView&amp;date={$dayDate}">
620                       <xsl:value-of select="value"/>
621                     </a>
622                   </td>
623                 </xsl:otherwise>
624               </xsl:choose>
625             </xsl:for-each>
626           </tr>
627         </xsl:for-each>
628       </table>
629     </td>
630   </xsl:template>
631
632   <!--==== CALENDARS PAGE ====-->
633   <xsl:template match="calendars">
634     <xsl:variable name="topLevelCalCount" select="count(/ucalendar/calendars/calendar)"/>
635     <table id="calPageTable" border="0" cellpadding="0" cellspacing="0">
636       <tr>
637         <th colspan="2">
638           All Calendars
639         </th>
640       </tr>
641       <tr>
642         <td colspan="2" class="infoCell">
643           Select a calendar from the list below to see only that calendar's events.
644         </td>
645       </tr>
646       <tr>
647         <td class="leftCell">
648           <xsl:apply-templates select="calendar[position() &lt;= floor($topLevelCalCount div 2)]"/>
649         </td>
650         <td>
651           <xsl:apply-templates select="calendar[position() &gt; floor($topLevelCalCount div 2)]"/>
652         </td>
653       </tr>
654     </table>
655   </xsl:template>
656
657   <xsl:template match="calendar">
658     <xsl:variable name="id" select="id"/>
659     <h2><a href="{$selectView}?calId={$id}"><xsl:value-of select="title"/></a></h2>
660     <ul>
661       <xsl:for-each select="calendar">
662         <xsl:sort select="title" order="ascending" case-order="upper-first"/>
663         <xsl:variable name="id" select="id"/>
664         <li><a href="{$selectView}?calId={$id}"><xsl:value-of select="title"/></a></li>
665       </xsl:for-each>
666     </ul>
667   </xsl:template>
668
669   <!--==== EMAIL OPTIONS ====-->
670   <xsl:template name="emailOptions">
671     <form method="get" action="{$mailEvent}" id="standardForm">
672       <input type="hidden" name="updateEmailOptions" value="true"/>
673       <table id="commonTable" cellpadding="0" cellspacing="0">
674         <tr>
675           <th colspan="2" id="commonHeader">Update email options</th>
676         </tr>
677         <tr>
678           <td>
679             <span class="required-field" title="required">*</span>
680             Email Address:
681           </td>
682           <td align="left">
683             <xsl:copy-of select="/ucalendar/emailoptionsform/form/email/*"/>
684           </td>
685         </tr>
686         <tr>
687           <td>
688             Subject:
689           </td>
690           <td align="left">
691             <xsl:copy-of select="/ucalendar/emailoptionsform/form/subject/*"/>
692           </td>
693         </tr>
694         <tr>
695           <td>&#160;</td>
696           <td>
697             <input name="submit" type="submit" value="Continue"/>&#160;
698             <input name="cancelled" type="submit" value="Cancel"/>
699           </td>
700         </tr>
701         <tr>
702           <td class="footnoteCell">
703             <span style="color:red;">*</span> = required field
704           </td>
705         </tr>
706       </table>
707     </form>
708   </xsl:template>
709
710   <!--==== BLOCK (named) TEMPLATES and NAVIGATION  ====-->
711   <!-- these templates are separated out for convenience and to simplify the default template -->
712
713   <xsl:template name="headBar">
714     <h1 id="titleBar">
715       Bedework: Demonstration Calendar
716     </h1>
717     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="logoTable">
718       <tr>
719         <td colspan="3" id="logoCell"><a href="http://www.bedework.org/"><img src="{$resourcesRoot}/images/demo/bedeworkLogo.gif" width="292" height="75" border="0" alt="Bedework"/></a></td>
720         <td colspan="2" id="schoolLinksCell">
721     <h2>Public Calendar</h2>
722           <a href="{$privateCal}">Personal Calendar</a> |
723           <a href="http://www.yourschoolhere.edu">School Home</a> |
724           <a href="http://www.washington.edu/ucal/">Other Link</a> |
725           <a href="http://helpdesk.rpi.edu/update.do?catcenterkey=51">
726             Example Calendar Help
727           </a>
728           </td>
729       </tr>
730     </table>
731     <table width="100%" border="0" cellpadding="0" cellspacing="0">
732       <tr>
733         <td><img alt="" src="{$resourcesRoot}/images/demo/std-title-left.gif" width="8" height="16" border="0"/></td>
734         <td width="50%"><img alt="" src="{$resourcesRoot}/images/demo/std-title-space.gif" width="100%" height="16" border="0"/></td>
735         <td><img src="{$resourcesRoot}/images/demo/std-title.gif" width="485" height="16" border="0" alt="Calendar of Events"/></td>
736         <td width="50%"><img alt="" src="{$resourcesRoot}/images/demo/std-title-space.gif" width="100%" height="16" border="0"/></td>
737         <td><img alt="" src="{$resourcesRoot}/images/demo/std-title-right.gif" width="9" height="16" border="0"/></td>
738       </tr>
739     </table>
740     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="dateBarTable">
741       <tr>
742         <td width="50" class="imgCell"><img alt="*" src="{$resourcesRoot}/images/demo/spacer.gif" width="50" height="14" border="0"/></td>
743         <td align="center" width="100%">
744           <xsl:value-of select="/ucalendar/firstday/longdate"/>
745           <xsl:if test="/ucalendar/periodname!='Day'">
746             -
747             <xsl:value-of select="/ucalendar/lastday/longdate"/>
748           </xsl:if>
749         </td>
750         <td width="50" class="imgCell">
751           <a href="javascript:window.print()" title="print this view">
752             <img alt="print this view" src="{$resourcesRoot}/images/demo/std-print-icon.gif" width="20" height="14" border="0"/>
753           </a>
754           <a class="rss" href="{$selectView}?calId=&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a>
755           <xsl:variable name="calcategory">
756             <xsl:choose>
757               <xsl:when test="/ucalendar/title=''">all</xsl:when>
758               <xsl:otherwise><xsl:value-of select="translate(/ucalendar/title,' ','')"/></xsl:otherwise>
759             </xsl:choose>
760           </xsl:variable>
761           <xsl:variable name="icalName"
762                         select="concat('ucal',$curdate,/ucalendar/periodname,$calcategory,'.ics')"/>
763           <a class="rss" href="{$export}?nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$icalName}" title="Download all events in current view as iCal - for multiple events, save to disk and import">iCal</a>
764         </td>
765       </tr>
766     </table>
767   </xsl:template>
768
769   <xsl:template name="tabs">
770     <xsl:choose>
771       <xsl:when test="/ucalendar/page='eventscalendar'">
772         <table border="0" cellpadding="0" cellspacing="0" id="tabsTable">
773           <tr>
774             <td>
775               <xsl:choose>
776                 <xsl:when test="/ucalendar/periodname='Day'">
777                   <a href="{$setView}?viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-day-on.gif" width="91" height="20" border="0" alt="DAY"/></a>
778                 </xsl:when>
779                 <xsl:otherwise>
780                   <a href="{$setView}?viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a>
781                 </xsl:otherwise>
782               </xsl:choose>
783             </td>
784             <td>
785               <xsl:choose>
786                 <xsl:when test="/ucalendar/periodname='Week' or /ucalendar/periodname=''">
787                   <a href="{$setView}?viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-week-on.gif" width="92" height="20" border="0" alt="WEEK"/></a>
788                  </xsl:when>
789                 <xsl:otherwise>
790                   <a href="{$setView}?viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a>
791                  </xsl:otherwise>
792               </xsl:choose>
793             </td>
794             <td>
795               <xsl:choose>
796                 <xsl:when test="/ucalendar/periodname='Month'">
797                   <a href="{$setView}?viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-month-on.gif" width="90" height="20" border="0" alt="MONTH"/></a>
798                 </xsl:when>
799                 <xsl:otherwise>
800                   <a href="{$setView}?viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a>
801                 </xsl:otherwise>
802               </xsl:choose>
803             </td>
804             <td>
805               <xsl:choose>
806                 <xsl:when test="/ucalendar/periodname='Year'">
807                   <a href="{$setView}?viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-year-on.gif" width="92" height="20" border="0" alt="YEAR"/></a>
808                 </xsl:when>
809                 <xsl:otherwise>
810                   <a href="{$setView}?viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a>
811                 </xsl:otherwise>
812               </xsl:choose>
813             </td>
814             <td class="centerCell">
815                 <a href="setup.do">refresh view</a><!--
816                 <span id="featureHighlight">switch view &#8594;</span> -->
817             </td>
818             <td>
819               <xsl:choose>
820                 <xsl:when test="/ucalendar/periodname='Day'">
821                   <img src="{$resourcesRoot}/images/demo/std-button-listview-off.gif" width="46" height="20" border="0" alt="toggle list/calendar view"/>
822                 </xsl:when>
823                 <xsl:when test="/ucalendar/periodname='Year'">
824                   <img src="{$resourcesRoot}/images/demo/std-button-calview-off.gif" width="46" height="20" border="0" alt="toggle list/calendar view"/>
825                 </xsl:when>
826                 <xsl:when test="/ucalendar/periodname='Month'">
827                   <xsl:choose>
828                     <xsl:when test="/ucalendar/appvar[key='monthViewMode']/value='list'">
829                       <a href="{$setup}?setappvar=monthViewMode(cal)" title="toggle list/calendar view">
830                         <img src="{$resourcesRoot}/images/demo/std-button-calview.gif" width="46" height="20" border="0" alt="toggle list/calendar view"/>
831                       </a>
832                     </xsl:when>
833                     <xsl:otherwise>
834                       <a href="{$setup}?setappvar=monthViewMode(list)" title="toggle list/calendar view">
835                         <img src="{$resourcesRoot}/images/demo/std-button-listview.gif" width="46" height="20" border="0" alt="toggle list/calendar view"/>
836                       </a>
837                     </xsl:otherwise>
838                   </xsl:choose>
839                 </xsl:when>
840                 <xsl:otherwise>
841                   <xsl:choose>
842                     <xsl:when test="/ucalendar/appvar[key='weekViewMode']/value='list'">
843                       <a href="{$setup}?setappvar=weekViewMode(cal)" title="toggle list/calendar view">
844                         <img src="{$resourcesRoot}/images/demo/std-button-calview.gif" width="46" height="20" border="0" alt="toggle list/calendar view"/>
845                       </a>
846                     </xsl:when>
847                     <xsl:otherwise>
848                       <a href="{$setup}?setappvar=weekViewMode(list)" title="toggle list/calendar view">
849                         <img src="{$resourcesRoot}/images/demo/std-button-listview.gif" width="46" height="20" border="0" alt="toggle list/calendar view"/>
850                       </a>
851                     </xsl:otherwise>
852                   </xsl:choose>
853                 </xsl:otherwise>
854               </xsl:choose>
855             </td>
856             <td class="rightCell">
857               <xsl:choose>
858                 <xsl:when test="/ucalendar/periodname='Year' or
859                                 (/ucalendar/periodname='Month' and
860                                 (/ucalendar/appvar[key='monthViewMode']/value='cal' or
861                                  count(/ucalendar/appvar[key='monthViewMode'])=0)) or
862                                 (/ucalendar/periodname='Week' and
863                                 (/ucalendar/appvar[key='weekViewMode']/value='cal' or
864                                  count(/ucalendar/appvar[key='weekViewMode'])=0))">
865                   <xsl:choose>
866                     <xsl:when test="/ucalendar/appvar[key='summaryMode']/value='details'">
867                       <img src="{$resourcesRoot}/images/demo/std-button-summary-off.gif" width="67" height="20" border="0" alt="only summaries of events supported in this view"/>
868                     </xsl:when>
869                     <xsl:otherwise>
870                       <img src="{$resourcesRoot}/images/demo/std-button-details-off.gif" width="67" height="20" border="0" alt="only summaries of events supported in this view"/>
871                     </xsl:otherwise>
872                   </xsl:choose>
873                 </xsl:when>
874                 <xsl:otherwise>
875                   <xsl:choose>
876                     <xsl:when test="/ucalendar/appvar[key='summaryMode']/value='details'">
877                       <a href="{$setup}?setappvar=summaryMode(summary)" title="toggle summary/detailed view">
878                         <img src="{$resourcesRoot}/images/demo/std-button-summary.gif" width="67" height="20" border="0" alt="toggle summary/detailed view"/>
879                       </a>
880                     </xsl:when>
881                     <xsl:otherwise>
882                       <a href="{$setup}?setappvar=summaryMode(details)" title="toggle summary/detailed view">
883                         <img src="{$resourcesRoot}/images/demo/std-button-details.gif" width="67" height="20" border="0" alt="toggle summary/detailed view"/>
884                       </a>
885                     </xsl:otherwise>
886                   </xsl:choose>
887                 </xsl:otherwise>
888               </xsl:choose>
889             </td>
890           </tr>
891         </table>
892       </xsl:when>
893       <xsl:otherwise>
894         <table border="0" cellpadding="0" cellspacing="0" id="tabsTable">
895           <tr>
896             <td>
897               <a href="{$setView}?viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a>
898             </td>
899             <td>
900               <a href="{$setView}?viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a>
901             </td>
902             <td>
903               <a href="{$setView}?viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a>
904             </td>
905             <td>
906               <a href="{$setView}?viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/images/demo/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a>
907             </td>
908             <td class="centerCell">
909                 &#160;<!--login-->
910             </td>
911             <td class="rightCell">
912               &#160;
913             </td>
914           </tr>
915         </table>
916       </xsl:otherwise>
917     </xsl:choose>
918   </xsl:template>
919
920   <xsl:template name="alerts">
921     <table id="alertsTable">
922       <tr>
923         <td>
924           I'm an alert
925         </td>
926       </tr>
927     </table>
928   </xsl:template>
929
930   <xsl:template name="navigation">
931     <table border="0" cellpadding="0" cellspacing="0" id="navigationBarTable">
932       <tr>
933         <td class="leftCell">
934           <a href="{$setView}?date={$prevdate}"><img src="{$resourcesRoot}/images/demo/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a>
935           <a href="{$setView}?date={$nextdate}"><img src="{$resourcesRoot}/images/demo/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a>
936           <xsl:choose>
937             <xsl:when test="/ucalendar/periodname='Day'">
938               <xsl:value-of select="substring(/ucalendar/eventscalendar/year/month/week/day/name,1,3)"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/month/shortname"/>&#160;<xsl:value-of select="/ucalendar/eventscalendar/year/month/week/day/value"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/value"/>
939             </xsl:when>
940             <xsl:when test="/ucalendar/periodname='Week' or /ucalendar/periodname=''">
941               Week of <xsl:value-of select="/ucalendar/eventscalendar/year/month/shortname"/>&#160;<xsl:value-of select="/ucalendar/eventscalendar/year/month/week/day/value"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/value"/>
942             </xsl:when>
943             <xsl:when test="/ucalendar/periodname='Month'">
944               <xsl:value-of select="/ucalendar/eventscalendar/year/month/longname"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/value"/>
945             </xsl:when>
946             <xsl:otherwise>
947               <xsl:value-of select="/ucalendar/eventscalendar/year/value"/>
948             </xsl:otherwise>
949           </xsl:choose>
950         </td>
951         <td align="right" class="gotoForm">
952           <form name="calForm" method="get" action="{$setView}">
953              <table border="0" cellpadding="0" cellspacing="0">
954               <tr>
955                 <xsl:if test="/ucalendar/periodname!='Year'">
956                   <td>
957                     <select name="viewStartDate.month">
958                       <xsl:for-each select="/ucalendar/monthvalues/val">
959                         <xsl:variable name="temp" select="."/>
960                         <xsl:variable name="pos" select="position()"/>
961                         <xsl:choose>
962                           <xsl:when test="/ucalendar/monthvalues[start=$temp]">
963                             <option value="{$temp}" selected="selected">
964                               <xsl:value-of select="/ucalendar/monthlabels/val[position()=$pos]"/>
965                             </option>
966                           </xsl:when>
967                           <xsl:otherwise>
968                             <option value="{$temp}">
969                               <xsl:value-of select="/ucalendar/monthlabels/val[position()=$pos]"/>
970                             </option>
971                           </xsl:otherwise>
972                         </xsl:choose>
973                       </xsl:for-each>
974                     </select>
975                   </td>
976                   <xsl:if test="/ucalendar/periodname!='Month'">
977                     <td>
978                       <select name="viewStartDate.day">
979                         <xsl:for-each select="/ucalendar/dayvalues/val">
980                           <xsl:variable name="temp" select="."/>
981                           <xsl:variable name="pos" select="position()"/>
982                           <xsl:choose>
983                             <xsl:when test="/ucalendar/dayvalues[start=$temp]">
984                               <option value="{$temp}" selected="selected">
985                                 <xsl:value-of select="/ucalendar/daylabels/val[position()=$pos]"/>
986                               </option>
987                             </xsl:when>
988                             <xsl:otherwise>
989                               <option value="{$temp}">
990                                 <xsl:value-of select="/ucalendar/daylabels/val[position()=$pos]"/>
991                               </option>
992                             </xsl:otherwise>
993                           </xsl:choose>
994                         </xsl:for-each>
995                       </select>
996                     </td>
997                   </xsl:if>
998                 </xsl:if>
999                 <td>
1000                   <xsl:variable name="temp" select="/ucalendar/yearvalues/start"/>
1001                   <input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/>
1002                 </td>
1003                 <td>
1004                   <input name="submit" type="submit" value="go"/>
1005                 </td>
1006               </tr>
1007             </table>
1008           </form>
1009         </td>
1010         <td class="todayButton">
1011           <a href="{$setView}?viewType=todayView&amp;date={$curdate}">
1012             <img src="{$resourcesRoot}/images/demo/std-button-today-off.gif" width="54" height="22" border="0" alt="Go to Today" align="left"/>
1013           </a>
1014         </td>
1015         <td class="rightCell">
1016           <form name="selectViewForm" method="get" action="{$selectView}">
1017             <select name="viewName" onChange="submit()" >
1018               <option>select a view</option>
1019               <xsl:for-each select="/ucalendar/views/view">
1020                 <xsl:variable name="name" select="name"/>
1021                 <xsl:choose>
1022                   <xsl:when test="name=/ucalendar/name">
1023                     <option value="{$name}" selected="selected"><xsl:value-of select="name"/></option>
1024                   </xsl:when>
1025                   <xsl:otherwise>
1026                     <option value="{$name}"><xsl:value-of select="name"/></option>
1027                   </xsl:otherwise>
1028                 </xsl:choose>
1029               </xsl:for-each>
1030             </select>
1031           </form>
1032           <span class="calLinks"><a href="{$selectView}">show all</a> | <a href="{$showCals}">calendar list</a></span>
1033         </td>
1034       </tr>
1035     </table>
1036   </xsl:template>
1037
1038   <xsl:template name="searchBar">
1039     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="searchBarTable">
1040        <tr>
1041          <td class="leftCell">
1042            <xsl:choose>
1043              <xsl:when test="/ucalendar/title!=''">
1044                Calendar: <xsl:value-of select="/ucalendar/title"/>
1045                <span class="link">[<a href="{$selectView}?calId=">clear</a>]</span>
1046              </xsl:when>
1047              <xsl:when test="/ucalendar/search!=''">
1048                Current search: <xsl:value-of select="/ucalendar/search"/>
1049                <span class="link">[<a href="{$selectView}?calId=">clear</a>]</span>
1050              </xsl:when>
1051              <xsl:otherwise>
1052                Current calendar: All
1053              </xsl:otherwise>
1054            </xsl:choose>
1055          </td>
1056          <td class="rightCell"><form name="searchForm" method="get" action="{$selectView}">Search: <input type="text" name="searchString" size="30" value=""/><input type="submit" value="go"/></form></td>
1057        </tr>
1058     </table>
1059   </xsl:template>
1060
1061   <xsl:template name="footer">
1062     <div id="footer">
1063       Demonstration calendar; place footer information here.
1064     </div>
1065     <table id="skinSelectorTable" border="0" cellpadding="0" cellspacing="0">
1066       <tr>
1067         <td class="leftCell">
1068           Based on the <a href="http://www.bedework.org/">Bedework Calendar</a>
1069         </td>
1070         <td class="rightCell">
1071           <form name="styleSelectForm" method="get" action="{$setup}">
1072             style selector:
1073             <select name="setappvar" onChange="submit()">
1074               <option>choose a style</option>
1075               <option value="style(green)">green</option>
1076               <option value="style(red)">red</option>
1077               <option value="style(blue)">blue</option>
1078             </select>
1079           </form>
1080           <form name="skinSelectForm" method="get" action="{$setup}">
1081             skin selector:
1082             <select name="skinNameSticky" onChange="submit()">
1083               <option>select a skin</option>
1084               <option value="default">Demo</option>
1085               <option value="washington">Washington</option>
1086               <option value="rensselaer">Rensselaer</option>
1087             </select>
1088           </form>
1089         </td>
1090       </tr>
1091     </table>
1092   </xsl:template>
1093 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.