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

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

added default view button to public stylesheet
hid full ical download button (not yet implemented)
hid search field (not yet implemented - true searching to come)

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="fetchPublicCalendars" select="/ucalendar/urlPrefixes/fetchPublicCalendars"/>
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='green'">
110             <link rel="stylesheet" href="{$resourcesRoot}/default/default/green.css"/>
111           </xsl:when>
112           <xsl:otherwise>
113             <link rel="stylesheet" href="{$resourcesRoot}/default/default/blue.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="substring(start/utcdate,1,8) = parent::day/date">
342                       <xsl:choose>
343                         <xsl:when test="start/allday = 'true'">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/allday = 'true'">
356                       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
357                         All day
358                       </a>
359                     </xsl:when>
360                     <xsl:when test="start/time!=''">
361                       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
362                       <xsl:choose>
363                         <xsl:when test="parent::day/shortdate != start/shortdate">
364                           <span class="littleArrow">&#171;</span>&#160;
365                           <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/>
366                         </xsl:when>
367                         <xsl:otherwise>
368                           <xsl:value-of select="start/time"/>
369                         </xsl:otherwise>
370                       </xsl:choose>
371                       </a>
372                     </xsl:when>
373                   </xsl:choose>
374                 </td>
375                 <td class="{$dateRangeStyle}" style="text-align:center;padding:0em;">
376                   <xsl:choose>
377                     <xsl:when test="end/allday = 'true'"><!-- do nothing -->
378                     </xsl:when>
379                     <xsl:when test="end/time!=''">
380                       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">-</a>
381                     </xsl:when>
382                     <xsl:otherwise>
383                       &#160;
384                     </xsl:otherwise>
385                   </xsl:choose>
386                 </td>
387                 <td class="{$dateRangeStyle}" style="text-align:left;">
388                   <xsl:choose>
389                     <xsl:when  test="end/time!=''">
390                       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
391                       <xsl:choose>
392                         <xsl:when test="parent::day/shortdate != end/shortdate">
393                           <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/>
394                           &#160;<span class="littleArrow">&#187;</span>
395                         </xsl:when>
396                         <xsl:otherwise>
397                           <xsl:value-of select="end/time"/>
398                         </xsl:otherwise>
399                       </xsl:choose>
400                       </a>
401                     </xsl:when>
402                     <xsl:otherwise>
403                       &#160;
404                     </xsl:otherwise>
405                   </xsl:choose>
406                 </td>
407                 <xsl:variable name="descriptionClass">
408                   <xsl:choose>
409                     <xsl:when test="priority='cancelled'">description cancelled</xsl:when>
410                     <xsl:otherwise>description</xsl:otherwise>
411                   </xsl:choose>
412                 </xsl:variable>
413                 <td class="{$descriptionClass}">
414                   <xsl:choose>
415                     <xsl:when test="/ucalendar/appvar[key='summaryMode']/value='details'">
416                       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
417                         <strong><xsl:value-of select="summary"/>: </strong>
418                         <xsl:value-of select="description"/>&#160;
419                         <em>
420                           <xsl:value-of select="location/address"/>
421                           <xsl:if test="location/subaddress != ''">
422                             , <xsl:value-of select="location/subaddress"/>
423                           </xsl:if>.&#160;
424                           <xsl:if test="cost!=''">
425                             <xsl:value-of select="cost"/>.&#160;
426                           </xsl:if>
427                           <xsl:if test="sponsor/name!='none'">
428                             Contact: <xsl:value-of select="sponsor/name"/>
429                           </xsl:if>
430                         </em>
431                       </a>
432                       <xsl:if test="link != ''">
433                         <xsl:variable name="link" select="link"/>
434                         <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a>
435                       </xsl:if>
436                     </xsl:when>
437                     <xsl:otherwise>
438                       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
439                         <xsl:value-of select="summary"/>, <xsl:value-of select="location/address"/>
440                       </a>
441                     </xsl:otherwise>
442                   </xsl:choose>
443                 </td>
444                 <td class="icons">
445                   <variable name="confId" select="/ucalendar/confirmationid"/>
446                   <a href="{$privateCal}/addEventRef.do?eventId={$id}" title="Add event to MyCalendar" target="myCalendar">
447                     <img class="addref" src="{$resourcesRoot}/images/demo/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="Add event to MyCalendar"/>
448                   </a>
449                   <xsl:variable name="icalName" select="concat($id,'.ics')"/>
450                   <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">
451                     <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"/>
452                   </a>
453                 </td>
454               </tr>
455             </xsl:for-each>
456           </xsl:for-each>
457         </xsl:otherwise>
458       </xsl:choose>
459     </table>
460   </xsl:template>
461
462   <!--==== WEEK CALENDAR VIEW ====-->
463   <xsl:template name="weekView">
464     <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0">
465       <tr>
466         <xsl:for-each select="/ucalendar/daynames/val">
467           <th class="dayHeading"><xsl:value-of select="."/></th>
468         </xsl:for-each>
469       </tr>
470       <tr>
471         <xsl:for-each select="/ucalendar/eventscalendar/year/month/week/day">
472           <xsl:variable name="dayPos" select="position()"/>
473           <xsl:if test="filler='false'">
474             <td>
475               <xsl:variable name="dayDate" select="date"/>
476               <a href="{$setView}?viewType=dayView&amp;date={$dayDate}" class="dayLink">
477                 <xsl:value-of select="value"/>
478               </a>
479               <ul>
480                 <xsl:apply-templates select="event" mode="calendarLayout">
481                   <xsl:with-param name="dayPos" select="$dayPos"/>
482                 </xsl:apply-templates>
483               </ul>
484             </td>
485           </xsl:if>
486         </xsl:for-each>
487       </tr>
488     </table>
489   </xsl:template>
490
491   <!--==== MONTH CALENDAR VIEW ====-->
492   <xsl:template name="monthView">
493     <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0">
494       <tr>
495         <xsl:for-each select="/ucalendar/daynames/val">
496           <th class="dayHeading"><xsl:value-of select="."/></th>
497         </xsl:for-each>
498       </tr>
499       <xsl:for-each select="/ucalendar/eventscalendar/year/month/week">
500         <tr>
501           <xsl:for-each select="day">
502            <xsl:variable name="dayPos" select="position()"/>
503             <xsl:choose>
504               <xsl:when test="filler='true'">
505                 <td class="filler">&#160;</td>
506               </xsl:when>
507               <xsl:otherwise>
508                 <td>
509                   <xsl:variable name="dayDate" select="date"/>
510                   <a href="{$setView}?viewType=dayView&amp;date={$dayDate}" class="dayLink">
511                     <xsl:value-of select="value"/>
512                   </a>
513                   <ul>
514                     <xsl:apply-templates select="event" mode="calendarLayout">
515                       <xsl:with-param name="dayPos" select="$dayPos"/>
516                     </xsl:apply-templates>
517                   </ul>
518                 </td>
519               </xsl:otherwise>
520             </xsl:choose>
521           </xsl:for-each>
522         </tr>
523       </xsl:for-each>
524     </table>
525   </xsl:template>
526
527   <xsl:template match="event" mode="calendarLayout">
528     <xsl:param name="dayPos"/>
529     <xsl:variable name="subscriptionId" select="subscription/id"/>
530     <xsl:variable name="guid" select="guid"/>
531     <xsl:variable name="recurrenceId" select="recurrenceId"/>
532     <xsl:variable name="eventClass">
533       <xsl:choose>
534         <!-- Special styles for the month grid -->
535         <xsl:when test="contains(summary,'CANCELLED')">eventCancelled</xsl:when>
536         <xsl:when test="calendar/name='Holidays'">holiday</xsl:when>
537         <!-- Alternating colors for all standard events -->
538         <xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when>
539         <xsl:otherwise>eventLinkB</xsl:otherwise>
540       </xsl:choose>
541     </xsl:variable>
542     <li>
543       <a href="{$eventView}?subid={$subscriptionId}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" class="{$eventClass}">
544         <xsl:value-of select="summary"/>
545         <xsl:variable name="eventTipClass">
546           <xsl:choose>
547             <xsl:when test="$dayPos &gt; 5">eventTipReverse</xsl:when>
548             <xsl:otherwise>eventTip</xsl:otherwise>
549           </xsl:choose>
550         </xsl:variable>
551         <span class="{$eventTipClass}">
552           <strong><xsl:value-of select="summary"/></strong><br/>
553           <xsl:if test="start/time != ''">
554             Time: <xsl:value-of select="start/time"/>
555             <xsl:if test="end/time != ''">
556               - <xsl:value-of select="end/time"/>
557             </xsl:if>
558             <br/>
559           </xsl:if>
560           <xsl:if test="location/address">
561             Location: <xsl:value-of select="location/address"/><br/>
562           </xsl:if>
563           Calendar: <xsl:value-of select="calendar/name"/>
564         </span>
565       </a>
566     </li>
567   </xsl:template>
568
569   <!--==== YEAR VIEW ====-->
570   <xsl:template name="yearView">
571     <table id="yearCalendarTable" border="0" cellpadding="0" cellspacing="0">
572       <tr>
573         <xsl:apply-templates select="/ucalendar/eventscalendar/year/month[position() &lt;= 3]"/>
574       </tr>
575       <tr>
576         <xsl:apply-templates select="/ucalendar/eventscalendar/year/month[(position() &gt; 3) and (position() &lt;= 6)]"/>
577       </tr>
578       <tr>
579         <xsl:apply-templates select="/ucalendar/eventscalendar/year/month[(position() &gt; 6) and (position() &lt;= 9)]"/>
580       </tr>
581       <tr>
582         <xsl:apply-templates select="/ucalendar/eventscalendar/year/month[position() &gt; 9]"/>
583       </tr>
584     </table>
585   </xsl:template>
586
587   <!-- year view month tables -->
588   <xsl:template match="month">
589     <td>
590       <table class="yearViewMonthTable" border="0" cellpadding="0" cellspacing="0">
591         <tr>
592           <td colspan="8" class="monthName">
593             <xsl:variable name="firstDayOfMonth" select="week/day/date"/>
594             <a href="{$setView}?viewType=monthView&amp;date={$firstDayOfMonth}">
595               <xsl:value-of select="longname"/>
596             </a>
597           </td>
598         </tr>
599         <tr>
600           <th>&#160;</th>
601           <xsl:for-each select="/ucalendar/shortdaynames/val">
602             <th><xsl:value-of select="."/></th>
603           </xsl:for-each>
604         </tr>
605         <xsl:for-each select="week">
606           <tr>
607             <td class="weekCell">
608               <xsl:variable name="firstDayOfWeek" select="day/date"/>
609               <a href="{$setView}?viewType=weekView&amp;date={$firstDayOfWeek}">
610                 <xsl:value-of select="value"/>
611               </a>
612             </td>
613             <xsl:for-each select="day">
614               <xsl:choose>
615                 <xsl:when test="filler='true'">
616                   <td class="filler">&#160;</td>
617                 </xsl:when>
618                 <xsl:otherwise>
619                   <td>
620                     <xsl:variable name="dayDate" select="date"/>
621                     <a href="{$setView}?viewType=dayView&amp;date={$dayDate}">
622                       <xsl:value-of select="value"/>
623                     </a>
624                   </td>
625                 </xsl:otherwise>
626               </xsl:choose>
627             </xsl:for-each>
628           </tr>
629         </xsl:for-each>
630       </table>
631     </td>
632   </xsl:template>
633
634   <!--==== CALENDARS PAGE ====-->
635   <xsl:template match="calendars">
636     <xsl:variable name="topLevelCalCount" select="count(/ucalendar/calendars/calendar)"/>
637     <table id="calPageTable" border="0" cellpadding="0" cellspacing="0">
638       <tr>
639         <th colspan="2">
640           All Calendars
641         </th>
642       </tr>
643       <tr>
644         <td colspan="2" class="infoCell">
645           Select a calendar from the list below to see only that calendar's events.
646         </td>
647       </tr>
648       <tr>
649         <td class="leftCell">
650           <xsl:apply-templates select="calendar[position() &lt;= floor($topLevelCalCount div 2)]"/>
651         </td>
652         <td>
653           <xsl:apply-templates select="calendar[position() &gt; floor($topLevelCalCount div 2)]"/>
654         </td>
655       </tr>
656     </table>
657   </xsl:template>
658
659   <xsl:template match="calendar">
660     <xsl:variable name="id" select="id"/>
661     <h2><a href="{$selectView}?calId={$id}"><xsl:value-of select="title"/></a></h2>
662     <ul>
663       <xsl:for-each select="calendar">
664         <!--<xsl:sort select="title" order="ascending" case-order="upper-first"/>-->
665         <xsl:variable name="id" select="id"/>
666         <li><a href="{$selectView}?calId={$id}"><xsl:value-of select="title"/></a></li>
667       </xsl:for-each>
668     </ul>
669   </xsl:template>
670
671   <!--==== EMAIL OPTIONS ====-->
672   <xsl:template name="emailOptions">
673     <form method="get" action="{$mailEvent}" id="standardForm">
674       <input type="hidden" name="updateEmailOptions" value="true"/>
675       <table id="commonTable" cellpadding="0" cellspacing="0">
676         <tr>
677           <th colspan="2" id="commonHeader">Update email options</th>
678         </tr>
679         <tr>
680           <td>
681             <span class="required-field" title="required">*</span>
682             Email Address:
683           </td>
684           <td align="left">
685             <xsl:copy-of select="/ucalendar/emailoptionsform/form/email/*"/>
686           </td>
687         </tr>
688         <tr>
689           <td>
690             Subject:
691           </td>
692           <td align="left">
693             <xsl:copy-of select="/ucalendar/emailoptionsform/form/subject/*"/>
694           </td>
695         </tr>
696         <tr>
697           <td>&#160;</td>
698           <td>
699             <input name="submit" type="submit" value="Continue"/>&#160;
700             <input name="cancelled" type="submit" value="Cancel"/>
701           </td>
702         </tr>
703         <tr>
704           <td class="footnoteCell">
705             <span style="color:red;">*</span> = required field
706           </td>
707         </tr>
708       </table>
709     </form>
710   </xsl:template>
711
712   <!--==== BLOCK (named) TEMPLATES and NAVIGATION  ====-->
713   <!-- these templates are separated out for convenience and to simplify the default template -->
714
715   <xsl:template name="headBar">
716     <h1 id="titleBar">
717       Bedework: Demonstration Calendar
718     </h1>
719     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="logoTable">
720       <tr>
721         <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>
722         <td colspan="2" id="schoolLinksCell">
723     <h2>Public Calendar</h2>
724           <a href="{$privateCal}">Personal Calendar</a> |
725           <a href="http://www.yourschoolhere.edu">School Home</a> |
726           <a href="http://www.washington.edu/ucal/">Other Link</a> |
727           <a href="http://helpdesk.rpi.edu/update.do?catcenterkey=51">
728             Example Calendar Help
729           </a>
730           </td>
731       </tr>
732     </table>
733     <table width="100%" border="0" cellpadding="0" cellspacing="0">
734       <tr>
735         <td><img alt="" src="{$resourcesRoot}/images/demo/std-title-left.gif" width="8" height="16" border="0"/></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 src="{$resourcesRoot}/images/demo/std-title.gif" width="485" height="16" border="0" alt="Calendar of Events"/></td>
738         <td width="50%"><img alt="" src="{$resourcesRoot}/images/demo/std-title-space.gif" width="100%" height="16" border="0"/></td>
739         <td><img alt="" src="{$resourcesRoot}/images/demo/std-title-right.gif" width="9" height="16" border="0"/></td>
740       </tr>
741     </table>
742     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="dateBarTable">
743       <tr>
744         <td width="50" class="imgCell"><img alt="*" src="{$resourcesRoot}/images/demo/spacer.gif" width="50" height="14" border="0"/></td>
745         <td align="center" width="100%">
746           <xsl:value-of select="/ucalendar/firstday/longdate"/>
747           <xsl:if test="/ucalendar/periodname!='Day'">
748             -
749             <xsl:value-of select="/ucalendar/lastday/longdate"/>
750           </xsl:if>
751         </td>
752         <td width="50" class="imgCell">
753           <a href="javascript:window.print()" title="print this view">
754             <img alt="print this view" src="{$resourcesRoot}/images/demo/std-print-icon.gif" width="20" height="14" border="0"/>
755           </a>
756           <a class="rss" href="{$selectView}?calId=&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a>
757           <xsl:variable name="calcategory">
758             <xsl:choose>
759               <xsl:when test="/ucalendar/title=''">all</xsl:when>
760               <xsl:otherwise><xsl:value-of select="translate(/ucalendar/title,' ','')"/></xsl:otherwise>
761             </xsl:choose>
762           </xsl:variable>
763           <!--<xsl:variable name="icalName"
764                         select="concat('ucal',$curdate,/ucalendar/periodname,$calcategory,'.ics')"/>
765           <a class="rss" href="{$export}?nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$icalName}" title="Download all events currently displayed as iCal - for multiple events, save to disk and import">iCal</a>
766           -->
767         </td>
768       </tr>
769     </table>
770   </xsl:template>
771
772   <xsl:template name="tabs">
773     <xsl:choose>
774       <xsl:when test="/ucalendar/page='eventscalendar'">
775         <table border="0" cellpadding="0" cellspacing="0" id="tabsTable">
776           <tr>
777             <td>
778               <xsl:choose>
779                 <xsl:when test="/ucalendar/periodname='Day'">
780                   <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>
781                 </xsl:when>
782                 <xsl:otherwise>
783                   <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>
784                 </xsl:otherwise>
785               </xsl:choose>
786             </td>
787             <td>
788               <xsl:choose>
789                 <xsl:when test="/ucalendar/periodname='Week' or /ucalendar/periodname=''">
790                   <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>
791                  </xsl:when>
792                 <xsl:otherwise>
793                   <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>
794                  </xsl:otherwise>
795               </xsl:choose>
796             </td>
797             <td>
798               <xsl:choose>
799                 <xsl:when test="/ucalendar/periodname='Month'">
800                   <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>
801                 </xsl:when>
802                 <xsl:otherwise>
803                   <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>
804                 </xsl:otherwise>
805               </xsl:choose>
806             </td>
807             <td>
808               <xsl:choose>
809                 <xsl:when test="/ucalendar/periodname='Year'">
810                   <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>
811                 </xsl:when>
812                 <xsl:otherwise>
813                   <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>
814                 </xsl:otherwise>
815               </xsl:choose>
816             </td>
817             <td class="centerCell">
818                 <a href="setup.do">refresh view</a><!--
819                 <span id="featureHighlight">switch view &#8594;</span> -->
820             </td>
821             <td>
822               <xsl:choose>
823                 <xsl:when test="/ucalendar/periodname='Day'">
824                   <img src="{$resourcesRoot}/images/demo/std-button-listview-off.gif" width="46" height="20" border="0" alt="toggle list/calendar view"/>
825                 </xsl:when>
826                 <xsl:when test="/ucalendar/periodname='Year'">
827                   <img src="{$resourcesRoot}/images/demo/std-button-calview-off.gif" width="46" height="20" border="0" alt="toggle list/calendar view"/>
828                 </xsl:when>
829                 <xsl:when test="/ucalendar/periodname='Month'">
830                   <xsl:choose>
831                     <xsl:when test="/ucalendar/appvar[key='monthViewMode']/value='list'">
832                       <a href="{$setup}?setappvar=monthViewMode(cal)" title="toggle list/calendar view">
833                         <img src="{$resourcesRoot}/images/demo/std-button-calview.gif" width="46" height="20" border="0" alt="toggle list/calendar view"/>
834                       </a>
835                     </xsl:when>
836                     <xsl:otherwise>
837                       <a href="{$setup}?setappvar=monthViewMode(list)" title="toggle list/calendar view">
838                         <img src="{$resourcesRoot}/images/demo/std-button-listview.gif" width="46" height="20" border="0" alt="toggle list/calendar view"/>
839                       </a>
840                     </xsl:otherwise>
841                   </xsl:choose>
842                 </xsl:when>
843                 <xsl:otherwise>
844                   <xsl:choose>
845                     <xsl:when test="/ucalendar/appvar[key='weekViewMode']/value='list'">
846                       <a href="{$setup}?setappvar=weekViewMode(cal)" title="toggle list/calendar view">
847                         <img src="{$resourcesRoot}/images/demo/std-button-calview.gif" width="46" height="20" border="0" alt="toggle list/calendar view"/>
848                       </a>
849                     </xsl:when>
850                     <xsl:otherwise>
851                       <a href="{$setup}?setappvar=weekViewMode(list)" title="toggle list/calendar view">
852                         <img src="{$resourcesRoot}/images/demo/std-button-listview.gif" width="46" height="20" border="0" alt="toggle list/calendar view"/>
853                       </a>
854                     </xsl:otherwise>
855                   </xsl:choose>
856                 </xsl:otherwise>
857               </xsl:choose>
858             </td>
859             <td class="rightCell">
860               <xsl:choose>
861                 <xsl:when test="/ucalendar/periodname='Year' or
862                                 (/ucalendar/periodname='Month' and
863                                 (/ucalendar/appvar[key='monthViewMode']/value='cal' or
864                                  count(/ucalendar/appvar[key='monthViewMode'])=0)) or
865                                 (/ucalendar/periodname='Week' and
866                                 (/ucalendar/appvar[key='weekViewMode']/value='cal' or
867                                  count(/ucalendar/appvar[key='weekViewMode'])=0))">
868                   <xsl:choose>
869                     <xsl:when test="/ucalendar/appvar[key='summaryMode']/value='details'">
870                       <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"/>
871                     </xsl:when>
872                     <xsl:otherwise>
873                       <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"/>
874                     </xsl:otherwise>
875                   </xsl:choose>
876                 </xsl:when>
877                 <xsl:otherwise>
878                   <xsl:choose>
879                     <xsl:when test="/ucalendar/appvar[key='summaryMode']/value='details'">
880                       <a href="{$setup}?setappvar=summaryMode(summary)" title="toggle summary/detailed view">
881                         <img src="{$resourcesRoot}/images/demo/std-button-summary.gif" width="67" height="20" border="0" alt="toggle summary/detailed view"/>
882                       </a>
883                     </xsl:when>
884                     <xsl:otherwise>
885                       <a href="{$setup}?setappvar=summaryMode(details)" title="toggle summary/detailed view">
886                         <img src="{$resourcesRoot}/images/demo/std-button-details.gif" width="67" height="20" border="0" alt="toggle summary/detailed view"/>
887                       </a>
888                     </xsl:otherwise>
889                   </xsl:choose>
890                 </xsl:otherwise>
891               </xsl:choose>
892             </td>
893           </tr>
894         </table>
895       </xsl:when>
896       <xsl:otherwise>
897         <table border="0" cellpadding="0" cellspacing="0" id="tabsTable">
898           <tr>
899             <td>
900               <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>
901             </td>
902             <td>
903               <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>
904             </td>
905             <td>
906               <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>
907             </td>
908             <td>
909               <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>
910             </td>
911             <td class="centerCell">
912                 &#160;<!--login-->
913             </td>
914             <td class="rightCell">
915               &#160;
916             </td>
917           </tr>
918         </table>
919       </xsl:otherwise>
920     </xsl:choose>
921   </xsl:template>
922
923   <xsl:template name="alerts">
924     <table id="alertsTable">
925       <tr>
926         <td>
927           I'm an alert
928         </td>
929       </tr>
930     </table>
931   </xsl:template>
932
933   <xsl:template name="navigation">
934     <table border="0" cellpadding="0" cellspacing="0" id="navigationBarTable">
935       <tr>
936         <td class="leftCell">
937           <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>
938           <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>
939           <xsl:choose>
940             <xsl:when test="/ucalendar/periodname='Day'">
941               <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"/>
942             </xsl:when>
943             <xsl:when test="/ucalendar/periodname='Week' or /ucalendar/periodname=''">
944               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"/>
945             </xsl:when>
946             <xsl:when test="/ucalendar/periodname='Month'">
947               <xsl:value-of select="/ucalendar/eventscalendar/year/month/longname"/>, <xsl:value-of select="/ucalendar/eventscalendar/year/value"/>
948             </xsl:when>
949             <xsl:otherwise>
950               <xsl:value-of select="/ucalendar/eventscalendar/year/value"/>
951             </xsl:otherwise>
952           </xsl:choose>
953         </td>
954         <td align="right" class="gotoForm">
955           <form name="calForm" method="get" action="{$setView}">
956              <table border="0" cellpadding="0" cellspacing="0">
957               <tr>
958                 <xsl:if test="/ucalendar/periodname!='Year'">
959                   <td>
960                     <select name="viewStartDate.month">
961                       <xsl:for-each select="/ucalendar/monthvalues/val">
962                         <xsl:variable name="temp" select="."/>
963                         <xsl:variable name="pos" select="position()"/>
964                         <xsl:choose>
965                           <xsl:when test="/ucalendar/monthvalues[start=$temp]">
966                             <option value="{$temp}" selected="selected">
967                               <xsl:value-of select="/ucalendar/monthlabels/val[position()=$pos]"/>
968                             </option>
969                           </xsl:when>
970                           <xsl:otherwise>
971                             <option value="{$temp}">
972                               <xsl:value-of select="/ucalendar/monthlabels/val[position()=$pos]"/>
973                             </option>
974                           </xsl:otherwise>
975                         </xsl:choose>
976                       </xsl:for-each>
977                     </select>
978                   </td>
979                   <xsl:if test="/ucalendar/periodname!='Month'">
980                     <td>
981                       <select name="viewStartDate.day">
982                         <xsl:for-each select="/ucalendar/dayvalues/val">
983                           <xsl:variable name="temp" select="."/>
984                           <xsl:variable name="pos" select="position()"/>
985                           <xsl:choose>
986                             <xsl:when test="/ucalendar/dayvalues[start=$temp]">
987                               <option value="{$temp}" selected="selected">
988                                 <xsl:value-of select="/ucalendar/daylabels/val[position()=$pos]"/>
989                               </option>
990                             </xsl:when>
991                             <xsl:otherwise>
992                               <option value="{$temp}">
993                                 <xsl:value-of select="/ucalendar/daylabels/val[position()=$pos]"/>
994                               </option>
995                             </xsl:otherwise>
996                           </xsl:choose>
997                         </xsl:for-each>
998                       </select>
999                     </td>
1000                   </xsl:if>
1001                 </xsl:if>
1002                 <td>
1003                   <xsl:variable name="temp" select="/ucalendar/yearvalues/start"/>
1004                   <input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/>
1005                 </td>
1006                 <td>
1007                   <input name="submit" type="submit" value="go"/>
1008                 </td>
1009               </tr>
1010             </table>
1011           </form>
1012         </td>
1013         <td class="todayButton">
1014           <a href="{$setView}?viewType=todayView&amp;date={$curdate}">
1015             <img src="{$resourcesRoot}/images/demo/std-button-today-off.gif" width="54" height="22" border="0" alt="Go to Today" align="left"/>
1016           </a>
1017         </td>
1018         <td class="rightCell">
1019         </td>
1020       </tr>
1021     </table>
1022   </xsl:template>
1023
1024   <xsl:template name="searchBar">
1025     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="searchBarTable">
1026        <tr>
1027          <td class="leftCell">
1028            <xsl:choose>
1029              <xsl:when test="/ucalendar/name!=''">
1030                View:
1031                <form name="selectViewForm" method="get" action="{$selectView}">
1032                 <select name="viewName" onChange="submit()" >
1033                   <xsl:for-each select="/ucalendar/views/view">
1034                     <xsl:variable name="name" select="name"/>
1035                     <xsl:choose>
1036                       <xsl:when test="name=/ucalendar/name">
1037                         <option value="{$name}" selected="selected"><xsl:value-of select="name"/></option>
1038                       </xsl:when>
1039                       <xsl:otherwise>
1040                         <option value="{$name}"><xsl:value-of select="name"/></option>
1041                       </xsl:otherwise>
1042                     </xsl:choose>
1043                   </xsl:for-each>
1044                 </select>
1045               </form>
1046               <span class="calLinks"><a href="{$selectView}">default view</a> | <a href="{$fetchPublicCalendars}">calendar list</a></span>
1047              </xsl:when>
1048              <xsl:when test="/ucalendar/search!=''">
1049                Current search: <xsl:value-of select="/ucalendar/search"/>
1050                <span class="link">[<a href="{$selectView}">default view</a>]</span>
1051              </xsl:when>
1052            </xsl:choose>
1053          </td>
1054          <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>
1055        </tr>
1056     </table>
1057   </xsl:template>
1058
1059   <xsl:template name="footer">
1060     <div id="footer">
1061       Demonstration calendar; place footer information here.
1062     </div>
1063     <table id="skinSelectorTable" border="0" cellpadding="0" cellspacing="0">
1064       <tr>
1065         <td class="leftCell">
1066           Based on the <a href="http://www.bedework.org/">Bedework Calendar</a>
1067         </td>
1068         <td class="rightCell">
1069           <form name="styleSelectForm" method="get" action="{$setup}">
1070             style selector:
1071             <select name="setappvar" onChange="submit()">
1072               <option>choose a style</option>
1073               <option value="style(green)">green</option>
1074               <option value="style(red)">red</option>
1075               <option value="style(blue)">blue</option>
1076             </select>
1077           </form>
1078           <form name="skinSelectForm" method="get" action="{$setup}">
1079             skin selector:
1080             <select name="skinNameSticky" onChange="submit()">
1081               <option>select a skin</option>
1082               <option value="default">Demo</option>
1083               <option value="washington">Washington</option>
1084               <option value="rensselaer">Rensselaer</option>
1085             </select>
1086           </form>
1087         </td>
1088       </tr>
1089     </table>
1090   </xsl:template>
1091 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.