Changeset 1632

Show
Ignore:
Timestamp:
11/30/07 07:52:29
Author:
kllin
Message:

moving event related templates to event.xsl

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/xslt-rewrite/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1631 r1632  
    5050  <xsl:include href="../../../bedework-common/default/default/subscriptions.xsl"/> 
    5151  <xsl:include href="../../../bedework-common/default/default/search.xsl"/> 
    52  
    5352  <xsl:include href="../../../bedework-common/default/default/clock.xsl"/> 
    5453  <xsl:include href="../../../bedework-common/default/default/freebusy.xsl"/> 
     54  <xsl:include href="../../../bedework-common/default/default/event.xsl"/> 
    5555 
    5656 
     
    358358  </xsl:template> 
    359359 
    360   <!--==== SINGLE EVENT ====--> 
    361   <xsl:template match="event"> 
    362     <xsl:variable name="subscriptionId" select="subscription/id"/> 
    363     <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    364     <xsl:variable name="guid" select="guid"/> 
    365     <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    366     <xsl:variable name="statusClass"> 
    367       <xsl:choose> 
    368         <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> 
    369         <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> 
    370         <xsl:otherwise>bwStatusConfirmed</xsl:otherwise> 
    371       </xsl:choose> 
    372     </xsl:variable> 
    373     <h2 class="{$statusClass}"> 
    374       <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
    375       <xsl:choose> 
    376         <xsl:when test="link != ''"> 
    377           <xsl:variable name="link" select="link"/> 
    378           <a href="{$link}"> 
    379             <xsl:value-of select="summary"/> 
    380           </a> 
    381         </xsl:when> 
    382         <xsl:when test="summary = ''"> 
    383           Event <em>(no title)</em> 
    384         </xsl:when> 
    385         <xsl:otherwise> 
    386           <xsl:value-of select="summary"/> 
    387         </xsl:otherwise> 
    388       </xsl:choose> 
    389     </h2> 
    390     <table class="common" cellspacing="0"> 
    391       <tr> 
    392         <th colspan="2" class="commonHeader"> 
    393           <div id="eventActions"> 
    394             <!-- download --> 
    395             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    396             <a href="{$export}&amp;subid={$subscriptionId}&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"> 
    397               <img src="{$resourcesRoot}/resources/std-icalDownload-icon-small.gif" width="12" height="16" border="0" alt="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"/> 
    398               Download 
    399             </a> 
    400             <xsl:if test="currentAccess/current-user-privilege-set/privilege/write-content"> 
    401               | 
    402               <xsl:choose> 
    403                 <xsl:when test="recurring='true' or recurrenceId != ''"> 
    404                   <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit master"/> 
    405                   Edit: 
    406                   <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit master (recurring event)">master</a>,<a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="edit instance (recurring event)">instance</a> 
    407                 </xsl:when> 
    408                 <xsl:otherwise> 
    409                   <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit event"> 
    410                     <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit"/> 
    411                     Edit 
    412                   </a> 
    413                 </xsl:otherwise> 
    414               </xsl:choose> 
    415             </xsl:if> 
    416             | 
    417             <xsl:choose> 
    418               <xsl:when test="recurring='true' or recurrenceId != ''"> 
    419                 <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit master"/> 
    420                 Copy: 
    421                 <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;copy=true" title="copy master (recurring event)">master</a>,<a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;copy=true" title="copy instance (recurring event)">instance</a> 
    422               </xsl:when> 
    423               <xsl:otherwise> 
    424                 <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;copy=true" title="copy event"> 
    425                   <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit"/> 
    426                   Copy 
    427                 </a> 
    428               </xsl:otherwise> 
    429             </xsl:choose> 
    430             <xsl:if test="not(currentAccess/current-user-privilege-set/privilege/write-content) and not(recurring='true' or recurrenceId != '')"> 
    431               <!-- temporarily hide from Recurring events --> 
    432               | 
    433               <xsl:choose> 
    434                 <xsl:when test="recurring='true' or recurrenceId != ''"> 
    435                   <img src="{$resourcesRoot}/resources/std-ical_iconLinkDkGray.gif" width="12" height="16" border="0" alt="add event reference"/> 
    436                   Link: 
    437                   <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add master event reference to a calendar">master</a>,<a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="add event reference to a calendar">instance</a> 
    438                 </xsl:when> 
    439                 <xsl:otherwise> 
    440                   <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add event reference to a calendar"> 
    441                     <img src="{$resourcesRoot}/resources/std-ical_iconLinkDkGray.gif" width="12" height="16" border="0" alt="add event reference"/> 
    442                     Link 
    443                   </a> 
    444                 </xsl:otherwise> 
    445               </xsl:choose> 
    446             </xsl:if> 
    447             <xsl:if test="owner != /bedework/userid and public='true'"> 
    448             <!-- provide this link for public subscriptions; subscriptions to user calendars are 
    449                  currently too confusing since the current user may be able to add events to the 
    450                  other calendar, making the ownership test a bad test --> 
    451               | 
    452               <xsl:variable name="subname" select="subscription/name"/> 
    453               <a href="{$subscriptions-fetchForUpdate}&amp;subname={$subname}" title="manage/view subscription"> 
    454                 <img src="{$resourcesRoot}/resources/std-ical_iconSubsDkGray.gif" width="12" height="16" border="0" alt="manage/view subscription"/> 
    455                 Subscription 
    456               </a> 
    457             </xsl:if> 
    458             <xsl:if test="subscription/removeable != 'true'"> 
    459               | 
    460               <xsl:choose> 
    461                 <xsl:when test="recurring='true' or recurrenceId != ''"> 
    462                   <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    463                   Delete: 
    464                   <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="delete master (recurring event)">all</a>,<a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete instance (recurring event)">instance</a> 
    465                 </xsl:when> 
    466                 <xsl:otherwise> 
    467                   <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete event"> 
    468                     <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    469                     Delete 
    470                   </a> 
    471                 </xsl:otherwise> 
    472               </xsl:choose> 
    473             </xsl:if> 
    474           </div> 
    475           <!-- Display type of event --> 
    476           <xsl:variable name="entityType"> 
    477             <xsl:choose> 
    478               <xsl:when test="entityType = '2'">Task</xsl:when> 
    479               <xsl:when test="scheduleMethod = '2'">Meeting</xsl:when> 
    480               <xsl:otherwise>Event</xsl:otherwise> 
    481             </xsl:choose> 
    482           </xsl:variable> 
    483           <xsl:if test="recurring='true' or recurrenceId != ''"> 
    484             Recurring 
    485           </xsl:if> 
    486           <xsl:choose> 
    487             <xsl:when test="public = 'true'"> 
    488               Public <xsl:value-of select="$entityType"/> 
    489             </xsl:when> 
    490             <xsl:when test="owner = /bedework/userid"> 
    491               Personal <xsl:value-of select="$entityType"/> 
    492             </xsl:when> 
    493             <xsl:otherwise> 
    494               <xsl:value-of select="$entityType"/> (<xsl:value-of select="calendar/owner"/>) 
    495             </xsl:otherwise> 
    496           </xsl:choose> 
    497           <xsl:if test="recurring='true' and recurrenceId = ''"> 
    498             <xsl:text> </xsl:text> 
    499             <em>(recurrence master)</em> 
    500           </xsl:if> 
    501           <xsl:if test="scheduleMethod = '2'"> 
    502             <!-- this is a scheduled event (meeting or task) - allow a direct refresh --> 
    503             <a href="{$schedule-refresh}&amp;method=REFRESH" id="refreshEventAction"> 
    504               <img src="{$resourcesRoot}/resources/std-icalRefresh-icon-small.gif" width="12" height="16" border="0" alt="send a request to refresh this scheduled event"/> 
    505               Request refresh 
    506             </a> 
    507           </xsl:if> 
    508         </th> 
    509       </tr> 
    510       <tr> 
    511         <td class="fieldname">When:</td> 
    512         <td class="fieldval"> 
    513           <!-- always display local time --> 
    514           <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 
    515           <xsl:if test="start/allday = 'false'"> 
    516             <span class="time"><xsl:value-of select="start/time"/></span> 
    517           </xsl:if> 
    518           <xsl:if test="(end/longdate != start/longdate) or 
    519                         ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 
    520           <xsl:if test="end/longdate != start/longdate"> 
    521             <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 
    522           </xsl:if> 
    523           <xsl:choose> 
    524             <xsl:when test="start/allday = 'true'"> 
    525               <span class="time"><em>(all day)</em></span> 
    526             </xsl:when> 
    527             <xsl:when test="end/longdate != start/longdate"> 
    528               <span class="time"><xsl:value-of select="end/time"/></span> 
    529             </xsl:when> 
    530             <xsl:when test="end/time != start/time"> 
    531               <span class="time"><xsl:value-of select="end/time"/></span> 
    532             </xsl:when> 
    533           </xsl:choose> 
    534           <!-- if timezones are not local, or if floating add labels: --> 
    535           <xsl:if test="start/timezone/islocal = 'false' or end/timezone/islocal = 'false'"> 
    536             <xsl:text> </xsl:text> 
    537             -- 
    538             <strong> 
    539               <xsl:choose> 
    540                 <xsl:when test="start/floating = 'true'"> 
    541                   Floating time 
    542                 </xsl:when> 
    543                 <xsl:otherwise> 
    544                   Local time 
    545                 </xsl:otherwise> 
    546               </xsl:choose> 
    547             </strong> 
    548             <br/> 
    549           </xsl:if> 
    550           <!-- display in timezone if not local or floating time) --> 
    551           <xsl:if test="(start/timezone/islocal = 'false' or end/timezone/islocal = 'false') and start/floating = 'false'"> 
    552             <xsl:choose> 
    553               <xsl:when test="start/timezone/id != end/timezone/id"> 
    554                 <!-- need to display both timezones if they differ from start to end --> 
    555                 <table border="0" cellspacing="0" id="tztable"> 
    556                   <tr> 
    557                     <td> 
    558                       <strong>Start:</strong> 
    559                     </td> 
    560                     <td> 
    561                       <xsl:choose> 
    562                         <xsl:when test="start/timezone/islocal='true'"> 
    563                           <xsl:value-of select="start/dayname"/>, 
    564                           <xsl:value-of select="start/longdate"/> 
    565                           <xsl:text> </xsl:text> 
    566                           <span class="time"><xsl:value-of select="start/time"/></span> 
    567                         </xsl:when> 
    568                         <xsl:otherwise> 
    569                           <xsl:value-of select="start/timezone/dayname"/>, 
    570                           <xsl:value-of select="start/timezone/longdate"/> 
    571                           <xsl:text> </xsl:text> 
    572                           <span class="time"><xsl:value-of select="start/timezone/time"/></span> 
    573                         </xsl:otherwise> 
    574                       </xsl:choose> 
    575                     </td> 
    576                     <td> 
    577                       -- 
    578                       <strong><xsl:value-of select="start/timezone/id"/></strong> 
    579                     </td> 
    580                   </tr> 
    581                   <tr> 
    582                     <td> 
    583                       <strong>End:</strong> 
    584                     </td> 
    585                     <td> 
    586                       <xsl:choose> 
    587                         <xsl:when test="end/timezone/islocal='true'"> 
    588                           <xsl:value-of select="end/dayname"/>, 
    589                           <xsl:value-of select="end/longdate"/> 
    590                           <xsl:text> </xsl:text> 
    591                           <span class="time"><xsl:value-of select="end/time"/></span> 
    592                         </xsl:when> 
    593                         <xsl:otherwise> 
    594                           <xsl:value-of select="end/timezone/dayname"/>, 
    595                           <xsl:value-of select="end/timezone/longdate"/> 
    596                           <xsl:text> </xsl:text> 
    597                           <span class="time"><xsl:value-of select="end/timezone/time"/></span> 
    598                         </xsl:otherwise> 
    599                       </xsl:choose> 
    600                     </td> 
    601                     <td> 
    602                       -- 
    603                       <strong><xsl:value-of select="end/timezone/id"/></strong> 
    604                     </td> 
    605                   </tr> 
    606                 </table> 
    607               </xsl:when> 
    608               <xsl:otherwise> 
    609                 <!-- otherwise, timezones are the same: display as a single line  --> 
    610                 <xsl:value-of select="start/timezone/dayname"/>, <xsl:value-of select="start/timezone/longdate"/><xsl:text> </xsl:text> 
    611                 <xsl:if test="start/allday = 'false'"> 
    612                   <span class="time"><xsl:value-of select="start/timezone/time"/></span> 
    613                 </xsl:if> 
    614                 <xsl:if test="(end/timezone/longdate != start/timezone/longdate) or 
    615                               ((end/timezone/longdate = start/timezone/longdate) and (end/timezone/time != start/timezone/time))"> - </xsl:if> 
    616                 <xsl:if test="end/timezone/longdate != start/timezone/longdate"> 
    617                   <xsl:value-of select="substring(end/timezone/dayname,1,3)"/>, <xsl:value-of select="end/timezone/longdate"/><xsl:text> </xsl:text> 
    618                 </xsl:if> 
    619                 <xsl:choose> 
    620                   <xsl:when test="start/allday = 'true'"> 
    621                     <span class="time"><em>(all day)</em></span> 
    622                   </xsl:when> 
    623                   <xsl:when test="end/timezone/longdate != start/timezone/longdate"> 
    624                     <span class="time"><xsl:value-of select="end/timezone/time"/></span> 
    625                   </xsl:when> 
    626                   <xsl:when test="end/timezone/time != start/timezone/time"> 
    627                     <span class="time"><xsl:value-of select="end/timezone/time"/></span> 
    628                   </xsl:when> 
    629                 </xsl:choose> 
    630                 <xsl:text> </xsl:text> 
    631                 -- 
    632                 <strong><xsl:value-of select="start/timezone/id"/></strong> 
    633               </xsl:otherwise> 
    634             </xsl:choose> 
    635           </xsl:if> 
    636         </td> 
    637         <!--<th class="icon" rowspan="2"> 
    638           <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    639           <a href="{$export}&amp;subid={$subscriptionId}&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"> 
    640             <img src="{$resourcesRoot}/resources/std-ical-icon.gif" width="20" height="26" border="0" align="left" alt="Download this event"/> 
    641           </a> 
    642         </th>--> 
    643       </tr> 
    644       <xsl:if test="location/address != ''"> 
    645         <tr> 
    646           <td class="fieldname">Where:</td> 
    647           <td class="fieldval"> 
    648             <xsl:choose> 
    649               <xsl:when test="location/link=''"> 
    650                 <xsl:value-of select="location/address"/> 
    651               </xsl:when> 
    652               <xsl:otherwise> 
    653                 <xsl:variable name="locationLink" select="location/link"/> 
    654                 <a href="{$locationLink}"> 
    655                   <xsl:value-of select="location/address"/> 
    656                 </a> 
    657               </xsl:otherwise> 
    658             </xsl:choose> 
    659             <xsl:if test="location/subaddress!=''"> 
    660               <br/><xsl:value-of select="location/subaddress"/> 
    661             </xsl:if> 
    662           </td> 
    663         </tr> 
    664       </xsl:if> 
    665       <!--  Percent Complete (only for Tasks)  --> 
    666       <xsl:if test="percentComplete != ''"> 
    667         <tr> 
    668           <td class="fieldname"> 
    669             % Complete: 
    670           </td> 
    671           <td class="fieldval"> 
    672             <xsl:value-of select="percentComplete"/>% 
    673           </td> 
    674         </tr> 
    675       </xsl:if> 
    676       <tr> 
    677         <td class="fieldname">Description:</td> 
    678         <td class="fieldval"> 
    679           <xsl:call-template name="replace"> 
    680             <xsl:with-param name="string" select="description"/> 
    681             <xsl:with-param name="pattern" select="'&#xA;'"/> 
    682             <xsl:with-param name="replacement"><br/></xsl:with-param> 
    683           </xsl:call-template> 
    684         </td> 
    685       </tr> 
    686       <xsl:if test="status !='' and status != 'CONFIRMED'"> 
    687         <tr> 
    688           <td class="fieldname">Status:</td> 
    689           <td class="fieldval"> 
    690             <xsl:value-of select="status"/> 
    691           </td> 
    692         </tr> 
    693       </xsl:if> 
    694       <xsl:if test="organizer"> 
    695         <tr> 
    696           <td class="fieldname">Organizer:</td> 
    697           <xsl:variable name="organizerUri" select="organizer/organizerUri"/> 
    698           <td class="fieldval"> 
    699             <xsl:choose> 
    700               <xsl:when test="organizer/cn != ''"> 
    701                 <xsl:value-of select="organizer/cn"/> 
    702               </xsl:when> 
    703               <xsl:otherwise> 
    704                 <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> 
    705               </xsl:otherwise> 
    706             </xsl:choose> 
    707             <xsl:if test="organizer/organizerUri != ''"> 
    708               <a href="{$organizerUri}" class="emailIcon" title="email"> 
    709                 <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    710               </a> 
    711             </xsl:if> 
    712           </td> 
    713         </tr> 
    714       </xsl:if> 
    715       <xsl:if test="attendees/attendee"> 
    716         <tr> 
    717           <td class="fieldname">Attendees:</td> 
    718           <td class="fieldval"> 
    719             <table id="attendees" cellspacing="0"> 
    720               <tr> 
    721                 <th>attendee</th> 
    722                 <th>role</th> 
    723                 <th>status</th> 
    724               </tr> 
    725               <xsl:for-each select="attendees/attendee"> 
    726                 <xsl:sort select="cn" order="ascending" case-order="upper-first"/> 
    727                 <xsl:sort select="attendeeUri" order="ascending" case-order="upper-first"/> 
    728                 <tr> 
    729                   <td> 
    730                     <xsl:variable name="attendeeUri" select="attendeeUri"/> 
    731                     <a href="{$attendeeUri}" class="emailIcon" title="email"> 
    732                       <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    733                     </a> 
    734                     <xsl:choose> 
    735                       <xsl:when test="cn != ''"> 
    736                         <xsl:value-of select="cn"/> 
    737                       </xsl:when> 
    738                       <xsl:otherwise> 
    739                         <xsl:value-of select="substring-after(attendeeUri,'mailto:')"/> 
    740                       </xsl:otherwise> 
    741                     </xsl:choose> 
    742                   </td> 
    743                   <td class="role"> 
    744                     <xsl:value-of select="role"/> 
    745                   </td> 
    746                   <td class="status"> 
    747                     <xsl:value-of select="partstat"/> 
    748                   </td> 
    749                 </tr> 
    750               </xsl:for-each> 
    751             </table> 
    752             <p> 
    753               <em> 
    754                 <a href="{$schedule-initAttendeeUpdate}&amp;initUpdate=yes"> 
    755                   change my status 
    756                 </a> 
    757               </em> 
    758             </p> 
    759           </td> 
    760         </tr> 
    761       </xsl:if> 
    762       <xsl:if test="recipient"> 
    763         <tr> 
    764           <td class="fieldname">Recipients:</td> 
    765           <td class="fieldval"> 
    766             <table id="attendees" cellspacing="0"> 
    767               <tr> 
    768                 <th>recipient</th> 
    769               </tr> 
    770               <xsl:for-each select="recipient"> 
    771                 <tr> 
    772                   <td> 
    773                     <xsl:choose> 
    774                       <xsl:when test="contains(.,'mailto:')"> 
    775                         <xsl:value-of select="substring-after(.,'mailto:')"/> 
    776                       </xsl:when> 
    777                       <xsl:otherwise> 
    778                         <xsl:value-of select="."/> 
    779                       </xsl:otherwise> 
    780                     </xsl:choose> 
    781                     <xsl:variable name="recipientUri" select="."/> 
    782                     <a href="{$recipientUri}" class="emailIcon" title="email"> 
    783                       <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    784                     </a> 
    785                   </td> 
    786                 </tr> 
    787               </xsl:for-each> 
    788             </table> 
    789           </td> 
    790         </tr> 
    791       </xsl:if> 
    792       <xsl:if test="cost!=''"> 
    793         <tr> 
    794           <td class="fieldname">Cost:</td> 
    795           <td class="fieldval"><xsl:value-of select="cost"/></td> 
    796         </tr> 
    797       </xsl:if> 
    798       <xsl:if test="link != ''"> 
    799         <tr> 
    800           <td class="fieldname">See:</td> 
    801           <td class="fieldval"> 
    802             <xsl:variable name="link" select="link"/> 
    803             <a href="{$link}"><xsl:value-of select="link"/></a> 
    804           </td> 
    805         </tr> 
    806       </xsl:if> 
    807       <xsl:if test="contact/name!='none'"> 
    808         <tr> 
    809           <td class="fieldname">Contact:</td> 
    810           <td class="fieldval"> 
    811             <xsl:choose> 
    812               <xsl:when test="contact/link=''"> 
    813                 <xsl:value-of select="contact/name"/> 
    814               </xsl:when> 
    815               <xsl:otherwise> 
    816                 <xsl:variable name="sponsorLink" select="contact/link"/> 
    817                 <a href="{$sponsorLink}"> 
    818                   <xsl:value-of select="contact/name"/> 
    819                 </a> 
    820               </xsl:otherwise> 
    821             </xsl:choose> 
    822             <xsl:if test="contact/phone!=''"> 
    823               <br /><xsl:value-of select="contact/phone"/> 
    824             </xsl:if> 
    825             <xsl:if test="contact/email!=''"> 
    826               <br /> 
    827               <xsl:variable name="email" select="contact/email"/> 
    828               <xsl:variable name="subject" select="summary"/> 
    829               <a href="mailto:{$email}&amp;subject={$subject}"> 
    830                 <xsl:value-of select="contact/email"/> 
    831               </a> 
    832             </xsl:if> 
    833           </td> 
    834         </tr> 
    835       </xsl:if> 
    836       <xsl:if test="calendar/path!=''"> 
    837         <tr> 
    838           <td class="fieldname">Calendar:</td> 
    839           <td class="fieldval"> 
    840             <xsl:variable name="calUrl" select="calendar/encodedPath"/> 
    841             <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
    842             <a href="{$setSelection}&amp;calUrl={$calUrl}"> 
    843               <xsl:choose> 
    844                 <xsl:when test="contains(calendar/path,$userPath)"> 
    845                   <xsl:value-of select="substring-after(calendar/path,$userPath)"/> 
    846                 </xsl:when> 
    847                 <xsl:otherwise> 
    848                   <xsl:value-of select="calendar/path"/> 
    849                 </xsl:otherwise> 
    850               </xsl:choose> 
    851             </a> 
    852           </td> 
    853         </tr> 
    854       </xsl:if> 
    855       <xsl:if test="categories/category"> 
    856         <tr> 
    857           <td class="fieldname">Categories:</td> 
    858           <td class="fieldval"> 
    859             <xsl:for-each select="categories/category"> 
    860               <xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if> 
    861             </xsl:for-each> 
    862           </td> 
    863         </tr> 
    864       </xsl:if> 
    865       <xsl:if test="comments/comment"> 
    866         <tr> 
    867           <td class="fieldname">Comments:</td> 
    868           <td class="fieldval comments"> 
    869             <xsl:for-each select="comments/comment"> 
    870               <p><xsl:value-of select="value"/></p> 
    871             </xsl:for-each> 
    872           </td> 
    873         </tr> 
    874       </xsl:if> 
    875       <tr> 
    876         <td class="fieldname filler">&#160;</td> 
    877         <td class="fieldval">&#160;</td> 
    878       </tr> 
    879     </table> 
    880   </xsl:template> 
    881  
    882360  <xsl:template name="buildNumberOptions"> 
    883361    <xsl:param name="current"/> 
     
    937415      </xsl:for-each> 
    938416    </table> 
    939   </xsl:template> 
    940  
    941   <xsl:template match="event" mode="addEventRef"> 
    942   <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    943     change it without modifying bedework.js --> 
    944     <form name="eventForm" method="post" action="{$event-addEventRefComplete}" id="standardForm"  enctype="multipart/form-data"> 
    945       <xsl:variable name="subscriptionId" select="subscription/id"/> 
    946       <xsl:variable name="calPath" select="calendar/path"/> 
    947       <xsl:variable name="guid" select="guid"/> 
    948       <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    949       <input type="hidden" name="subid" value="{$subscriptionId}"/> 
    950       <input type="hidden" name="calPath" value="{$calPath}"/> 
    951       <input type="hidden" name="guid" value="{$guid}"/> 
    952       <input type="hidden" name="recurrenceId" value="{$recurrenceId}"/> 
    953       <!-- newCalPath is the path to the calendar in which the reference 
    954            should be placed.  If no value, then default calendar. --> 
    955       <input type="hidden" name="newCalPath" value="" id="bwNewCalPathField"/> 
    956  
    957       <h2>Add Event Reference</h2> 
    958       <table class="common" cellspacing="0"> 
    959         <tr> 
    960           <td class="fieldname"> 
    961             Event: 
    962           </td> 
    963           <td> 
    964             <xsl:choose> 
    965               <xsl:when test="summary = ''"> 
    966                 <em>no title</em> 
    967               </xsl:when> 
    968               <xsl:otherwise> 
    969                 <xsl:value-of select="summary"/> 
    970               </xsl:otherwise> 
    971             </xsl:choose> 
    972           </td> 
    973         </tr> 
    974         <tr> 
    975           <td class="fieldname"> 
    976             Into calendar: 
    977           </td> 
    978           <td align="left"> 
    979             <span id="bwEventCalDisplay"> 
    980               <em>default calendar</em> 
    981             </span> 
    982             <xsl:call-template name="selectCalForEvent"/> 
    983           </td> 
    984         </tr> 
    985         <tr> 
    986           <td class="fieldname"> 
    987             Affects Free/busy: 
    988           </td> 
    989           <td align="left"> 
    990             <input type="radio" value="OPAQUE" name="transparency"/> yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    991             <input type="radio" value="TRANSPARENT" name="transparency" checked="checked"/> no <span class="note">(transparent: event status does not affect your free/busy)</span> 
    992           </td> 
    993         </tr> 
    994       </table> 
    995       <table border="0" id="submitTable"> 
    996         <tr> 
    997           <td> 
    998             <input name="submit" type="submit" value="Continue"/> 
    999             <input name="cancelled" type="submit" value="cancel"/> 
    1000           </td> 
    1001         </tr> 
    1002       </table> 
    1003     </form> 
    1004417  </xsl:template> 
    1005418 
     
    1538951            <xsl:value-of select="form/status"/> 
    1539952          </td> 
    1540         </tr> 
    1541       </table> 
    1542     </form> 
    1543   </xsl:template> 
    1544  
    1545   <xsl:template match="event" mode="attendeeReply"> 
    1546     <xsl:variable name="subscriptionId" select="subscription/id"/> 
    1547     <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    1548     <xsl:variable name="guid" select="guid"/> 
    1549     <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    1550     <xsl:variable name="statusClass"> 
    1551       <xsl:choose> 
    1552         <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> 
    1553         <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> 
    1554         <xsl:otherwise>bwStatusConfirmed</xsl:otherwise> 
    1555       </xsl:choose> 
    1556     </xsl:variable> 
    1557     <h2> 
    1558       <xsl:choose> 
    1559         <xsl:when test="scheduleMethod='7'"> 
    1560           Meeting Change Request (Counter) 
    1561         </xsl:when> 
    1562         <xsl:otherwise> 
    1563           Meeting Reply 
    1564         </xsl:otherwise> 
    1565       </xsl:choose> 
    1566     </h2> 
    1567     <form name="processReply" method="post" action="{$schedule-processAttendeeReply}"> 
    1568       <table class="common" cellspacing="0"> 
    1569         <tr> 
    1570           <th colspan="2" class="commonHeader"> 
    1571             <div id="eventActions"> 
    1572             </div> 
    1573             Organizer: 
    1574             <xsl:choose> 
    1575               <xsl:when test="organizer/cn != ''"> 
    1576                 <xsl:value-of select="organizer/cn"/> 
    1577               </xsl:when> 
    1578               <xsl:otherwise> 
    1579                 <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> 
    1580               </xsl:otherwise> 
    1581             </xsl:choose> 
    1582           </th> 
    1583         </tr> 
    1584         <tr> 
    1585           <td class="fieldname"> 
    1586             Calendar: 
    1587           </td> 
    1588           <td class="fieldval scheduleActions"> 
    1589             <xsl:choose> 
    1590               <xsl:when test="not(/bedework/guidcals/calendar)"> 
    1591               <!-- the event has been deleted by the organizer --> 
    1592                 Event no longer exists. 
    1593               </xsl:when> 
    1594               <xsl:otherwise> 
    1595                 <!-- the event exists.  Let the user choose which copies 
    1596                      of the event to update.  For now, we'll just list them 
    1597                      and add calPath request parameters --> 
    1598                 <ul> 
    1599                   <xsl:for-each select="/bedework/guidcals/calendar"> 
    1600                     <li class="calendar"> 
    1601                       <xsl:value-of select="name"/> 
    1602                       <input type="hidden" name="calPath"> 
    1603                         <xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute> 
    1604                       </input> 
    1605                     </li> 
    1606                   </xsl:for-each> 
    1607                 </ul> 
    1608               </xsl:otherwise> 
    1609             </xsl:choose> 
    1610           </td> 
    1611         </tr> 
    1612         <tr> 
    1613           <td class="fieldname"> 
    1614             From: 
    1615           </td> 
    1616           <td class="fieldval scheduleActions"> 
    1617             <strong> 
    1618               <a> 
    1619                 <xsl:attribute name="href"><xsl:value-of select="attendees/attendee/attendeeUri"/></xsl:attribute> 
    1620                 <xsl:choose> 
    1621                   <xsl:when test="cn != ''"> 
    1622                     <xsl:value-of select="cn"/> 
    1623                   </xsl:when> 
    1624                   <xsl:otherwise> 
    1625                     <xsl:value-of select="substring-after(attendees/attendee/attendeeUri,'mailto:')"/> 
    1626                   </xsl:otherwise> 
    1627                 </xsl:choose> 
    1628               </a> 
    1629             </strong> 
    1630           </td> 
    1631         </tr> 
    1632         <tr> 
    1633           <td class="fieldname"> 
    1634             Status: 
    1635           </td> 
    1636           <td class="fieldval scheduleActions"> 
    1637             <xsl:value-of select="attendees/attendee/partstat"/> 
    1638             <xsl:if test="comments/value"> 
    1639               <p><strong>Comments:</strong></p> 
    1640               <div id="comments"> 
    1641                 <xsl:for-each select="comments/value"> 
    1642                   <p><xsl:value-of select="."/></p> 
    1643                 </xsl:for-each> 
    1644               </div> 
    1645             </xsl:if> 
    1646           </td> 
    1647         </tr> 
    1648         <tr> 
    1649           <td class="fieldname"> 
    1650             Action: 
    1651           </td> 
    1652           <td class="fieldval scheduleActions"> 
    1653             <xsl:choose> 
    1654               <xsl:when test="scheduleMethod='7'"><!-- counter --> 
    1655                 <input type="submit" value="accept / modify" name="accept"/> 
    1656                 <input type="submit" value="decline" name="decline"/> 
    1657                 <input type="submit" value="cancel" name="cancelled"/> 
    1658               </xsl:when> 
    1659               <xsl:otherwise><!-- normal reply --> 
    1660                 <input type="submit" value="ok" name="update"/> 
    1661                 <input type="submit" value="cancel" name="cancelled"/> 
    1662               </xsl:otherwise> 
    1663             </xsl:choose> 
    1664           </td> 
    1665         </tr> 
    1666         <tr> 
    1667           <td class="fieldname">Title:</td> 
    1668           <td class="fieldval"> 
    1669             <strong> 
    1670               <xsl:choose> 
    1671                 <xsl:when test="summary = ''"> 
    1672                   <em>no title</em> 
    1673                 </xsl:when> 
    1674                 <xsl:when test="link != ''"> 
    1675                   <xsl:variable name="link" select="link"/> 
    1676                   <a href="{$link}"> 
    1677                     <xsl:value-of select="summary"/> 
    1678                   </a> 
    1679                 </xsl:when> 
    1680                 <xsl:otherwise> 
    1681                   <xsl:value-of select="summary"/> 
    1682                 </xsl:otherwise> 
    1683               </xsl:choose> 
    1684             </strong> 
    1685           </td> 
    1686         </tr> 
    1687         <tr> 
    1688           <td class="fieldname">When:</td> 
    1689           <td class="fieldval"> 
    1690             <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 
    1691             <xsl:if test="start/allday = 'false'"> 
    1692               <span class="time"><xsl:value-of select="start/time"/></span> 
    1693             </xsl:if> 
    1694             <xsl:if test="(end/longdate != start/longdate) or 
    1695                           ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 
    1696             <xsl:if test="end/longdate != start/longdate"> 
    1697               <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 
    1698             </xsl:if> 
    1699             <xsl:choose> 
    1700               <xsl:when test="start/allday = 'true'"> 
    1701                 <span class="time"><em>(all day)</em></span> 
    1702               </xsl:when> 
    1703               <xsl:when test="end/longdate != start/longdate"> 
    1704                 <span class="time"><xsl:value-of select="end/time"/></span> 
    1705               </xsl:when> 
    1706               <xsl:when test="end/time != start/time"> 
    1707                 <span class="time"><xsl:value-of select="end/time"/></span> 
    1708               </xsl:when> 
    1709             </xsl:choose> 
    1710           </td> 
    1711           <!--<th class="icon" rowspan="2"> 
    1712             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    1713             <a href="{$export}&amp;subid={$subscriptionId}&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"> 
    1714               <img src="{$resourcesRoot}/resources/std-ical-icon.gif" width="20" height="26" border="0" align="left" alt="Download this event"/> 
    1715             </a> 
    1716           </th>--> 
    1717         </tr> 
    1718         <tr> 
    1719           <td class="fieldname">Where:</td> 
    1720           <td class="fieldval"> 
    1721             <xsl:choose> 
    1722               <xsl:when test="location/link=''"> 
    1723                 <xsl:value-of select="location/address"/> 
    1724               </xsl:when> 
    1725               <xsl:otherwise> 
    1726                 <xsl:variable name="locationLink" select="location/link"/> 
    1727                 <a href="{$locationLink}"> 
    1728&nb