root/trunk/deployment/webuser/webapp/resources/demoskins/themes/bedeworkTheme/scheduling.xsl

Revision 2896 (checked in by johnsa, 3 years ago)

user client: completed refactoring for theme

Line 
1 <!--
2     Licensed to Jasig under one or more contributor license
3     agreements. See the NOTICE file distributed with this work
4     for additional information regarding copyright ownership.
5     Jasig licenses this file to you under the Apache License,
6     Version 2.0 (the "License"); you may not use this file
7     except in compliance with the License. You may obtain a
8     copy of the License at:
9    
10     http://www.apache.org/licenses/LICENSE-2.0
11    
12     Unless required by applicable law or agreed to in writing,
13     software distributed under the License is distributed on
14     an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15     KIND, either express or implied. See the License for the
16     specific language governing permissions and limitations
17     under the License.
18 -->
19 <xsl:stylesheet
20   version="1.0"
21   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
22   xmlns="http://www.w3.org/1999/xhtml">
23  
24   <!--==== INBOX, OUTBOX, and SCHEDULING ====-->
25   <xsl:template match="inbox">
26     <h2 class="common"><xsl:copy-of select="$bwStr-Inbx-Inbox"/></h2>
27     <table id="inoutbox" class="common" cellspacing="0">
28       <tr>
29         <th class="commonHeader">&#160;</th>
30         <th class="commonHeader"><xsl:copy-of select="$bwStr-Inbx-Sent"/></th>
31         <th class="commonHeader"><xsl:copy-of select="$bwStr-Inbx-From"/></th>
32         <th class="commonHeader"><xsl:copy-of select="$bwStr-Inbx-Title"/></th>
33         <th class="commonHeader"><xsl:copy-of select="$bwStr-Inbx-Start"/></th>
34         <th class="commonHeader"><xsl:copy-of select="$bwStr-Inbx-End"/></th>
35         <th class="commonHeader"><xsl:copy-of select="$bwStr-Inbx-Method"/></th>
36         <th class="commonHeader"><xsl:copy-of select="$bwStr-Inbx-Status"/></th>
37         <th class="commonHeader">&#160;</th>
38         <th class="commonHeader">&#160;</th>
39       </tr>
40       <xsl:for-each select="events/event">
41         <xsl:sort select="lastmod" order="descending"/>
42         <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable>
43         <xsl:variable name="calPath" select="calendar/encodedPath"/>
44         <xsl:variable name="eventName" select="name"/>
45         <xsl:variable name="recurrenceId" select="recurrenceId"/>
46         <xsl:variable name="inboxItemAction">
47           <xsl:choose>
48             <xsl:when test="scheduleMethod=2"><xsl:value-of select="$schedule-initAttendeeUpdate"/></xsl:when>
49             <xsl:when test="scheduleMethod=3"><xsl:value-of select="$eventView"/></xsl:when>
50             <xsl:when test="scheduleMethod=6"><xsl:value-of select="$schedule-processRefresh"/></xsl:when>
51             <xsl:when test="scheduleMethod=7"><xsl:value-of select="$eventView"/></xsl:when>
52             <xsl:otherwise><xsl:value-of select="$schedule-initAttendeeUpdate"/></xsl:otherwise>
53           </xsl:choose>
54         </xsl:variable>
55         <tr>
56           <xsl:attribute name="class">
57             <xsl:choose>
58               <xsl:when test="scheduleState=0"><xsl:copy-of select="$bwStr-Inbx-Unprocessed"/></xsl:when>
59               <xsl:when test="scheduleMethod=1"><xsl:copy-of select="$bwStr-Inbx-Publish"/></xsl:when>
60               <xsl:when test="scheduleMethod=2"><xsl:copy-of select="$bwStr-Inbx-Request"/></xsl:when>
61               <xsl:when test="scheduleMethod=5"><xsl:copy-of select="$bwStr-Inbx-Cancel"/></xsl:when>
62               <xsl:when test="scheduleMethod=7 or scheduleMethod=8"><xsl:copy-of select="$bwStr-Inbx-Counter"/></xsl:when>
63             </xsl:choose>
64           </xsl:attribute>
65           <td>
66             <a href="{$inboxItemAction}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-Inbx-CheckMessage}">
67               <img src="{$resourcesRoot}/images/calIconSchedule-sm.gif" width="13" height="13" border="0" alt="{$bwStr-Inbx-CheckMessage}"/>
68             </a>
69           </td>
70           <td>
71             <a href="{$inboxItemAction}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message">
72               <!--<xsl:value-of select="dtstamp/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="dtstamp/time"/>-->
73               <!--<xsl:value-of select="lastmod"/>-->
74               <xsl:variable name="dt" select="substring-before(lastmod,'T')"/>
75               <xsl:variable name="tm" select="substring-after(lastmod,'T')"/>
76               <xsl:value-of select="substring($dt,1,4)"/>-<xsl:value-of select="substring($dt,5,2)"/>-<xsl:value-of select="substring($dt,7,2)"/>
77               <xsl:text> </xsl:text>
78               <xsl:value-of select="substring($tm,1,2)"/>:<xsl:value-of select="substring($tm,3,2)"/>
79             </a>
80           </td>
81           <td>
82             <xsl:choose>
83               <xsl:when test="scheduleMethod = '1' or
84                               scheduleMethod = '2' or
85                               scheduleMethod = '4' or
86                               scheduleMethod = '5' or
87                               scheduleMethod = '8'">
88                 <xsl:if test="organizer">
89                   <xsl:variable name="organizerUri" select="organizer/organizerUri"/>
90                   <xsl:choose>
91                     <xsl:when test="organizer/cn != ''">
92                       <xsl:value-of select="organizer/cn"/>
93                     </xsl:when>
94                     <xsl:otherwise>
95                       <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/>
96                     </xsl:otherwise>
97                   </xsl:choose>
98                   <xsl:if test="organizer/organizerUri != ''">
99                     <a href="{$organizerUri}" class="emailIcon" title="{$bwStr-Inbx-Email}">
100                       <img src="{$resourcesRoot}/images/email.gif" width="16" height="10" border="0" alt="email"/>
101                     </a>
102                   </xsl:if>
103                 </xsl:if>
104               </xsl:when>
105               <xsl:otherwise>
106                 <xsl:if test="attendees/attendee">
107                   <!-- there will only be one attendee at this point -->
108                   <xsl:variable name="attendeeUri" select="attendees/attendee/attendeeUri"/>
109                   <xsl:choose>
110                     <xsl:when test="attendees/attendee/cn != ''">
111                       <xsl:value-of select="attendees/attendee/cn"/>
112                     </xsl:when>
113                     <xsl:otherwise>
114                       <xsl:value-of select="substring-after(attendees/attendee/attendeeUri,'mailto:')"/>
115                     </xsl:otherwise>
116                   </xsl:choose>
117                   <xsl:if test="$attendeeUri != ''">
118                     <a href="{$attendeeUri}" class="emailIcon" title="{$bwStr-Inbx-Email}">
119                       <img src="{$resourcesRoot}/images/email.gif" width="16" height="10" border="0" alt="email"/>
120                     </a>
121                   </xsl:if>
122                 </xsl:if>
123               </xsl:otherwise>
124             </xsl:choose>
125           </td>
126           <td>
127             <a href="{$inboxItemAction}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-Inbx-CheckMessage}">
128               <xsl:value-of select="title"/>
129             </a>
130           </td>
131           <td><xsl:value-of select="start/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="start/time"/></td>
132           <td><xsl:value-of select="end/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="end/time"/></td>
133           <td><xsl:apply-templates select="scheduleMethod"/></td>
134           <td>
135             <a href="{$inboxItemAction}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-Inbx-CheckMessage}">
136               <xsl:choose>
137                 <xsl:when test="scheduleState=0"><em><xsl:copy-of select="$bwStr-Inbx-Unprocessed"/></em></xsl:when>
138                 <xsl:otherwise><xsl:copy-of select="$bwStr-Inbx-Processed"/></xsl:otherwise>
139               </xsl:choose>
140             </a>
141           </td>
142           <td>
143             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/>
144             <a href="{$export}&amp;calPath={$calPath}&amp;&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="{$bwStr-Inbx-Download}">
145               <img src="{$resourcesRoot}/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="{$bwStr-Inbx-Download}"/>
146             </a>
147           </td>
148           <td>
149             <a href="{$delInboxEvent}&amp;calPath={$calPath}&amp;&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-Inbx-Delete}">
150               <img src="{$resourcesRoot}/images/trashIcon.gif" width="13" height="13" border="0" alt="{$bwStr-Inbx-Delete}"/>
151             </a>
152           </td>
153         </tr>
154       </xsl:for-each>
155     </table>
156   </xsl:template>
157
158   <xsl:template match="outbox">
159     <h2 class="common"><xsl:copy-of select="$bwStr-Oubx-Outbox"/></h2>
160     <table id="inoutbox" class="common" cellspacing="0">
161       <tr>
162         <th class="commonHeader">&#160;</th>
163         <th class="commonHeader"><xsl:copy-of select="$bwStr-Oubx-Sent"/></th>
164         <th class="commonHeader"><xsl:copy-of select="$bwStr-Oubx-Organizer"/></th>
165         <th class="commonHeader"><xsl:copy-of select="$bwStr-Oubx-Title"/></th>
166         <th class="commonHeader"><xsl:copy-of select="$bwStr-Oubx-Start"/></th>
167         <th class="commonHeader"><xsl:copy-of select="$bwStr-Oubx-End"/></th>
168         <th class="commonHeader"><xsl:copy-of select="$bwStr-Oubx-Method"/></th>
169         <th class="commonHeader"><xsl:copy-of select="$bwStr-Oubx-Status"/></th>
170         <th class="commonHeader">&#160;</th>
171         <th class="commonHeader">&#160;</th>
172       </tr>
173       <xsl:for-each select="events/event">
174         <xsl:sort select="lastmod" order="descending"/>
175         <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable>
176         <xsl:variable name="calPath" select="calendar/encodedPath"/>
177         <xsl:variable name="eventName" select="name"/>
178         <xsl:variable name="recurrenceId" select="recurrenceId"/>
179         <xsl:variable name="inboxItemAction">
180           <xsl:choose>
181             <xsl:when test="scheduleMethod=2"><xsl:value-of select="$schedule-initAttendeeRespond"/></xsl:when>
182             <xsl:when test="scheduleMethod=3"><xsl:value-of select="$schedule-initAttendeeReply"/></xsl:when>
183             <xsl:otherwise><xsl:value-of select="$schedule-initAttendeeRespond"/></xsl:otherwise>
184           </xsl:choose>
185         </xsl:variable>
186         <tr>
187           <xsl:attribute name="class">
188             <xsl:choose>
189               <xsl:when test="scheduleMethod=1"><xsl:copy-of select="$bwStr-Oubx-Publish"/></xsl:when>
190               <xsl:when test="scheduleMethod=2"><xsl:copy-of select="$bwStr-Oubx-Request"/></xsl:when>
191               <xsl:when test="scheduleMethod=5"><xsl:copy-of select="$bwStr-Oubx-Cancel"/></xsl:when>
192               <xsl:when test="scheduleMethod=7 or scheduleMethod=8"><xsl:copy-of select="$bwStr-Oubx-Counter"/></xsl:when>
193             </xsl:choose>
194           </xsl:attribute>
195           <td>
196             <a href="{$inboxItemAction}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-Oubx-CheckMessage}">
197               <img src="{$resourcesRoot}/images/calIconSchedule-sm.gif" width="13" height="13" border="0" alt="{$bwStr-Oubx-CheckMessage}"/>
198             </a>
199           </td>
200           <td>
201             <a href="{$inboxItemAction}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-Oubx-CheckMessage}">
202               <!-- <xsl:value-of select="dtstamp/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="dtstamp/time"/>-->
203               <!--<xsl:value-of select="lastmod"/>-->
204               <xsl:variable name="dt" select="substring-before(lastmod,'T')"/>
205               <xsl:variable name="tm" select="substring-after(lastmod,'T')"/>
206               <xsl:value-of select="substring($dt,1,4)"/>-<xsl:value-of select="substring($dt,5,2)"/>-<xsl:value-of select="substring($dt,7,2)"/>
207               <xsl:text> </xsl:text>
208               <xsl:value-of select="substring($tm,1,2)"/>:<xsl:value-of select="substring($tm,3,2)"/>
209             </a>
210           </td>
211           <td>
212             <xsl:if test="organizer">
213               <xsl:variable name="organizerUri" select="organizer/organizerUri"/>
214               <xsl:choose>
215                 <xsl:when test="organizer/cn != ''">
216                   <xsl:value-of select="organizer/cn"/>
217                 </xsl:when>
218                 <xsl:otherwise>
219                   <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/>
220                 </xsl:otherwise>
221               </xsl:choose>
222               <xsl:if test="organizer/organizerUri != ''">
223                 <a href="{$organizerUri}" class="emailIcon" title="{$bwStr-Oubx-Email}">
224                   <img src="{$resourcesRoot}/images/email.gif" width="16" height="10" border="0" alt="{$bwStr-Oubx-Email}"/>
225                 </a>
226               </xsl:if>
227             </xsl:if>
228           </td>
229           <td>
230             <a href="{$inboxItemAction}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}">
231               <xsl:value-of select="title"/>
232             </a>
233           </td>
234           <td><xsl:value-of select="start/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="start/time"/></td>
235           <td><xsl:value-of select="end/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="end/time"/></td>
236           <td><xsl:apply-templates select="scheduleMethod"/></td>
237           <td>
238             <a href="{$inboxItemAction}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}">
239               <xsl:choose>
240                 <xsl:when test="scheduleState=0"><em><xsl:copy-of select="$bwStr-Oubx-Unprocessed"/></em></xsl:when>
241                 <xsl:otherwise><xsl:copy-of select="$bwStr-Oubx-Processed"/></xsl:otherwise>
242               </xsl:choose>
243             </a>
244           </td>
245           <td>
246             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/>
247             <a href="{$export}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="{$bwStr-Oubx-Download}">
248               <img src="{$resourcesRoot}/images/std-ical_icon_small.gif" width="12" height="16" border="0" alt="{$bwStr-Oubx-Download}"/>
249             </a>
250           </td>
251           <td>
252             <a href="{$delEvent}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="{$bwStr-Oubx-Delete}">
253               <img src="{$resourcesRoot}/images/trashIcon.gif" width="13" height="13" border="0" alt="{$bwStr-Oubx-Delete}"/>
254             </a>
255           </td>
256         </tr>
257       </xsl:for-each>
258     </table>
259   </xsl:template>
260
261   <xsl:template match="scheduleMethod">
262     <xsl:choose>
263       <xsl:when test="node()=1"><xsl:copy-of select="$bwStr-ScMe-Publish"/></xsl:when>
264       <xsl:when test="node()=2"><xsl:copy-of select="$bwStr-ScMe-Request"/></xsl:when>
265       <xsl:when test="node()=3"><xsl:copy-of select="$bwStr-ScMe-Reply"/></xsl:when>
266       <xsl:when test="node()=4"><xsl:copy-of select="$bwStr-ScMe-Add"/></xsl:when>
267       <xsl:when test="node()=5"><xsl:copy-of select="$bwStr-ScMe-Cancel"/></xsl:when>
268       <xsl:when test="node()=6"><xsl:copy-of select="$bwStr-ScMe-Refresh"/></xsl:when>
269       <xsl:when test="node()=7"><xsl:copy-of select="$bwStr-ScMe-Counter"/></xsl:when>
270       <xsl:when test="node()=8"><xsl:copy-of select="$bwStr-ScMe-Declined"/></xsl:when><!-- declinecounter -->
271       <xsl:otherwise>unknown</xsl:otherwise>
272     </xsl:choose>
273   </xsl:template>
274
275   <xsl:template match="formElements" mode="attendeeRespond">
276     <xsl:variable name="calPathEncoded" select="form/calendar/encodedPath"/>
277     <xsl:variable name="calPath" select="form/calendar/path"/>
278     <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable>
279     <xsl:variable name="recurrenceId" select="recurrenceId"/>
280     <!-- The name "eventForm" is referenced by several javascript functions. Do not
281     change it without modifying bedework.js -->
282     <form name="eventForm" method="post" action="{$schedule-attendeeRespond}" id="standardForm">
283       <input type="hidden" name="updateEvent" value="true"/>
284       <input type="hidden" name="endType" value="date"/>
285       <h2>
286         <xsl:choose>
287           <xsl:when test="scheduleMethod = '5'">
288             <xsl:copy-of select="$bwStr-AtRe-MeetingCanceled"/>
289           </xsl:when>
290           <xsl:when test="scheduleMethod = '8'">
291             <xsl:copy-of select="$bwStr-AtRe-MeetingCounterDeclined"/>
292           </xsl:when>
293           <xsl:otherwise>
294             <xsl:copy-of select="$bwStr-AtRe-MeetingRequest"/>
295           </xsl:otherwise>
296         </xsl:choose>
297       </h2>
298       <table class="common" cellspacing="0">
299         <tr>
300           <th colspan="2" class="commonHeader">
301             <xsl:copy-of select="$bwStr-AtRe-Organizer"/>
302             <xsl:choose>
303               <xsl:when test="organizer/cn != ''">
304                 <xsl:value-of select="organizer/cn"/>
305               </xsl:when>
306               <xsl:otherwise>
307                 <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/>
308               </xsl:otherwise>
309             </xsl:choose>
310           </th>
311         </tr>
312         <xsl:choose>
313           <xsl:when test="scheduleMethod = '5'">
314             <tr>
315               <td colspan="2" class="highlight">
316                 <xsl:copy-of select="$bwStr-AtRe-ThisMeetingCanceled"/>
317               </td>
318             </tr>
319           </xsl:when>
320           <xsl:when test="scheduleMethod = '8'">
321             <tr>
322               <td colspan="2" class="highlight">
323                 <xsl:copy-of select="$bwStr-AtRe-CounterReqDeclined"/>
324               </td>
325             </tr>
326           </xsl:when>
327         </xsl:choose>
328         <!--
329         <tr>
330           <td class="fieldname">
331             <xsl:copy-of select="$bwStr-AtRe-Calendar"/>
332           </td>
333           <td class="fieldval scheduleActions">
334             <xsl:choose>
335               <xsl:when test="not(guidcals/calendar)">
336               <!- - the event has not been added to a calendar, so this is the
337                    first request - - >
338
339                 <!- - the string "user/" should not be hard coded; fix this - - >
340                 <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable>
341                 <xsl:variable name="writableCalendars">
342                   <xsl:value-of select="
343                     count(/bedework/myCalendars//calendar[calType = '1' and
344                            currentAccess/current-user-privilege-set/privilege/write-content]) +
345                     count(/bedework/mySubscriptions//calendar[calType = '1' and
346                            currentAccess/current-user-privilege-set/privilege/write-content and
347                            (not(contains(path,$userPath)))])"/>
348                 </xsl:variable>
349                 <xsl:choose>
350                   <xsl:when test="$writableCalendars = 1">
351                     <!- - there is only 1 writable calendar, so find it by looking down both trees at once - - >
352                     <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[calType = '1' and
353                              currentAccess/current-user-privilege-set/privilege/write-content]/path"/><xsl:value-of select="/bedework/mySubscriptions//calendar[calType = '1' and
354                            currentAccess/current-user-privilege-set/privilege/write-content and
355                            (not(contains(path,$userPath)))]/path"/></xsl:variable>
356
357                     <input type="hidden" name="newCalPath" value="{$newCalPath}"/>
358
359                     <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable>
360                     <span id="bwEventCalDisplay">
361                       <xsl:choose>
362                         <xsl:when test="contains($newCalPath,$userFullPath)">
363                           <xsl:value-of select="substring-after($newCalPath,$userFullPath)"/>
364                         </xsl:when>
365                         <xsl:otherwise>
366                           <xsl:value-of select="$newCalPath"/>
367                         </xsl:otherwise>
368                       </xsl:choose>
369                     </span>
370                   </xsl:when>
371                   <xsl:otherwise>
372                     <input type="hidden" name="newCalPath" id="bwNewCalPathField" value=""/>
373                     <!- -
374                       <xsl:if test="form/calendar/calType = '1'"><xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute></xsl:if>
375                     </input>- - >
376
377                     <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable>
378
379                     <span id="bwEventCalDisplay">
380                       <xsl:if test="form/calendar/calType = '1'">
381                         <xsl:choose>
382                           <xsl:when test="contains(form/calendar/path,$userFullPath)">
383                             <xsl:value-of select="substring-after(form/calendar/path,$userFullPath)"/>
384                           </xsl:when>
385                           <xsl:otherwise>
386                             <xsl:value-of select="form/calendar/path"/>
387                           </xsl:otherwise>
388                         </xsl:choose>
389                       </xsl:if>
390                       <xsl:text> </xsl:text>
391                       <!- - this final text element is required to avoid an empty
392                            span element which is improperly rendered in the browser - - >
393                     </span>
394
395                     <xsl:call-template name="selectCalForEvent"/>
396
397                   </xsl:otherwise>
398                 </xsl:choose>
399
400               </xsl:when>
401               <xsl:otherwise>
402                 <!- - the event exists in calendars already, so this is a
403                      subsequent follow-up.  Let the user choose which copies
404                      of the event to update.  For now, we'll just list them
405                      and add calPath request parameters.
406
407                      This should be changed - we will only have one of these so
408                      the for-each is not needed - - >
409                 <ul>
410                   <xsl:for-each select="guidcals/calendar">
411                     <li class="calendar">
412                       <xsl:value-of select="name"/>
413                       <input type="hidden" name="calPath">
414                         <xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute>
415                       </input>
416                     </li>
417                   </xsl:for-each>
418                 </ul>
419               </xsl:otherwise>
420             </xsl:choose>
421           </td>
422         </tr>
423         -->
424         <xsl:if test="scheduleMethod != '8'">
425           <tr>
426             <td class="fieldname"><xsl:copy-of select="$bwStr-AtRe-Action"/></td>
427             <td class="fieldval scheduleActions">
428               <xsl:choose>
429                 <xsl:when test="scheduleMethod = '5' or scheduleMethod = '8'">
430                 <!-- respond to a cancel -->
431                   <input type="hidden" name="method" value="REPLY"/>
432                   <select name="cancelAction">
433                     <option value="mark"><xsl:copy-of select="$bwStr-AtRe-MarkEventAsCanceled"/></option>
434                     <option value="delete"><xsl:copy-of select="$bwStr-AtRe-DeleteEvent"/></option>
435                   </select>
436                 </xsl:when>
437                 <xsl:otherwise>
438                 <!-- respond to a request -->
439                   <input type="radio" name="method" value="REPLY" checked="checked" onclick="swapScheduleDisplay('hide');"/><xsl:copy-of select="$bwStr-AtRe-ReplyAs"/>
440                   <select name="partstat">
441                     <option value="ACCEPTED"><xsl:copy-of select="$bwStr-AtRe-Accepted"/></option>
442                     <option value="DECLINED"><xsl:copy-of select="$bwStr-AtRe-Declined"/></option>
443                     <option value="TENTATIVE"><xsl:copy-of select="$bwStr-AtRe-Tentative"/></option>
444                   </select><br/>
445                   <!--<input type="radio" name="method" value="REFRESH" onclick="swapScheduleDisplay('hide');"/>refresh this event<br/>-->
446                   <input type="radio" name="method" value="DELEGATE" onclick="swapScheduleDisplay('hide');"/><xsl:copy-of select="$bwStr-AtRe-DelegateTo"/>
447                   <input type="test" name="delegate" value=""/><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-AtRe-URIOrAccount"/><br/>
448                   <input type="radio" name="method" value="COUNTER" onclick="swapScheduleDisplay('show');"/><xsl:copy-of select="$bwStr-AtRe-CounterSuggest"/>
449                 </xsl:otherwise>
450               </xsl:choose>
451             </td>
452           </tr>
453           <tr id="scheduleDateEdit" class="invisible">
454             <td class="fieldname"><xsl:copy-of select="$bwStr-AtRe-NewDateTime"/></td>
455             <td class="fieldval scheduleActions">
456               <!-- Set the timefields class for the first load of the page;
457                    subsequent changes will take place using javascript without a
458                    page reload. -->
459               <xsl:variable name="timeFieldsClass">
460                 <xsl:choose>
461                   <xsl:when test="form/allDay/input/@checked='checked'"><xsl:copy-of select="$bwStr-AtRe-Invisible"/>invisible</xsl:when>
462                   <xsl:otherwise><xsl:copy-of select="$bwStr-AtRe-TimeFields"/></xsl:otherwise>
463                 </xsl:choose>
464               </xsl:variable>
465               <xsl:choose>
466                 <xsl:when test="form/allDay/input/@checked='checked'">
467                   <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/>
468                   <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/>
469                   <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/>
470                 </xsl:when>
471                 <xsl:otherwise>
472                   <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/>
473                   <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"/>
474                   <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"/>
475                 </xsl:otherwise>
476               </xsl:choose>
477               <xsl:copy-of select="$bwStr-AtRe-AllDayEvent"/><br/>
478               <div class="dateStartEndBox">
479                 <strong><xsl:copy-of select="$bwStr-AtRe-Start"/></strong>
480                 <div class="dateFields">
481                   <span class="startDateLabel"><xsl:copy-of select="$bwStr-AtRe-Date"/><xsl:text> </xsl:text></span>
482                   <xsl:copy-of select="form/start/month/*"/>
483                   <xsl:copy-of select="form/start/day/*"/>
484                   <xsl:choose>
485                     <xsl:when test="/bedework/creating = 'true'">
486                       <xsl:copy-of select="form/start/year/*"/>
487                     </xsl:when>
488                     <xsl:otherwise>
489                       <xsl:copy-of select="form/start/yearText/*"/>
490                     </xsl:otherwise>
491                   </xsl:choose>
492                 </div>
493                 <!--<script type="text/javascript">
494                 <xsl:comment>
495                   startDateDynCalWidget = new dynCalendar('startDateDynCalWidget', <xsl:value-of select="number(/bedework/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedework/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'startDateCalWidgetCallback');
496                 </xsl:comment>
497                 </script>-->
498                 <!--<img src="{$resourcesRoot}/images/calIcon.gif" width="16" height="15" border="0"/>-->
499                 <div class="{$timeFieldsClass}" id="startTimeFields">
500                   <span id="calWidgetStartTimeHider" class="show">
501                     <xsl:copy-of select="form/start/hour/*"/>
502                     <xsl:copy-of select="form/start/minute/*"/>
503                     <xsl:if test="form/start/ampm">
504                       <xsl:copy-of select="form/start/ampm/*"/>
505                     </xsl:if>
506                     <xsl:text> </xsl:text>
507                     <!--<a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/images/clockIcon.gif" width="16" height="15" border="0"/></a>-->
508                   </span>
509                 </div>
510               </div>
511               <div class="dateStartEndBox">
512                 <strong><xsl:copy-of select="$bwStr-AtRe-End"/></strong>
513                 <xsl:choose>
514                   <xsl:when test="form/end/type='E'">
515                     <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/>
516                   </xsl:when>
517                   <xsl:otherwise>
518                     <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/>
519                   </xsl:otherwise>
520                 </xsl:choose>
521                 <xsl:copy-of select="$bwStr-AtRe-Date"/>
522                 <xsl:variable name="endDateTimeClass">
523                   <xsl:choose>
524                     <xsl:when test="form/end/type='E'"><xsl:copy-of select="$bwStr-AtRe-Shown"/></xsl:when>
525                     <xsl:otherwise><xsl:copy-of select="$bwStr-AtRe-Invisible"/></xsl:otherwise>
526                   </xsl:choose>
527                 </xsl:variable>
528                 <div class="{$endDateTimeClass}" id="endDateTime">
529                   <div class="dateFields">
530                     <xsl:copy-of select="form/end/dateTime/month/*"/>
531                     <xsl:copy-of select="form/end/dateTime/day/*"/>
532                     <xsl:choose>
533                       <xsl:when test="/bedework/creating = 'true'">
534                         <xsl:copy-of select="form/end/dateTime/year/*"/>
535                       </xsl:when>
536                       <xsl:otherwise>
537                         <xsl:copy-of select="form/end/dateTime/yearText/*"/>
538                       </xsl:otherwise>
539                     </xsl:choose>
540                   </div>
541                   <!--<script type="text/javascript">
542                   <xsl:comment>
543                     endDateDynCalWidget = new dynCalendar('endDateDynCalWidget', <xsl:value-of select="number(/bedework/formElements/form/start/yearText/input/@value)"/>, <xsl:value-of select="number(/bedework/formElements/form/start/month/select/option[@selected='selected']/@value)-1"/>, <xsl:value-of select="number(/bedework/formElements/form/start/day/select/option[@selected='selected']/@value)"/>, 'endDateCalWidgetCallback');
544                   </xsl:comment>
545                   </script>-->
546                   <div class="{$timeFieldsClass}" id="endTimeFields">
547                     <span id="calWidgetEndTimeHider" class="show">
548                       <xsl:copy-of select="form/end/dateTime/hour/*"/>
549                       <xsl:copy-of select="form/end/dateTime/minute/*"/>
550                       <xsl:if test="form/end/dateTime/ampm">
551                         <xsl:copy-of select="form/end/dateTime/ampm/*"/>
552                       </xsl:if>
553                       <xsl:text> </xsl:text>
554                       <!--<a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/images/clockIcon.gif" width="16" height="15" border="0"/></a>-->
555                     </span>
556                   </div>
557                 </div><br/>
558                 <div id="clock" class="invisible">
559                   <xsl:call-template name="clock"/>
560                 </div>
561                 <div class="dateFields">
562                   <xsl:choose>
563                     <xsl:when test="form/end/type='D'">
564                       <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/>
565                     </xsl:when>
566                     <xsl:otherwise>
567                       <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/>
568                     </xsl:otherwise>
569                   </xsl:choose>
570                   <xsl:copy-of select="$bwStr-AtRe-Duration"/>
571                   <xsl:variable name="endDurationClass">
572                     <xsl:choose>
573                       <xsl:when test="form/end/type='D'"><xsl:copy-of select="$bwStr-AtRe-Shown"/></xsl:when>
574                       <xsl:otherwise><xsl:copy-of select="$bwStr-AtRe-Invisible"/></xsl:otherwise>
575                     </xsl:choose>
576                   </xsl:variable>
577                   <xsl:variable name="durationHrMinClass">
578                     <xsl:choose>
579                       <xsl:when test="form/allDay/input/@checked='checked'"><xsl:copy-of select="$bwStr-AtRe-Invisible"/></xsl:when>
580                       <xsl:otherwise><xsl:copy-of select="$bwStr-AtRe-Shown"/></xsl:otherwise>
581                     </xsl:choose>
582                   </xsl:variable>
583                   <div class="{$endDurationClass}" id="endDuration">
584                     <xsl:choose>
585                       <xsl:when test="form/end/duration/weeks/input/@value = '0'">
586                       <!-- we are using day, hour, minute format -->
587                       <!-- must send either no week value or week value of 0 (zero) -->
588                         <div class="durationBox">
589                           <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/>
590                           <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/>
591                           <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/><xsl:copy-of select="$bwStr-AtRe-Days"/>
592                           <span id="durationHrMin" class="{$durationHrMinClass}">
593                             <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/>
594                             <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/><xsl:copy-of select="$bwStr-AtRe-Hours"/>
595                             <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/>
596                             <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/><xsl:copy-of select="$bwStr-AtRe-Minutes"/>
597                           </span>
598                         </div>
599                         <span class="durationSpacerText"><xsl:copy-of select="$bwStr-AtRe-Or"/></span>
600                         <div class="durationBox">
601                           <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/>
602                           <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/>
603                           <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="disabled"/><xsl:copy-of select="$bwStr-AtRe-Weeks"/>
604                         </div>
605                       </xsl:when>
606                       <xsl:otherwise>
607                         <!-- we are using week format -->
608                         <div class="durationBox">
609                           <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/>
610                           <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/>
611                           <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="disabled"/><xsl:copy-of select="$bwStr-AtRe-Days"/>
612                           <span id="durationHrMin" class="{$durationHrMinClass}">
613                             <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/>
614                             <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="disabled"/><xsl:copy-of select="$bwStr-AtRe-Hours"/>
615                             <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/>
616                             <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="disabled"/><xsl:copy-of select="$bwStr-AtRe-Minutes"/>
617                           </span>
618                         </div>
619                         <span class="durationSpacerText"><xsl:copy-of select="$bwStr-AtRe-Or"/></span>
620                         <div class="durationBox">
621                           <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/>
622                           <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/>
623                           <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/><xsl:copy-of select="$bwStr-AtRe-Weeks"/>
624                         </div>
625                       </xsl:otherwise>
626                     </xsl:choose>
627                   </div>
628                 </div><br/>
629                 <div class="dateFields" id="noDuration">
630                   <xsl:choose>
631                     <xsl:when test="form/end/type='N'">
632                       <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/>
633                     </xsl:when>
634                     <xsl:otherwise>
635                       <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/>
636                     </xsl:otherwise>
637                   </xsl:choose>
638                   <xsl:copy-of select="$bwStr-AtRe-ThisEventNoDuration"/>
639                 </div>
640               </div>
641             </td>
642           </tr>
643           <tr id="scheduleLocationEdit" class="invisible">
644             <td class="fieldname"><xsl:copy-of select="$bwStr-AtRe-NewLocation"/></td>
645             <td class="fieldval scheduleActions">
646               <span class="std-text"><xsl:copy-of select="$bwStr-AtRe-Choose"/><xsl:text> </xsl:text></span>
647               <span id="eventFormLocationList">
648                 <select name="eventLocationUid">
649                   <option value="-1"><xsl:copy-of select="$bwStr-AtRe-Select"/></option>
650                   <xsl:copy-of select="/bedework/formElements/form/location/locationmenu/select/*"/>
651                 </select>
652               </span>
653               <span class="std-text"><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-AtRe-OrAddNew"/><xsl:text> </xsl:text></span>
654               <input type="text" name="locationAddress.value" value="" />
655             </td>
656           </tr>
657           <!-- hide ability to set comments in v.3.6 (will restore in v.3.7)
658           <xsl:if test="scheduleMethod != '5'">
659             <tr>
660               <td class="fieldname"><xsl:copy-of select="$bwStr-AtRe-Comment"/></td>
661               <td class="fieldval scheduleActions">
662                 <textarea name="comment" cols="60" rows="2">
663                   <xsl:text> </xsl:text>
664                 </textarea>
665               </td>
666             </tr>
667           </xsl:if>
668           -->
669         </xsl:if>
670         <tr>
671           <td class="fieldname">&#160;</td>
672           <td class="fieldval scheduleActions">
673             <xsl:choose>
674               <xsl:when test="scheduleMethod='8'">
675                 <input name="delete" type="button" value="{$bwStr-AtRe-Delete}" onclick="document.location.replace('{$delEvent}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}')"/>
676               </xsl:when>
677               <xsl:otherwise>
678                 <input name="submit" type="submit" value="{$bwStr-AtRe-Submit}"/>
679               </xsl:otherwise>
680             </xsl:choose>
681             &#160;
682             <input name="cancelled" type="submit" value="{$bwStr-AtRe-Cancel}"/>
683           </td>
684         </tr>
685         <tr>
686           <td class="fieldname">
687             <xsl:copy-of select="$bwStr-AtRe-Title"/>Title:
688           </td>
689           <td class="fieldval">
690             <strong><xsl:value-of select="form/title/input/@value"/></strong>
691           </td>
692         </tr>
693         <tr>
694           <td class="fieldname"><xsl:copy-of select="$bwStr-AtRe-Description"/></td>
695           <td class="fieldval">
696             <xsl:value-of select="/bedework/formElements/form/desc/textarea"/>
697           </td>
698         </tr>
699         <tr>
700           <td class="fieldname">
701             <xsl:copy-of select="$bwStr-AtRe-DateAndTime"/>
702           </td>
703           <td class="fieldval">
704             <xsl:value-of select="form/start/month/select/option[@selected='selected']"/>
705             <xsl:text> </xsl:text>
706             <xsl:value-of select="form/start/day/select/option[@selected='selected']"/>,
707             <xsl:value-of select="form/start/yearText/input/@value"/>
708             <xsl:text> </xsl:text>
709             <xsl:value-of select="form/start/hour/select/option[@selected='selected']"/>:<xsl:value-of select="form/start/minute/select/option[@selected='selected']"/>
710             -
711             <xsl:value-of select="form/end/dateTime/month/select/option[@selected='selected']"/>
712             <xsl:text> </xsl:text>
713             <xsl:value-of select="form/end/dateTime/day/select/option[@selected='selected']"/>,
714             <xsl:value-of select="form/end/dateTime/yearText/input/@value"/>
715             <xsl:text> </xsl:text>
716             <xsl:value-of select="form/end/dateTime/hour/select/option[@selected='selected']"/>:<xsl:value-of select="form/end/dateTime/minute/select/option[@selected='selected']"/>
717             <xsl:if test="form/allDay/input/@checked='checked'">
718               <xsl:text> </xsl:text>
719               <xsl:copy-of select="$bwStr-AtRe-AllDay"/>
720             </xsl:if>
721           </td>
722         </tr>
723         <tr>
724           <td class="fieldname"><xsl:copy-of select="$bwStr-AtRe-Location"/></td>
725           <td class="fieldval" align="left">
726             <xsl:if test="location/address = ''">
727              <em><xsl:copy-of select="$bwStr-AtRe-NotSpecified"/></em>
728             </xsl:if>
729             <xsl:value-of select="location/address"/>
730           </td>
731         </tr>
732         <xsl:if test="attendee">
733           <tr>
734             <td class="fieldname"><xsl:copy-of select="$bwStr-AtRe-Attendees"/></td>
735             <td class="fieldval">
736               <table id="attendees" cellspacing="0">
737                 <tr>
738                   <th><xsl:copy-of select="$bwStr-AtRe-Role"/></th>
739                   <th><xsl:copy-of select="$bwStr-AtRe-Status"/></th>
740                   <th><xsl:copy-of select="$bwStr-AtRe-Attendee"/></th>
741                 </tr>
742                 <xsl:for-each select="attendee">
743                   <xsl:sort select="cn" order="ascending" case-order="upper-first"/>
744                   <xsl:sort select="attendeeUri" order="ascending" case-order="upper-first"/>
745                   <tr>
746                     <td class="role">
747                       <xsl:apply-templates select="role"/>
748                     </td>
749                     <td class="status">
750                       <xsl:apply-templates select="partstat"/>
751                     </td>
752                     <td>
753                       <xsl:variable name="attendeeUri" select="attendeeUri"/>
754                       <a href="{$attendeeUri}">
755                         <xsl:choose>
756                           <xsl:when test="cn != ''">
757                             <xsl:value-of select="cn"/>
758                           </xsl:when>
759                           <xsl:otherwise>
760                             <xsl:value-of select="substring-after(attendeeUri,'mailto:')"/>
761                           </xsl:otherwise>
762                         </xsl:choose>
763                       </a>
764                     </td>
765                   </tr>
766                 </xsl:for-each>
767               </table>
768             </td>
769           </tr>
770         </xsl:if>
771         <!--  Transparency  -->
772         <!--
773         <tr>
774           <td class="fieldname">
775             Affects free/busy:
776           </td>
777           <td class="fieldval">
778             <xsl:choose>
779               <xsl:when test="form/transparency = 'TRANSPARENT'">
780                 <input type="radio" name="transparency" value="OPAQUE"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/>
781                 <input type="radio" name="transparency" value="TRANSPARENT" checked="checked"/>no <span class="note">(transparent: event status does not affect your free/busy)</span>
782               </xsl:when>
783               <xsl:otherwise>
784                 <input type="radio" name="transparency" value="OPAQUE" checked="checked"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/>
785                 <input type="radio" name="transparency" value="TRANSPARENT"/>no <span class="note">(transparent: event status does not affect your free/busy)</span>
786               </xsl:otherwise>
787             </xsl:choose>
788           </td>
789         </tr>-->
790         <xsl:if test="form/link/input/@value != ''">
791           <tr>
792             <td class="fieldname"><xsl:copy-of select="$bwStr-AtRe-See"/></td>
793             <td class="fieldval">
794               <a>
795                 <xsl:attribute name="href"><xsl:value-of select="form/link/input/@value"/></xsl:attribute>
796                 <xsl:value-of select="form/link/input/@value"/>
797               </a>
798             </td>
799           </tr>
800         </xsl:if>
801         <!--  Status  -->
802         <tr>
803           <td class="fieldname">
804             <xsl:copy-of select="$bwStr-AtRe-Status"/>
805           </td>
806           <td class="fieldval">
807             <xsl:value-of select="form/status"/>
808           </td>
809         </tr>
810       </table>
811     </form>
812   </xsl:template>
813
814   <xsl:template match="event" mode="attendeeReply">
815     <xsl:variable name="calPath" select="calendar/encodedPath"/>
816     <xsl:variable name="guid"><xsl:call-template name="url-encode"><xsl:with-param name="str" select="guid"/></xsl:call-template></xsl:variable>
817     <xsl:variable name="recurrenceId" select="recurrenceId"/>
818     <xsl:variable name="statusClass">
819       <xsl:choose>
820         <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when>
821         <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when>
822         <xsl:otherwise>bwStatusConfirmed</xsl:otherwise>
823       </xsl:choose>
824     </xsl:variable>
825     <h2>
826       <xsl:choose>
827         <xsl:when test="scheduleMethod='7'">
828           <xsl:copy-of select="$bwStr-AtRy-MeetingChangeRequest"/>
829         </xsl:when>
830         <xsl:otherwise>
831           <xsl:copy-of select="$bwStr-AtRy-MeetingReply"/>
832         </xsl:otherwise>
833       </xsl:choose>
834     </h2>
835     <form name="processReply" method="post" action="{$schedule-processAttendeeReply}">
836       <table class="common" cellspacing="0">
837         <tr>
838           <th colspan="2" class="commonHeader">
839             <div id="eventActions">
840             </div>
841             <xsl:copy-of select="$bwStr-AtRy-Organizer"/>
842             <xsl:choose>
843               <xsl:when test="organizer/cn != ''">
844                 <xsl:value-of select="organizer/cn"/>
845               </xsl:when>
846               <xsl:otherwise>
847                 <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/>
848               </xsl:otherwise>
849             </xsl:choose>
850           </th>
851         </tr>
852         <xsl:choose>
853           <xsl:when test="scheduleMethod = '7'">
854             <tr>
855               <td colspan="2" class="highlight">
856                 <xsl:copy-of select="$bwStr-AtRy-Shown"/><xsl:text> </xsl:text><xsl:value-of select="substring-after(attendees/attendee/attendeeUri,'mailto:')"/><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-AtRy-HasRequestedChange"/>
857               </td>
858             </tr>
859           </xsl:when>
860           <xsl:otherwise>
861             <tr>
862               <td colspan="2" class="highlight">
863                 <xsl:copy-of select="$bwStr-AtRy-Attendee"/><xsl:text> </xsl:text><xsl:value-of select="substring-after(attendees/attendee/attendeeUri,'mailto:')"/><xsl:text> </xsl:text><xsl:copy-of select="$bwStr-AtRy-Has"/>
864                 <xsl:choose>
865                   <xsl:when test="attendees/attendee/partstat = 'TENTATIVE'">
866                     <xsl:copy-of select="$bwStr-AtRy-TentativelyAccepted"/>
867                   </xsl:when>
868                   <xsl:otherwise>
869                     <xsl:apply-templates select="attendees/attendee/partstat"/>
870                   </xsl:otherwise>
871                 </xsl:choose>
872                 <xsl:copy-of select="$bwStr-AtRy-YourInvitation"/>
873               </td>
874             </tr>
875           </xsl:otherwise>
876         </xsl:choose>
877         <tr>
878           <td class="fieldname">
879             <xsl:copy-of select="$bwStr-AtRy-Calendar"/>
880           </td>
881           <td class="fieldval scheduleActions">
882             <xsl:choose>
883               <xsl:when test="not(/bedework/guidcals/calendar)">
884               <!-- the event has been deleted by the organizer -->
885                 <xsl:copy-of select="$bwStr-AtRy-EventNoLongerExists"/>
886               </xsl:when>
887               <xsl:otherwise>
888                 <!-- the event exists.  Let the user choose which copies
889                      of the event to update.  For now, we'll just list them
890                      and add calPath request parameters -->
891                 <ul>
892                   <xsl:for-each select="/bedework/guidcals/calendar">
893                     <li class="calendar">
894                       <xsl:value-of select="name"/>
895                       <input type="hidden" name="calPath">
896                         <xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute>
897                       </input>
898                     </li>
899                   </xsl:for-each>
900                 </ul>
901               </xsl:otherwise>
902             </xsl:choose>
903           </td>
904         </tr>
905         <tr>
906           <td class="fieldname">
907             <xsl:copy-of select="$bwStr-AtRy-From"/>
908           </td>
909           <td class="fieldval scheduleActions">
910             <strong>
911               <a>
912                 <xsl:attribute name="href"><xsl:value-of select="attendees/attendee/attendeeUri"/></xsl:attribute>
913                 <xsl:choose>
914                   <xsl:when test="cn != ''">
915                     <xsl:value-of select="cn"/>
916                   </xsl:when>
917                   <xsl:otherwise>
918                     <xsl:value-of select="substring-after(attendees/attendee/attendeeUri,'mailto:')"/>
919                   </xsl:otherwise>
920                 </xsl:choose>
921               </a>
922             </strong>
923           </td>
924         </tr>
925         <tr>
926           <td class="fieldname">
927             <xsl:copy-of select="$bwStr-AtRy-Status"/>
928           </td>
929           <td class="fieldval scheduleActions">
930             <xsl:apply-templates select="attendees/attendee/partstat"/>
931             <xsl:if test="comments/value">
932               <p><strong><xsl:copy-of select="$bwStr-AtRy-Comments"/></strong></p>
933               <div id="comments">
934                 <xsl:for-each select="comments/value">
935                   <p><xsl:value-of select="."/></p>
936                 </xsl:for-each>
937               </div>
938             </xsl:if>
939           </td>
940         </tr>
941         <tr>
942           <td class="fieldname">
943             <xsl:copy-of select="$bwStr-AtRy-Action"/>
944           </td>
945           <td class="fieldval scheduleActions">
946             <xsl:choose>
947               <xsl:when test="scheduleMethod='7'"><!-- counter -->
948                 <input type="submit" value="accept / modify" name="{$bwStr-AtRy-Accept}"/>
949                 <input type="submit" value="decline" name="{$bwStr-AtRy-Decline}"/>
950                 <input type="submit" value="cancel" name="{$bwStr-AtRy-Canceled}"/>
951               </xsl:when>
952               <xsl:otherwise><!-- normal reply -->
953                 <input type="submit" value="ok" name="{$bwStr-AtRy-Update}"/>
954                 <input type="submit" value="cancel" name="{$bwStr-AtRy-Canceled}"/>
955               </xsl:otherwise>
956             </xsl:choose>
957           </td>
958         </tr>
959         <tr>
960           <td class="fieldname"><xsl:copy-of select="$bwStr-AtRy-Title"/></td>
961           <td class="fieldval">
962             <strong>
963               <xsl:choose>
964                 <xsl:when test="summary = ''">
965                   <em><xsl:copy-of select="$bwStr-AtRy-NoTitle"/></em><xsl:text> </xsl:text>
966                 </xsl:when>
967                 <xsl:when test="link != ''">
968                   <xsl:variable name="link" select="link"/>
969                   <a href="{$link}">
970                     <xsl:value-of select="summary"/>
971                   </a>
972                 </xsl:when>
973                 <xsl:otherwise>
974                   <xsl:value-of select="summary"/>
975                 </xsl:otherwise>
976               </xsl:choose>
977             </strong>
978           </td>
979         </tr>
980         <tr>
981           <td class="fieldname"><xsl:copy-of select="$bwStr-AtRy-When"/></td>
982           <td class="fieldval">
983             <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text>
984             <xsl:if test="start/allday = 'false'">
985               <span class="time"><xsl:value-of select="start/time"/></span>
986             </xsl:if>
987             <xsl:if test="(end/longdate != start/longdate) or
988                           ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if>
989             <xsl:if test="end/longdate != start/longdate">
990               <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text>
991             </xsl:if>
992             <xsl:choose>
993               <xsl:when test="start/allday = 'true'">
994                 <span class="time"><em><xsl:copy-of select="$bwStr-AtRy-AllDay"/></em></span>
995               </xsl:when>
996               <xsl:when test="end/longdate != start/longdate">
997                 <span class="time"><xsl:value-of select="end/time"/></span>
998               </xsl:when>
999               <xsl:when test="end/time != start/time">
1000                 <span class="time"><xsl:value-of select="end/time"/></span>
1001               </xsl:when>
1002             </xsl:choose>
1003           </td>
1004           <!--<th class="icon" rowspan="2">
1005             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/>
1006             <a href="{$export}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars">
1007               <img src="{$resourcesRoot}/images/std-ical-icon.gif" width="20" height="26" border="0" align="left" alt="Download this event"/>
1008             </a>
1009           </th>-->
1010         </tr>
1011         <tr>
1012           <td class="fieldname"><xsl:copy-of select="$bwStr-AtRy-Where"/></td>
1013           <td class="fieldval">
1014             <xsl:choose>
1015               <xsl:when test="location/link=''">
1016                 <xsl:value-of select="location/address"/>
1017               </xsl:when>
1018               <xsl:otherwise>
1019                 <xsl:variable name="locationLink" select="location/link"/>
1020                 <a href="{$locationLink}">
1021                   <xsl:value-of select="location/address"/>
1022                 </a>
1023               </xsl:otherwise>
1024             </xsl:choose>
1025             <xsl:if test="location/subaddress!=''">
1026               <br/><xsl:value-of select="location/subaddress"/>
1027             </xsl:if>
1028           </td>
1029         </tr>
1030         <tr>
1031           <td class="fieldname"><xsl:copy-of select="$bwStr-AtRy-Description"/></td>
1032           <td class="fieldval">
1033             <xsl:call-template name="replace">
1034               <xsl:with-param name="string" select="description"/>
1035               <xsl:with-param name="pattern" select="'&#xA;'"/>
1036               <xsl:with-param name="replacement"><br/></xsl:with-param>
1037             </xsl:call-template>
1038           </td>
1039         </tr>
1040         <xsl:if test="status !='' and status != 'CONFIRMED'">
1041           <tr>
1042             <td class="fieldname"><xsl:copy-of select="$bwStr-AtRy-Status"/></td>
1043             <td class="fieldval">
1044               <xsl:value-of select="status"/>
1045             </td>
1046           </tr>
1047         </xsl:if>
1048         <tr>
1049           <td class="fieldname filler">&#160;</td>
1050           <td class="fieldval">&#160;</td>
1051         </tr>
1052       </table>
1053     </form>
1054   </xsl:template>
1055  
1056  
1057 </xsl:stylesheet>
Note: See TracBrowser for help on using the browser.