root/trunk/deployment/feeder/webapp/resources/demoskins/MainCampus/default/default/list-html.xsl

Revision 2502 (checked in by bleibson, 3 years ago)

o Reorganized as a theme
o Moved more definitional stuff to config.xsl
o Now "link to event" works and points to the cached copy: http://www.bedework.org/trac/bedework/ticket/495

  • Property svn:mime-type set to text/plain
Line 
1 <?xml version="1.0" encoding="UTF-8"?>
2 <xsl:stylesheet
3   version="1.0"
4   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
5   xmlns="http://www.w3.org/1999/xhtml">
6
7 <xsl:output
8   method="xml"
9   indent="no"
10   media-type="text/html"
11   doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN"
12   doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"
13   standalone="yes"
14   omit-xml-declaration="yes"/>
15
16 <!-- **********************************************************************
17     Copyright 2009 Rensselaer Polytechnic Institute. All worldwide rights reserved.
18
19     Redistribution and use of this distribution in source and binary forms,
20     with or without modification, are permitted provided that:
21        The above copyright notice and this permission notice appear in all
22         copies and supporting documentation;
23
24         The name, identifiers, and trademarks of Rensselaer Polytechnic
25         Institute are not used in advertising or publicity without the
26         express prior written permission of Rensselaer Polytechnic Institute;
27
28     DISCLAIMER: The software is distributed" AS IS" without any express or
29     implied warranty, including but not limited to, any implied warranties
30     of merchantability or fitness for a particular purpose or any warrant)'
31     of non-infringement of any current or pending patent rights. The authors
32     of the software make no representations about the suitability of this
33     software for any particular purpose. The entire risk as to the quality
34     and performance of the software is with the user. Should the software
35     prove defective, the user assumes the cost of all necessary servicing,
36     repair or correction. In particular, neither Rensselaer Polytechnic
37     Institute, nor the authors of the software are liable for any indirect,
38     special, consequential, or incidental damages related to the software,
39     to the maximum extent the law permits. -->
40  
41   <!-- Bring in settings -->
42   <xsl:include href="./config.xsl"/>
43
44   <!--  global variables -->
45   <xsl:variable name="prevdate" select="/bedework/previousdate"/>
46   <xsl:variable name="nextdate" select="/bedework/nextdate"/>
47   <xsl:variable name="curdate" select="/bedework/currentdate/date"/>
48   <xsl:variable name="stats" select="/bedework/urlPrefixes/stats/stats"/>
49   <xsl:variable name="privateCal" select="concat($bwCalendarHostURL,'/ucal')"/>
50
51   <!-- MAIN TEMPLATE -->
52   <xsl:template match="/">
53     <html lang="en">
54       <head>
55         <title><xsl:copy-of select="$bwStr-Root-PageTitle"/></title>
56         <meta content="text/html;charset=utf-8" http-equiv="Content-Type" />
57         <link rel="stylesheet" href="{$resourcesRoot}/css/blue.css"/>
58         <link rel="stylesheet" href="{$resourceCommons}/default/default/subColors.css"/>
59         <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/css/print.css" />
60         <!-- load javascript -->
61         <xsl:if test="/bedework/page='event'">
62           <script type="text/javascript" src="{$resourceCommons}/javascript/jquery/jquery-1.3.2.min.js">&#160;</script>
63           <script type="text/javascript" src="{$resourceCommons}/javascript/jquery/jquery-ui-1.7.1.custom.min.js">&#160;</script>
64           <link rel="stylesheet" href="{$resourceCommons}/javascript/jquery/css/custom-theme/jquery-ui-1.7.1.custom.css"/>
65           <link rel="stylesheet" href="{$resourceCommons}/javascript/jquery/css/custom-theme/bedeworkJquery.css"/>
66           <script type="text/javascript" src="{$resourcesRoot}/javascript/bedework.js">&#160;</script>
67         </xsl:if>
68         <!-- address bar icon -->
69         <link rel="icon" type="image/ico" href="{$resourcesRoot}/images/bedework.ico" />
70       </head>
71       <body>
72         <xsl:if test="/bedework/error">
73           <div id="errors">
74             <xsl:apply-templates select="/bedework/error"/>
75           </div>
76         </xsl:if>
77         <xsl:choose>
78           <xsl:when test="/bedework/page='event'">
79             <!-- show an event -->
80             <xsl:apply-templates select="/bedework/event"/>
81           </xsl:when>
82           <xsl:when test="/bedework/page='eventList'">
83             <!-- show a list of discrete events in a time period -->
84             <xsl:apply-templates select="/bedework/events" mode="eventList"/>
85           </xsl:when>
86         </xsl:choose>
87       </body>
88     </html>
89   </xsl:template>
90
91   <!--==== SINGLE EVENT ====-->
92   <xsl:template match="event">
93     <xsl:variable name="calPath" select="calendar/encodedPath"/>
94     <xsl:variable name="guid" select="guid"/>
95     <xsl:variable name="recurrenceId" select="recurrenceId"/>
96     <xsl:variable name="statusClass">
97       <xsl:choose>
98         <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when>
99         <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when>
100         <xsl:otherwise>bwStatusConfirmed</xsl:otherwise>
101       </xsl:choose>
102     </xsl:variable>
103     <h2 class="{$statusClass}">
104       <a id="linkToEvent" href="javascript:showLink('{$bwCacheHostUrl}/v1.0/event/list-html/{$recurrenceId}/{$guid}')" title="{$bwStr-SgEv-GenerateLinkToThisEvent}">
105        <xsl:copy-of select="$bwStr-SgEv-LinkToThisEvent"/>
106      </a>
107       <xsl:if test="status='CANCELLED'"><xsl:copy-of select="$bwStr-SgEv-Canceled"/><xsl:text> </xsl:text></xsl:if>
108       <xsl:choose>
109         <xsl:when test="link != ''">
110           <xsl:variable name="link" select="link"/>
111           <a href="{$link}">
112             <xsl:value-of select="summary"/>
113           </a>
114         </xsl:when>
115         <xsl:otherwise>
116           <xsl:value-of select="summary"/>
117         </xsl:otherwise>
118       </xsl:choose>
119     </h2>
120     <table id="eventTable" cellpadding="0" cellspacing="0">
121       <tr>
122         <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-When"/></td>
123         <td class="fieldval">
124           <!-- always display local time -->
125           <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text>
126           <xsl:if test="start/allday = 'false'">
127             <span class="time"><xsl:value-of select="start/time"/></span>
128           </xsl:if>
129           <xsl:if test="(end/longdate != start/longdate) or
130                         ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if>
131           <xsl:if test="end/longdate != start/longdate">
132             <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text>
133           </xsl:if>
134           <xsl:choose>
135             <xsl:when test="start/allday = 'true'">
136               <span class="time"><em><xsl:copy-of select="$bwStr-SgEv-AllDay"/></em></span>
137             </xsl:when>
138             <xsl:when test="end/longdate != start/longdate">
139               <span class="time"><xsl:value-of select="end/time"/></span>
140             </xsl:when>
141             <xsl:when test="end/time != start/time">
142               <span class="time"><xsl:value-of select="end/time"/></span>
143             </xsl:when>
144           </xsl:choose>
145           <!-- if timezones are not local, or if floating add labels: -->
146           <xsl:if test="start/timezone/islocal = 'false' or end/timezone/islocal = 'false'">
147             <xsl:text> </xsl:text>
148             --
149             <strong>
150               <xsl:choose>
151                 <xsl:when test="start/floating = 'true'">
152                   <xsl:copy-of select="$bwStr-SgEv-FloatingTime"/>
153                 </xsl:when>
154                 <xsl:otherwise>
155                   <xsl:copy-of select="$bwStr-SgEv-LocalTime"/>
156                 </xsl:otherwise>
157               </xsl:choose>
158             </strong>
159             <br/>
160           </xsl:if>
161           <!-- display in timezone if not local or floating time) -->
162           <xsl:if test="(start/timezone/islocal = 'false' or end/timezone/islocal = 'false') and start/floating = 'false'">
163             <xsl:choose>
164               <xsl:when test="start/timezone/id != end/timezone/id">
165                 <!-- need to display both timezones if they differ from start to end -->
166                 <table border="0" cellspacing="0" id="tztable">
167                   <tr>
168                     <td>
169                       <strong><xsl:copy-of select="$bwStr-SgEv-Start"/></strong>
170                     </td>
171                     <td>
172                       <xsl:choose>
173                         <xsl:when test="start/timezone/islocal='true'">
174                           <xsl:value-of select="start/dayname"/>,
175                           <xsl:value-of select="start/longdate"/>
176                           <xsl:text> </xsl:text>
177                           <span class="time"><xsl:value-of select="start/time"/></span>
178                         </xsl:when>
179                         <xsl:otherwise>
180                           <xsl:value-of select="start/timezone/dayname"/>,
181                           <xsl:value-of select="start/timezone/longdate"/>
182                           <xsl:text> </xsl:text>
183                           <span class="time"><xsl:value-of select="start/timezone/time"/></span>
184                         </xsl:otherwise>
185                       </xsl:choose>
186                     </td>
187                     <td>
188                       --
189                       <strong><xsl:value-of select="start/timezone/id"/></strong>
190                     </td>
191                   </tr>
192                   <tr>
193                     <td>
194                       <strong><xsl:copy-of select="$bwStr-SgEv-End"/></strong>
195                     </td>
196                     <td>
197                       <xsl:choose>
198                         <xsl:when test="end/timezone/islocal='true'">
199                           <xsl:value-of select="end/dayname"/>,
200                           <xsl:value-of select="end/longdate"/>
201                           <xsl:text> </xsl:text>
202                           <span class="time"><xsl:value-of select="end/time"/></span>
203                         </xsl:when>
204                         <xsl:otherwise>
205                           <xsl:value-of select="end/timezone/dayname"/>,
206                           <xsl:value-of select="end/timezone/longdate"/>
207                           <xsl:text> </xsl:text>
208                           <span class="time"><xsl:value-of select="end/timezone/time"/></span>
209                         </xsl:otherwise>
210                       </xsl:choose>
211                     </td>
212                     <td>
213                       --
214                       <strong><xsl:value-of select="end/timezone/id"/></strong>
215                     </td>
216                   </tr>
217                 </table>
218               </xsl:when>
219               <xsl:otherwise>
220                 <!-- otherwise, timezones are the same: display as a single line  -->
221                 <xsl:value-of select="start/timezone/dayname"/>, <xsl:value-of select="start/timezone/longdate"/><xsl:text> </xsl:text>
222                 <xsl:if test="start/allday = 'false'">
223                   <span class="time"><xsl:value-of select="start/timezone/time"/></span>
224                 </xsl:if>
225                 <xsl:if test="(end/timezone/longdate != start/timezone/longdate) or
226                               ((end/timezone/longdate = start/timezone/longdate) and (end/timezone/time != start/timezone/time))"> - </xsl:if>
227                 <xsl:if test="end/timezone/longdate != start/timezone/longdate">
228                   <xsl:value-of select="substring(end/timezone/dayname,1,3)"/>, <xsl:value-of select="end/timezone/longdate"/><xsl:text> </xsl:text>
229                 </xsl:if>
230                 <xsl:choose>
231                   <xsl:when test="start/allday = 'true'">
232                     <span class="time"><em> <xsl:copy-of select="$bwStr-SgEv-AllDay"/></em></span>
233                   </xsl:when>
234                   <xsl:when test="end/timezone/longdate != start/timezone/longdate">
235                     <span class="time"><xsl:value-of select="end/timezone/time"/></span>
236                   </xsl:when>
237                   <xsl:when test="end/timezone/time != start/timezone/time">
238                     <span class="time"><xsl:value-of select="end/timezone/time"/></span>
239                   </xsl:when>
240                 </xsl:choose>
241                 <xsl:text> </xsl:text>
242                 --
243                 <strong><xsl:value-of select="start/timezone/id"/></strong>
244               </xsl:otherwise>
245             </xsl:choose>
246           </xsl:if>
247         </td>
248         <th class="icalIcon" rowspan="2">
249           <div id="eventIcons">
250             <a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-SgEv-AddEventToMyCalendar}" target="myCalendar">
251               <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon.gif" width="20" height="26" border="0" alt="Add event to MyCalendar"/>
252               <xsl:copy-of select="$bwStr-SgEv-AddToMyCalendar"/>
253             </a>
254             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/>
255             <a href="{$bwCacheHostUrl}/v1.0/download/{$recurrenceId}/{$guid}/{$eventIcalName}" title="{$bwStr-SgEv-DownloadEvent}">
256               <img src="{$resourcesRoot}/images/std-ical_icon.gif" width="20" height="26" border="0" alt="Download this event"/>
257               <xsl:copy-of select="$bwStr-SgEv-Download"/>
258             </a>
259           </div>
260         </th>
261       </tr>
262       <tr>
263         <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Where"/></td>
264         <td class="fieldval">
265           <xsl:choose>
266             <xsl:when test="location/link=''">
267               <xsl:value-of select="location/address"/>
268             </xsl:when>
269             <xsl:otherwise>
270               <xsl:variable name="locationLink" select="location/link"/>
271               <a href="{$locationLink}">
272                 <xsl:value-of select="location/address"/>
273               </a>
274             </xsl:otherwise>
275           </xsl:choose>
276           <xsl:if test="location/subaddress!=''">
277             <br/><xsl:value-of select="location/subaddress"/>
278           </xsl:if>
279         </td>
280       </tr>
281       <tr>
282         <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Description"/></td>
283         <td colspan="2" class="fieldval description">
284           <xsl:if test="xproperties/node()[name()='X-BEDEWORK-IMAGE']">
285             <xsl:variable name="bwImage"><xsl:value-of select="xproperties/node()[name()='X-BEDEWORK-IMAGE']/values/text"/></xsl:variable>
286             <img src="{$bwImage}" class="bwEventImage"/>
287           </xsl:if>
288           <xsl:call-template name="replace">
289             <xsl:with-param name="string" select="description"/>
290             <xsl:with-param name="pattern" select="'&#xA;'"/>
291             <xsl:with-param name="replacement"><br/></xsl:with-param>
292           </xsl:call-template>
293         </td>
294       </tr>
295       <xsl:if test="status !='' and status != 'CONFIRMED'">
296         <tr>
297           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-STATUS"/></td>
298           <td class="fieldval">
299             <xsl:value-of select="status"/>
300           </td>
301         </tr>
302       </xsl:if>
303       <xsl:if test="cost!=''">
304         <tr>
305           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Cost"/></td>
306           <td colspan="2" class="fieldval"><xsl:value-of select="cost"/></td>
307         </tr>
308       </xsl:if>
309       <xsl:if test="link != ''">
310         <tr>
311           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-See"/></td>
312           <td colspan="2" class="fieldval">
313             <xsl:variable name="link" select="link"/>
314             <a href="{$link}"><xsl:value-of select="link"/></a>
315           </td>
316         </tr>
317       </xsl:if>
318       <xsl:if test="contact/name!='none'">
319         <tr>
320           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Contact"/></td>
321           <td colspan="2" class="fieldval">
322             <xsl:choose>
323               <xsl:when test="contact/link=''">
324                 <xsl:value-of select="contact/name"/>
325               </xsl:when>
326               <xsl:otherwise>
327                 <xsl:variable name="sponsorLink" select="contact/link"/>
328                 <a href="{$sponsorLink}">
329                   <xsl:value-of select="contact/name"/>
330                 </a>
331               </xsl:otherwise>
332             </xsl:choose>
333             <xsl:if test="contact/phone!=''">
334               <br /><xsl:value-of select="contact/phone"/>
335             </xsl:if>
336             <!-- If you want to display email addresses, uncomment the
337                  following 8 lines. -->
338             <!-- <xsl:if test="contact/email!=''">
339               <br />
340               <xsl:variable name="email" select="contact/email"/>
341               <xsl:variable name="subject" select="summary"/>
342               <a href="mailto:{$email}&amp;subject={$subject}">
343                 <xsl:value-of select="contact/email"/>
344               </a>
345             </xsl:if> -->
346           </td>
347         </tr>
348       </xsl:if>
349       <xsl:if test="comments/comment">
350         <tr>
351           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Comments"/></td>
352           <td class="fieldval comments">
353             <xsl:for-each select="comments/comment">
354               <p><xsl:value-of select="value"/></p>
355             </xsl:for-each>
356           </td>
357         </tr>
358       </xsl:if>
359       <xsl:if test="xproperties/X-BEDEWORK-ALIAS">
360         <tr>
361           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-TopicalArea"/></td>
362           <td class="fieldval">
363             <xsl:for-each select="xproperties/X-BEDEWORK-ALIAS">
364               <xsl:variable name="calUrl" select="values/text"/>
365                 <xsl:call-template name="substring-afterLastInstanceOf">
366                   <xsl:with-param name="string" select="values/text"/>
367                   <xsl:with-param name="char">/</xsl:with-param>
368                 </xsl:call-template>
369               <xsl:if test="position()!=last()">, </xsl:if>
370             </xsl:for-each>
371           </td>
372         </tr>
373       </xsl:if>
374       <xsl:if test="categories/category">
375         <tr>
376           <td class="fieldname"><xsl:copy-of select="$bwStr-SgEv-Categories"/></td>
377           <td class="fieldval">
378             <xsl:for-each select="categories/category">
379               <xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if>
380             </xsl:for-each>
381           </td>
382         </tr>
383       </xsl:if>
384       <!--  xsl:if test="calendar/path!=''">
385         <tr>
386           <td class="fieldname">Calendar:</td>
387           <td class="fieldval">
388             <xsl:variable name="calUrl" select="calendar/encodedPath"/>
389             <a href="{$setSelection}&amp;calUrl={$calUrl}">
390               <xsl:value-of select="calendar/name"/>
391             </a>
392           </td>
393         </tr>
394       </xsl:if-->
395     </table>
396   </xsl:template>
397
398     <!--==== LIST EVENTS - for listing discrete events ====-->
399   <xsl:template match="events" mode="eventList">
400     <div id="listEvents">
401       <ul>
402         <xsl:choose>
403           <xsl:when test="not(event)">
404             <li><xsl:copy-of select="$bwStr-LsEv-NoEventsToDisplay"/></li>
405           </xsl:when>
406           <xsl:otherwise>
407             <xsl:for-each select="event">
408               <xsl:variable name="id" select="id"/>
409               <xsl:variable name="calPath" select="calendar/encodedPath"/>
410               <xsl:variable name="guid" select="guid"/>
411               <xsl:variable name="recurrenceId" select="recurrenceId"/>
412               <li>
413                 <xsl:attribute name="class">
414                   <xsl:choose>
415                     <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when>
416                     <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when>
417                   </xsl:choose>
418                 </xsl:attribute>
419
420                 <xsl:if test="status='CANCELLED'"><strong><xsl:copy-of select="$bwStr-LsEv-Canceled"/><xsl:text> </xsl:text></strong></xsl:if>
421                 <xsl:if test="status='TENTATIVE'"><em><xsl:copy-of select="$bwStr-LsEv-Tentative"/><xsl:text> </xsl:text></em></xsl:if>
422
423                 <a class="title" href="{$eventView}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">
424                   <xsl:value-of select="summary"/>
425                 </a><xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if>
426                 <xsl:if test="/bedework/appvar[key='listEventsSummaryMode']/value='details'">
427                   <xsl:if test="location/subaddress != ''">
428                     , <xsl:value-of select="location/subaddress"/>
429                   </xsl:if>
430                 </xsl:if>
431
432                 <xsl:text> </xsl:text>
433                 <a href="{$privateCal}/event/addEventRef.do?calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-LsVw-AddEventToMyCalendar}" target="myCalendar">
434                   <img class="addref" src="{$resourcesRoot}/images/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="{$bwStr-LsVw-AddEventToMyCalendar}"/>
435                 </a>
436                 <xsl:text> </xsl:text>
437                 <xsl:variable name="eventIcalName" select="concat($id,'.ics')"/>
438                 <a href="{$bwCacheHostUrl}/v1.0/download/{$recurrenceId}/{$guid}/{$eventIcalName}" title="{$bwStr-SgEv-DownloadEvent}">
439                   <img src="{$resourcesRoot}/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="{$bwStr-LsEv-DownloadEvent}"/>
440                 </a>
441                 <br/>
442
443                 <xsl:value-of select="substring(start/dayname,1,3)"/>,
444                 <xsl:value-of select="start/longdate"/>
445                 <xsl:text> </xsl:text>
446                 <xsl:if test="start/allday != 'true'">
447                   <xsl:value-of select="start/time"/>
448                 </xsl:if>
449                 <xsl:choose>
450                   <xsl:when test="start/shortdate != end/shortdate">
451                     -
452                     <xsl:value-of select="substring(end/dayname,1,3)"/>,
453                     <xsl:value-of select="end/longdate"/>
454                     <xsl:text> </xsl:text>
455                     <xsl:if test="start/allday != 'true'">
456                       <xsl:value-of select="end/time"/>
457                     </xsl:if>
458                   </xsl:when>
459                   <xsl:otherwise>
460                     <xsl:if test="start/time != end/time">
461                       -
462                       <xsl:value-of select="end/time"/>
463                     </xsl:if>
464                   </xsl:otherwise>
465                 </xsl:choose>
466
467                 <xsl:if test="/bedework/appvar[key='listEventsSummaryMode']/value='details'">
468                   <br/>
469                   <xsl:value-of select="description"/>
470                   <xsl:if test="link != ''">
471                     <br/>
472                     <xsl:variable name="link" select="link"/>
473                     <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a>
474                   </xsl:if>
475                   <xsl:if test="categories/category">
476                     <br/>
477                     <xsl:copy-of select="$bwStr-LsEv-Categories"/>
478                     <xsl:for-each select="categories/category">
479                       <xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if>
480                     </xsl:for-each>
481                   </xsl:if>
482                   <br/>
483                   <em>
484                     <xsl:if test="cost!=''">
485                       <xsl:value-of select="cost"/>.&#160;
486                     </xsl:if>
487                     <xsl:if test="contact/name!='none'">
488                       <xsl:copy-of select="$bwStr-LsEv-Contact"/><xsl:text> </xsl:text><xsl:value-of select="contact/name"/>
489                     </xsl:if>
490                   </em>
491                 </xsl:if>
492
493               </li>
494             </xsl:for-each>
495           </xsl:otherwise>
496         </xsl:choose>
497       </ul>
498     </div>
499   </xsl:template>
500
501   <xsl:template name="buildListEventsDaysOptions">
502     <xsl:param name="i">1</xsl:param>
503     <xsl:param name="total">31</xsl:param>
504     <xsl:param name="default">7</xsl:param>
505     <xsl:variable name="selected"><xsl:value-of select="/bedework/appvar[key='listEventsDays']/value"/></xsl:variable>
506
507     <option onclick="this.form.setappvar.value='listEventsDay({$i})'">
508       <xsl:attribute name="value"><xsl:value-of select="$i"/></xsl:attribute>
509       <xsl:if test="($selected != '' and $i = $selected) or ($selected = '' and $i = $default)"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if>
510       <xsl:value-of select="$i"/>
511     </option>
512
513     <xsl:if test="$i &lt; $total">
514       <xsl:call-template name="buildListEventsDaysOptions">
515         <xsl:with-param name="i"><xsl:value-of select="$i + 1"/></xsl:with-param>
516         <xsl:with-param name="total"><xsl:value-of select="$total"/></xsl:with-param>
517         <xsl:with-param name="default"><xsl:value-of select="$default"/></xsl:with-param>
518       </xsl:call-template>
519     </xsl:if>
520
521   </xsl:template>
522
523 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.