Changeset 655

Show
Ignore:
Timestamp:
06/23/06 23:34:05
Author:
johnsa
Message:

correcting html error in web client stylesheets

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/calendar3/deployment/webpublic/uportal2/resources/demoskins/MainCampus/default/default/default.xsl

    r625 r655  
    181181  <xsl:template name="headBar"> 
    182182    <table id="curDateRangeTable"  cellspacing="0"> 
    183       <td class="sideBarOpenCloseIcon"> 
    184         &#160; 
    185         <!-- 
    186         we may choose to implement calendar selection in the public calendar 
    187         using a sidebar; leave this comment here for now. 
    188         <xsl:choose> 
    189           <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
    190             <a href="?setappvar=sidebar(opened)"> 
    191               <img alt="open sidebar" src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/> 
    192             </a> 
    193           </xsl:when> 
    194           <xsl:otherwise> 
    195             <a href="?setappvar=sidebar(closed)"> 
    196               <img alt="close sidebar" src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/> 
    197             </a> 
    198           </xsl:otherwise> 
    199         </xsl:choose>--> 
    200       </td> 
    201       <td class="date"> 
    202         <xsl:choose> 
    203           <xsl:when test="/bedework/page='event'"> 
    204             Event Information 
    205           </xsl:when> 
    206           <xsl:when test="/bedework/page='showSysStats' or 
    207                           /bedework/page='calendars'"> 
    208             &#160; 
    209           </xsl:when> 
    210           <xsl:otherwise> 
    211             <xsl:value-of select="/bedework/firstday/longdate"/> 
    212             <xsl:if test="/bedework/periodname!='Day'"> 
    213               - 
    214               <xsl:value-of select="/bedework/lastday/longdate"/> 
    215             </xsl:if> 
    216           </xsl:otherwise> 
    217         </xsl:choose> 
    218       </td> 
    219       <td class="rssPrint"> 
    220         <a href="javascript:window.print()" title="print this view"> 
    221           <img alt="print this view" src="{$resourcesRoot}/images/std-print-icon.gif" width="20" height="14" border="0"/> print 
    222         </a> 
    223         <a class="rss" href="{$setSelection}&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a> 
    224       </td> 
     183      <tr> 
     184        <td class="sideBarOpenCloseIcon"> 
     185          &#160; 
     186          <!-- 
     187          we may choose to implement calendar selection in the public calendar 
     188          using a sidebar; leave this comment here for now. 
     189          <xsl:choose> 
     190            <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
     191              <a href="?setappvar=sidebar(opened)"> 
     192                <img alt="open sidebar" src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/> 
     193              </a> 
     194            </xsl:when> 
     195            <xsl:otherwise> 
     196              <a href="?setappvar=sidebar(closed)"> 
     197                <img alt="close sidebar" src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/> 
     198              </a> 
     199            </xsl:otherwise> 
     200          </xsl:choose>--> 
     201        </td> 
     202        <td class="date"> 
     203          <xsl:choose> 
     204            <xsl:when test="/bedework/page='event'"> 
     205              Event Information 
     206            </xsl:when> 
     207            <xsl:when test="/bedework/page='showSysStats' or 
     208                            /bedework/page='calendars'"> 
     209              &#160; 
     210            </xsl:when> 
     211            <xsl:otherwise> 
     212              <xsl:value-of select="/bedework/firstday/longdate"/> 
     213              <xsl:if test="/bedework/periodname!='Day'"> 
     214                - 
     215                <xsl:value-of select="/bedework/lastday/longdate"/> 
     216              </xsl:if> 
     217            </xsl:otherwise> 
     218          </xsl:choose> 
     219        </td> 
     220        <td class="rssPrint"> 
     221          <a href="javascript:window.print()" title="print this view"> 
     222            <img alt="print this view" src="{$resourcesRoot}/images/std-print-icon.gif" width="20" height="14" border="0"/> print 
     223          </a> 
     224          <a class="rss" href="{$setSelection}&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a> 
     225        </td> 
     226      </tr> 
    225227    </table> 
    226228  </xsl:template> 
  • trunk/calendar3/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl

    r629 r655  
    197197    </table> 
    198198    <table id="curDateRangeTable"  cellspacing="0"> 
    199       <td class="sideBarOpenCloseIcon"> 
    200         &#160; 
    201         <!-- 
    202         we may choose to implement calendar selection in the public calendar 
    203         using a sidebar; leave this comment here for now. 
    204         <xsl:choose> 
    205           <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
    206             <a href="?setappvar=sidebar(opened)"> 
    207               <img alt="open sidebar" src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/> 
    208             </a> 
    209           </xsl:when> 
    210           <xsl:otherwise> 
    211             <a href="?setappvar=sidebar(closed)"> 
    212               <img alt="close sidebar" src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/> 
    213             </a> 
    214           </xsl:otherwise> 
    215         </xsl:choose>--> 
    216       </td> 
    217       <td class="date"> 
    218         <xsl:choose> 
    219           <xsl:when test="/bedework/page='event'"> 
    220             Event Information 
    221           </xsl:when> 
    222           <xsl:when test="/bedework/page='showSysStats' or 
    223                           /bedework/page='calendars'"> 
    224             &#160; 
    225           </xsl:when> 
    226           <xsl:otherwise> 
    227             <xsl:value-of select="/bedework/firstday/longdate"/> 
    228             <xsl:if test="/bedework/periodname!='Day'"> 
    229               - 
    230               <xsl:value-of select="/bedework/lastday/longdate"/> 
    231             </xsl:if> 
    232           </xsl:otherwise> 
    233         </xsl:choose> 
    234       </td> 
    235       <td class="rssPrint"> 
    236         <a href="javascript:window.print()" title="print this view"> 
    237           <img alt="print this view" src="{$resourcesRoot}/images/std-print-icon.gif" width="20" height="14" border="0"/> print 
    238         </a> 
    239         <a class="rss" href="{$setSelection}&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a> 
    240       </td> 
     199      <tr> 
     200        <td class="sideBarOpenCloseIcon"> 
     201          &#160; 
     202          <!-- 
     203          we may choose to implement calendar selection in the public calendar 
     204          using a sidebar; leave this comment here for now. 
     205          <xsl:choose> 
     206            <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
     207              <a href="?setappvar=sidebar(opened)"> 
     208                <img alt="open sidebar" src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/> 
     209              </a> 
     210            </xsl:when> 
     211            <xsl:otherwise> 
     212              <a href="?setappvar=sidebar(closed)"> 
     213                <img alt="close sidebar" src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/> 
     214              </a> 
     215            </xsl:otherwise> 
     216          </xsl:choose>--> 
     217        </td> 
     218        <td class="date"> 
     219          <xsl:choose> 
     220            <xsl:when test="/bedework/page='event'"> 
     221              Event Information 
     222            </xsl:when> 
     223            <xsl:when test="/bedework/page='showSysStats' or 
     224                            /bedework/page='calendars'"> 
     225              &#160; 
     226            </xsl:when> 
     227            <xsl:otherwise> 
     228              <xsl:value-of select="/bedework/firstday/longdate"/> 
     229              <xsl:if test="/bedework/periodname!='Day'"> 
     230                - 
     231                <xsl:value-of select="/bedework/lastday/longdate"/> 
     232              </xsl:if> 
     233            </xsl:otherwise> 
     234          </xsl:choose> 
     235        </td> 
     236        <td class="rssPrint"> 
     237          <a href="javascript:window.print()" title="print this view"> 
     238            <img alt="print this view" src="{$resourcesRoot}/images/std-print-icon.gif" width="20" height="14" border="0"/> print 
     239          </a> 
     240          <a class="rss" href="{$setSelection}&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a> 
     241        </td> 
     242      </tr> 
    241243    </table> 
    242244  </xsl:template> 
  • trunk/calendar3/deployment/webuser/uportal2/resources/demoskins/default/default/default.xsl

    r634 r655  
    22<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    33<xsl:output 
    4        method="html" 
    5        indent="yes" 
    6        media-type="text/html" 
    7        doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 
    8        doctype-system="http://www.w3.org/TR/html4/loose.dtd" 
    9        standalone="yes" 
     4  method="html" 
     5  indent="yes" 
     6  media-type="text/html" 
     7  doctype-public="-//W3C//DTD HTML 4.01 Transitional//EN" 
     8  doctype-system="http://www.w3.org/TR/html4/loose.dtd" 
     9  standalone="yes" 
    1010/> 
    11        <!-- ========================================= --> 
    12        <!--       PERSONAL CALENDAR STYLESHEET        --> 
    13        <!-- ========================================= --> 
    14  
    15        <!-- ********************************************************************** 
    16                Copyright 2006 Rensselaer Polytechnic Institute. All worldwide rights reserved. 
    17  
    18                Redistribution and use of this distribution in source and binary forms, 
    19                with or without modification, are permitted provided that: 
    20                         The above copyright notice and this permission notice appear in all 
    21                                copies and supporting documentation; 
    22  
    23                                The name, identifiers, and trademarks of Rensselaer Polytechnic 
    24                                Institute are not used in advertising or publicity without the 
    25                                express prior written permission of Rensselaer Polytechnic Institute; 
    26  
    27                DISCLAIMER: The software is distributed" AS IS" without any express or 
    28                implied warranty, including but not limited to, any implied warranties 
    29                of merchantability or fitness for a particular purpose or any warrant)' 
    30                of non-infringement of any current or pending patent rights. The authors 
    31                of the software make no representations about the suitability of this 
    32                software for any particular purpose. The entire risk as to the quality 
    33                and performance of the software is with the user. Should the software 
    34                prove defective, the user assumes the cost of all necessary servicing, 
    35                repair or correction. In particular, neither Rensselaer Polytechnic 
    36                Institute, nor the authors of the software are liable for any indirect, 
    37                special, consequential, or incidental damages related to the software, 
    38                to the maximum extent the law permits. --> 
    39  
    40        <!-- DEFINE INCLUDES --> 
    41        <xsl:include href="errors.xsl"/> 
    42        <xsl:include href="messages.xsl"/> 
    43  
    44        <!-- DEFINE GLOBAL CONSTANTS --> 
    45        <!-- URL of html resources (images, css, other html); by default this is 
    46                         set to the application root, but for the personal calendar 
    47                         this should be changed to point to a 
    48                         web server over https to avoid mixed content errors, e.g., 
    49        <xsl:variable name="resourcesRoot">https://mywebserver.edu/myresourcesdir</xsl:variable> 
    50                --> 
    51        <xsl:variable name="resourcesRoot" select="/bedework/approot"/> 
    52  
    53        <!-- URL of the XSL template directory --> 
    54        <!-- The approot is an appropriate place to put 
    55                         included stylesheets and xml fragments. These are generally 
    56                         referenced relatively (like errors.xsl and messages.xsl above); 
    57                         this variable is here for your convenience if you choose to 
    58                         reference it explicitly.  It is not used in this stylesheet, however, 
    59                         and can be safely removed if you so choose. --> 
    60        <xsl:variable name="appRoot" select="/bedework/approot"/> 
    61  
    62        <!-- Properly encoded prefixes to the application actions; use these to build 
    63                         urls; allows the application to be used without cookies or within a portal. 
     11  <!-- ========================================= --> 
     12  <!--       PERSONAL CALENDAR STYLESHEET        --> 
     13  <!-- ========================================= --> 
     14 
     15  <!-- ********************************************************************** 
     16    Copyright 2006 Rensselaer Polytechnic Institute. All worldwide rights reserved. 
     17 
     18    Redistribution and use of this distribution in source and binary forms, 
     19    with or without modification, are permitted provided that: 
     20      The above copyright notice and this permission notice appear in all 
     21        copies and supporting documentation; 
     22 
     23        The name, identifiers, and trademarks of Rensselaer Polytechnic 
     24        Institute are not used in advertising or publicity without the 
     25        express prior written permission of Rensselaer Polytechnic Institute; 
     26 
     27    DISCLAIMER: The software is distributed" AS IS" without any express or 
     28    implied warranty, including but not limited to, any implied warranties 
     29    of merchantability or fitness for a particular purpose or any warrant)' 
     30    of non-infringement of any current or pending patent rights. The authors 
     31    of the software make no representations about the suitability of this 
     32    software for any particular purpose. The entire risk as to the quality 
     33    and performance of the software is with the user. Should the software 
     34    prove defective, the user assumes the cost of all necessary servicing, 
     35    repair or correction. In particular, neither Rensselaer Polytechnic 
     36    Institute, nor the authors of the software are liable for any indirect, 
     37    special, consequential, or incidental damages related to the software, 
     38    to the maximum extent the law permits. --> 
     39 
     40  <!-- DEFINE INCLUDES --> 
     41  <xsl:include href="errors.xsl"/> 
     42  <xsl:include href="messages.xsl"/> 
     43 
     44  <!-- DEFINE GLOBAL CONSTANTS --> 
     45  <!-- URL of html resources (images, css, other html); by default this is 
     46      set to the application root, but for the personal calendar 
     47      this should be changed to point to a 
     48      web server over https to avoid mixed content errors, e.g., 
     49  <xsl:variable name="resourcesRoot">https://mywebserver.edu/myresourcesdir</xsl:variable> 
     50    --> 
     51  <xsl:variable name="resourcesRoot" select="/bedework/approot"/> 
     52 
     53  <!-- URL of the XSL template directory --> 
     54  <!-- The approot is an appropriate place to put 
     55      included stylesheets and xml fragments. These are generally 
     56      referenced relatively (like errors.xsl and messages.xsl above); 
     57      this variable is here for your convenience if you choose to 
     58      reference it explicitly.  It is not used in this stylesheet, however, 
     59      and can be safely removed if you so choose. --> 
     60  <xsl:variable name="appRoot" select="/bedework/approot"/> 
     61 
     62  <!-- Properly encoded prefixes to the application actions; use these to build 
     63      urls; allows the application to be used without cookies or within a portal. 
    6464       These urls are rewritten in header.jsp and simply passed through for use 
    6565       here. Every url includes a query string (either ?b=de or a real query 
    6666       string) so that all links constructed in this stylesheet may begin the 
    6767       query string with an ampersand. --> 
    68        <xsl:variable name="setup" select="/bedework/urlPrefixes/setup"/> 
    69        <xsl:variable name="setSelection" select="/bedework/urlPrefixes/setSelection"/> 
    70        <xsl:variable name="setViewPeriod" select="/bedework/urlPrefixes/setViewPeriod"/> 
    71        <xsl:variable name="eventView" select="/bedework/urlPrefixes/eventView"/> 
    72        <xsl:variable name="initEvent" select="/bedework/urlPrefixes/initEvent"/> 
    73        <xsl:variable name="addEvent" select="/bedework/urlPrefixes/addEvent"/> 
    74        <xsl:variable name="addEventUsingPage" select="/bedework/urlPrefixes/addEventUsingPage"/> 
    75        <xsl:variable name="event-addEventRefComplete" select="/bedework/urlPrefixes/event/addEventRefComplete/a/@href"/> 
    76        <xsl:variable name="event-setAccess" select="/bedework/urlPrefixes/event/setAccess/a/@href"/> 
    77        <xsl:variable name="event-selectCalForEvent" select="/bedework/urlPrefixes/event/selectCalForEvent/a/@href"/> 
    78        <xsl:variable name="editEvent" select="/bedework/urlPrefixes/editEvent"/> 
    79        <xsl:variable name="delEvent" select="/bedework/urlPrefixes/delEvent"/> 
    80        <xsl:variable name="addEventRef" select="/bedework/urlPrefixes/addEventRef"/> 
    81        <xsl:variable name="export" select="/bedework/urlPrefixes/export"/> 
    82        <xsl:variable name="mailEvent" select="/bedework/urlPrefixes/mailEvent"/> 
    83        <xsl:variable name="showPage" select="/bedework/urlPrefixes/showPage"/> 
    84        <xsl:variable name="manageLocations" select="/bedework/urlPrefixes/manageLocations"/> 
    85        <xsl:variable name="addLocation" select="/bedework/urlPrefixes/addLocation"/> 
    86        <xsl:variable name="editLocation" select="/bedework/urlPrefixes/editLocation"/> 
    87        <xsl:variable name="delLocation" select="/bedework/urlPrefixes/delLocation"/> 
    88        <xsl:variable name="initEventAlarm" select="/bedework/urlPrefixes/initEventAlarm"/> 
    89        <xsl:variable name="setAlarm" select="/bedework/urlPrefixes/setAlarm"/> 
    90        <xsl:variable name="initUpload" select="/bedework/urlPrefixes/initUpload"/> 
    91        <xsl:variable name="upload" select="/bedework/urlPrefixes/upload"/> 
    92        <xsl:variable name="freeBusy-fetch" select="/bedework/urlPrefixes/freeBusy/fetch/a/@href"/> 
    93        <xsl:variable name="freeBusy-setAccess" select="/bedework/urlPrefixes/freeBusy/setAccess/a/@href"/> 
    94        <!-- calendars --> 
    95        <xsl:variable name="fetchPublicCalendars" select="/bedework/urlPrefixes/fetchPublicCalendars"/> 
    96        <xsl:variable name="calendar-fetch" select="/bedework/urlPrefixes/calendar/fetch/a/@href"/><!-- used --> 
    97        <xsl:variable name="calendar-fetchDescriptions" select="/bedework/urlPrefixes/calendar/fetchDescriptions/a/@href"/><!-- used --> 
    98        <xsl:variable name="calendar-initAdd" select="/bedework/urlPrefixes/calendar/initAdd/a/@href"/><!-- used --> 
    99        <xsl:variable name="calendar-delete" select="/bedework/urlPrefixes/calendar/delete/a/@href"/> 
    100        <xsl:variable name="calendar-fetchForDisplay" select="/bedework/urlPrefixes/calendar/fetchForDisplay/a/@href"/> 
    101        <xsl:variable name="calendar-fetchForUpdate" select="/bedework/urlPrefixes/calendar/fetchForUpdate/a/@href"/><!-- used --> 
    102        <xsl:variable name="calendar-update" select="/bedework/urlPrefixes/calendar/update/a/@href"/><!-- used --> 
    103        <xsl:variable name="calendar-setAccess" select="/bedework/urlPrefixes/calendar/setAccess/a/@href"/> 
    104        <!-- subscriptions --> 
    105        <xsl:variable name="subscriptions-fetch" select="/bedework/urlPrefixes/subscriptions/fetch/a/@href"/> 
    106        <xsl:variable name="subscriptions-fetchForUpdate" select="/bedework/urlPrefixes/subscriptions/fetchForUpdate/a/@href"/> 
    107        <xsl:variable name="subscriptions-addSubByUri" select="/bedework/urlPrefixes/subscriptions/addSubByUri/a/@href"/> 
    108        <xsl:variable name="subscriptions-subscribeByUri" select="/bedework/urlPrefixes/subscriptions/subscribeByUri/a/@href"/> 
    109        <xsl:variable name="subscriptions-initAdd" select="/bedework/urlPrefixes/subscriptions/initAdd/a/@href"/> 
    110        <xsl:variable name="subscriptions-subscribe" select="/bedework/urlPrefixes/subscriptions/subscribe/a/@href"/> 
    111        <!-- preferences --> 
    112        <xsl:variable name="prefs-fetchForUpdate" select="/bedework/urlPrefixes/prefs/fetchForUpdate/a/@href"/> 
    113        <xsl:variable name="prefs-update" select="/bedework/urlPrefixes/prefs/update/a/@href"/> 
    114  
    115        <!-- URL of the web application - includes web context 
    116        <xsl:variable name="urlPrefix" select="/bedework/urlprefix"/> --> 
    117  
    118        <!-- Other generally useful global variables --> 
    119        <xsl:variable name="confId" select="/bedework/confirmationid"/> 
    120        <xsl:variable name="prevdate" select="/bedework/previousdate"/> 
    121        <xsl:variable name="nextdate" select="/bedework/nextdate"/> 
    122        <xsl:variable name="curdate" select="/bedework/currentdate/date"/> 
    123        <xsl:variable name="skin">default</xsl:variable> 
    124        <xsl:variable name="publicCal">/cal</xsl:variable> 
     68  <xsl:variable name="setup" select="/bedework/urlPrefixes/setup"/> 
     69  <xsl:variable name="setSelection" select="/bedework/urlPrefixes/setSelection"/> 
     70  <xsl:variable name="setViewPeriod" select="/bedework/urlPrefixes/setViewPeriod"/> 
     71  <xsl:variable name="eventView" select="/bedework/urlPrefixes/eventView"/> 
     72  <xsl:variable name="initEvent" select="/bedework/urlPrefixes/initEvent"/> 
     73  <xsl:variable name="addEvent" select="/bedework/urlPrefixes/addEvent"/> 
     74  <xsl:variable name="addEventUsingPage" select="/bedework/urlPrefixes/addEventUsingPage"/> 
     75  <xsl:variable name="event-addEventRefComplete" select="/bedework/urlPrefixes/event/addEventRefComplete/a/@href"/> 
     76  <xsl:variable name="event-setAccess" select="/bedework/urlPrefixes/event/setAccess/a/@href"/> 
     77  <xsl:variable name="event-selectCalForEvent" select="/bedework/urlPrefixes/event/selectCalForEvent/a/@href"/> 
     78  <xsl:variable name="editEvent" select="/bedework/urlPrefixes/editEvent"/> 
     79  <xsl:variable name="delEvent" select="/bedework/urlPrefixes/delEvent"/> 
     80  <xsl:variable name="addEventRef" select="/bedework/urlPrefixes/addEventRef"/> 
     81  <xsl:variable name="export" select="/bedework/urlPrefixes/export"/> 
     82  <xsl:variable name="mailEvent" select="/bedework/urlPrefixes/mailEvent"/> 
     83  <xsl:variable name="showPage" select="/bedework/urlPrefixes/showPage"/> 
     84  <xsl:variable name="manageLocations" select="/bedework/urlPrefixes/manageLocations"/> 
     85  <xsl:variable name="addLocation" select="/bedework/urlPrefixes/addLocation"/> 
     86  <xsl:variable name="editLocation" select="/bedework/urlPrefixes/editLocation"/> 
     87  <xsl:variable name="delLocation" select="/bedework/urlPrefixes/delLocation"/> 
     88  <xsl:variable name="initEventAlarm" select="/bedework/urlPrefixes/initEventAlarm"/> 
     89  <xsl:variable name="setAlarm" select="/bedework/urlPrefixes/setAlarm"/> 
     90  <xsl:variable name="initUpload" select="/bedework/urlPrefixes/initUpload"/> 
     91  <xsl:variable name="upload" select="/bedework/urlPrefixes/upload"/> 
     92  <xsl:variable name="freeBusy-fetch" select="/bedework/urlPrefixes/freeBusy/fetch/a/@href"/> 
     93  <xsl:variable name="freeBusy-setAccess" select="/bedework/urlPrefixes/freeBusy/setAccess/a/@href"/> 
     94  <!-- calendars --> 
     95  <xsl:variable name="fetchPublicCalendars" select="/bedework/urlPrefixes/fetchPublicCalendars"/> 
     96  <xsl:variable name="calendar-fetch" select="/bedework/urlPrefixes/calendar/fetch/a/@href"/><!-- used --> 
     97  <xsl:variable name="calendar-fetchDescriptions" select="/bedework/urlPrefixes/calendar/fetchDescriptions/a/@href"/><!-- used --> 
     98  <xsl:variable name="calendar-initAdd" select="/bedework/urlPrefixes/calendar/initAdd/a/@href"/><!-- used --> 
     99  <xsl:variable name="calendar-delete" select="/bedework/urlPrefixes/calendar/delete/a/@href"/> 
     100  <xsl:variable name="calendar-fetchForDisplay" select="/bedework/urlPrefixes/calendar/fetchForDisplay/a/@href"/> 
     101  <xsl:variable name="calendar-fetchForUpdate" select="/bedework/urlPrefixes/calendar/fetchForUpdate/a/@href"/><!-- used --> 
     102  <xsl:variable name="calendar-update" select="/bedework/urlPrefixes/calendar/update/a/@href"/><!-- used --> 
     103  <xsl:variable name="calendar-setAccess" select="/bedework/urlPrefixes/calendar/setAccess/a/@href"/> 
     104  <!-- subscriptions --> 
     105  <xsl:variable name="subscriptions-fetch" select="/bedework/urlPrefixes/subscriptions/fetch/a/@href"/> 
     106  <xsl:variable name="subscriptions-fetchForUpdate" select="/bedework/urlPrefixes/subscriptions/fetchForUpdate/a/@href"/> 
     107  <xsl:variable name="subscriptions-addSubByUri" select="/bedework/urlPrefixes/subscriptions/addSubByUri/a/@href"/> 
     108  <xsl:variable name="subscriptions-subscribeByUri" select="/bedework/urlPrefixes/subscriptions/subscribeByUri/a/@href"/> 
     109  <xsl:variable name="subscriptions-initAdd" select="/bedework/urlPrefixes/subscriptions/initAdd/a/@href"/> 
     110  <xsl:variable name="subscriptions-subscribe" select="/bedework/urlPrefixes/subscriptions/subscribe/a/@href"/> 
     111  <!-- preferences --> 
     112  <xsl:variable name="prefs-fetchForUpdate" select="/bedework/urlPrefixes/prefs/fetchForUpdate/a/@href"/> 
     113  <xsl:variable name="prefs-update" select="/bedework/urlPrefixes/prefs/update/a/@href"/> 
     114 
     115  <!-- URL of the web application - includes web context 
     116  <xsl:variable name="urlPrefix" select="/bedework/urlprefix"/> --> 
     117 
     118  <!-- Other generally useful global variables --> 
     119  <xsl:variable name="confId" select="/bedework/confirmationid"/> 
     120  <xsl:variable name="prevdate" select="/bedework/previousdate"/> 
     121  <xsl:variable name="nextdate" select="/bedework/nextdate"/> 
     122  <xsl:variable name="curdate" select="/bedework/currentdate/date"/> 
     123  <xsl:variable name="skin">default</xsl:variable> 
     124  <xsl:variable name="publicCal">/cal</xsl:variable> 
    125125 
    126126 <!-- BEGIN MAIN TEMPLATE --> 
    127         <xsl:template match="/"> 
    128                 <html lang="en"> 
    129                         <head> 
    130                                 <xsl:call-template name="headSection"/> 
    131                         </head> 
    132                         <body> 
    133                         <xsl:choose> 
    134                                 <xsl:when test="/bedework/page='selectCalForEvent'"> 
    135                                         <xsl:call-template name="selectCalForEvent"/> 
    136                                 </xsl:when> 
    137                                 <xsl:otherwise> 
    138                                                 <xsl:call-template name="headBar"/> 
    139                                                 <xsl:if test="/bedework/message"> 
    140                                                         <div id="messages"> 
    141                                                                 <xsl:apply-templates select="/bedework/message"/> 
    142                                                         </div> 
    143                                                 </xsl:if> 
    144                                                 <xsl:if test="/bedework/error"> 
    145                                                         <div id="errors"> 
    146                                                                 <xsl:apply-templates select="/bedework/error"/> 
    147                                                         </div> 
    148                                                 </xsl:if> 
    149                                                 <table id="bodyBlock" cellspacing="0"> 
    150                                                         <tr> 
    151                                                                 <xsl:choose> 
    152                                                                         <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
    153                                                                                 <td id="sideBarClosed"> 
    154                                                                                         <img src="{$resourcesRoot}/resources/spacer.gif" width="1" height="1" border="0" alt="*"/> 
    155                                                                                 </td> 
    156                                                                         </xsl:when> 
    157                                                                         <xsl:otherwise> 
    158                                                                                 <td id="sideBar"> 
    159                                                                                         <xsl:call-template name="sideBar"/> 
    160                                                                                 </td> 
    161                                                                         </xsl:otherwise> 
    162                                                                 </xsl:choose> 
    163                                                                 <td id="bodyContent"> 
    164                                                                         <xsl:call-template name="tabs"/> 
    165                                                                         <xsl:call-template name="navigation"/> 
    166                                                                         <xsl:choose> 
    167                                                                                 <xsl:when test="/bedework/page='event'"> 
    168                                                                                         <!-- show an event --> 
    169                                                                                         <xsl:apply-templates select="/bedework/event"/> 
    170                                                                                 </xsl:when> 
    171                                                                                 <xsl:when test="/bedework/page='addEvent'"> 
    172                                                                                         <xsl:call-template name="addEvent"/> 
    173                                                                                 </xsl:when> 
    174                                                                                 <xsl:when test="/bedework/page='addEventRef'"> 
    175                                                                                         <xsl:apply-templates select="/bedework/event" mode="addEventRef"/> 
    176                                                                                 </xsl:when> 
    177                                                                                 <xsl:when test="/bedework/page='editEvent'"> 
    178                                                                                         <!-- edit an event --> 
    179                                                                                         <xsl:apply-templates select="/bedework/formElements" mode="editEvent"/> 
    180                                                                                 </xsl:when> 
    181                                                                                 <xsl:when test="/bedework/page='alarmOptions'"> 
    182                                                                                         <xsl:call-template name="alarmOptions" /> 
    183                                                                                 </xsl:when> 
    184                                                                                 <xsl:when test="/bedework/page='upload'"> 
    185                                                                                         <xsl:call-template name="upload" /> 
    186                                                                                 </xsl:when> 
    187                                                                                 <xsl:when test="/bedework/page='manageLocations'"> 
    188                                                                                         <xsl:call-template name="manageLocations" /> 
    189                                                                                 </xsl:when> 
    190                                                                                 <xsl:when test="/bedework/page='editLocation'"> 
    191                                                                                         <xsl:apply-templates select="/bedework/formElements" mode="editLocation"/> 
    192                                                                                 </xsl:when> 
    193                                                                                 <xsl:when test="/bedework/page='subscriptions' or 
    194                                                                                                                                                 /bedework/page='modSubscription' or 
    195                                                                                                                                                 /bedework/page='addSubByUri'"> 
    196                                                                                         <xsl:apply-templates select="/bedework/subscriptions"/> 
    197                                                                                 </xsl:when> 
    198                                                                                 <xsl:when test="/bedework/page='calendarList' or 
    199                                                                                                                                                 /bedework/page='calendarDescriptions' or 
    200                                                                                                                                                 /bedework/page='displayCalendar' or 
    201                                                                                                                                                 /bedework/page='modCalendar' or 
    202                                                                                                                                                 /bedework/page='deleteCalendarConfirm' or 
    203                                                                                                                                                 /bedework/page='calendarReferenced'"> 
    204                                                                                         <xsl:apply-templates select="/bedework/calendars"/> 
    205                                                                                 </xsl:when> 
    206                                                                                 <xsl:when test="/bedework/page='freeBusy'"> 
    207                                                                                         <xsl:call-template name="utilBar"/> 
    208                                                                                         <xsl:apply-templates select="/bedework/freebusy"/> 
    209                                                                                 </xsl:when> 
    210                                                                                 <xsl:when test="/bedework/page='modPrefs'"> 
    211                                                                                         <xsl:apply-templates select="/bedework/prefs"/> 
    212                                                                                 </xsl:when> 
    213                                                                                 <xsl:when test="/bedework/page='other'"> 
    214                                                                                         <!-- show an arbitrary page --> 
    215                                                                                         <xsl:call-template name="selectPage"/> 
    216                                                                                 </xsl:when> 
    217                                                                                 <xsl:otherwise> 
    218                                                                                         <!-- otherwise, show the eventsCalendar --> 
    219                                                                                         <xsl:call-template name="utilBar"/> 
    220                                                                                         <!-- main eventCalendar content --> 
    221                                                                                         <xsl:choose> 
    222                                                                                                 <xsl:when test="/bedework/periodname='Day'"> 
    223                                                                                                         <xsl:call-template name="listView"/> 
    224                                                                                                 </xsl:when> 
    225                                                                                                 <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
    226                                                                                                         <xsl:choose> 
    227                                                                                                                 <xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> 
    228                                                                                                                         <xsl:call-template name="listView"/> 
    229                                                                                                                 </xsl:when> 
    230                                                                                                                 <xsl:otherwise> 
    231                                                                                                                         <xsl:call-template name="weekView"/> 
    232                                                                                                                 </xsl:otherwise> 
    233                                                                                                         </xsl:choose> 
    234                                                                                                 </xsl:when> 
    235                                                                                                 <xsl:when test="/bedework/periodname='Month'"> 
    236                                                                                                         <xsl:choose> 
    237                                                                                                                 <xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> 
    238                                                                                                                         <xsl:call-template name="listView"/> 
    239                                                                                                                 </xsl:when> 
    240                                                                                                                 <xsl:otherwise> 
    241                                                                                                                         <xsl:call-template name="monthView"/> 
    242                                                                                                                 </xsl:otherwise> 
    243                                                                                                         </xsl:choose> 
    244                                                                                                 </xsl:when> 
    245                                                                                                 <xsl:otherwise> 
    246                                                                                                         <xsl:call-template name="yearView"/> 
    247                                                                                                 </xsl:otherwise> 
    248                                                                                         </xsl:choose> 
    249                                                                                 </xsl:otherwise> 
    250                                                                         </xsl:choose> 
    251                                                                 </td> 
    252                                                         </tr> 
    253                                                 </table> 
    254                                                 <!-- footer --> 
    255                                                 <xsl:call-template name="footer"/> 
    256                                         </xsl:otherwise> 
    257                                 </xsl:choose> 
    258                         </body> 
    259                 </html> 
    260         </xsl:template> 
    261  
    262         <!--==== HEAD SECTION  ====--> 
    263  
    264         <xsl:template name="headSection"> 
    265                 <title>Bedework: Personal Calendar Client</title> 
    266                 <meta name="robots" content="noindex,nofollow"/> 
    267                 <link rel="stylesheet" href="{$resourcesRoot}/default/default/default.css"/> 
    268                 <link rel="stylesheet" href="{$resourcesRoot}/default/default/subColors.css"/> 
    269                 <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> 
    270                 <link rel="icon" type="image/ico" href="{$resourcesRoot}/resources/bedework.ico" /> 
    271                 <xsl:if test="/bedework/page='addEvent' or 
    272                                                                         /bedework/page='addEventRef' or 
    273                                                                         /bedework/page='editEvent' or 
    274                                                                         /bedework/page='selectCalForEvent' or 
    275                                                                         /bedework/page='upload' or 
    276                                                                         /bedework/page='addSubByUri' or 
    277                                                                         /bedework/page='modPrefs'"> 
    278                         <script type="text/javascript" src="{$resourcesRoot}/resources/includes.js"></script> 
    279                 </xsl:if> 
    280                 <xsl:if test="/bedework/page='addEvent' or 
    281                                                                         /bedework/page='editEvent'"> 
    282                         <script type="text/javascript" src="{$resourcesRoot}/resources/bwClock.js"></script> 
    283                         <link rel="stylesheet" href="{$resourcesRoot}/resources/bwClock.css"/> 
    284                         <script type="text/javascript" src="{$resourcesRoot}/resources/dynCalendarWidget.js"></script> 
    285                         <link rel="stylesheet" href="{$resourcesRoot}/resources/dynCalendarWidget.css"/> 
    286                         <script type="text/javascript" src="{$resourcesRoot}/resources/browserSniffer.js"></script> 
    287                 </xsl:if> 
    288         </xsl:template> 
    289  
    290         <!--==== HEADER TEMPLATES and NAVIGATION  ====--> 
    291  
    292         <xsl:template name="headBar"> 
    293                 <table width="100%" border="0" cellpadding="0" cellspacing="0" id="logoTable"> 
    294                         <tr> 
    295                                 <td colspan="3" id="logoCell"><a href="http://www.bedework.org/"><img src="{$resourcesRoot}/resources/bedeworkLogo.gif" width="292" height="75" border="0" alt="Bedework"/></a></td> 
    296                                 <td colspan="2" id="schoolLinksCell"> 
    297                                         <h2>Personal Calendar</h2> 
    298                                         <a href="{$publicCal}">Public Calendar</a> | 
    299                                         <a href="http://www.yourschoolhere.edu">School Home</a> | 
    300                                         <a href="http://www.bedework.org/">Other Link</a> | 
    301                                         <a href="http://helpdesk.rpi.edu/update.do?catcenterkey=51"> 
    302                                                 Example Calendar Help 
    303                                         </a> 
    304                                 </td> 
    305                         </tr> 
    306                 </table> 
    307                 <table id="curDateRangeTable"  cellspacing="0"> 
    308                         <td class="sideBarOpenCloseIcon"> 
    309                                 <xsl:choose> 
    310                                         <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
    311                                                 <a href="?setappvar=sidebar(opened)"> 
    312                                                         <img alt="open sidebar" src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/> 
    313                                                 </a> 
    314                                         </xsl:when> 
    315                                         <xsl:otherwise> 
    316                                                 <a href="?setappvar=sidebar(closed)"> 
    317                                                         <img alt="close sidebar" src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/> 
    318                                                 </a> 
    319                                         </xsl:otherwise> 
    320                                 </xsl:choose> 
    321                         </td> 
    322                         <td class="date"> 
    323                                 <xsl:value-of select="/bedework/firstday/longdate"/> 
    324                                 <xsl:if test="/bedework/periodname!='Day'"> 
    325                                         - 
    326                                         <xsl:value-of select="/bedework/lastday/longdate"/> 
    327                                 </xsl:if> 
    328                         </td> 
    329                         <td class="rssPrint"> 
    330                                 <a href="javascript:window.print()" title="print this view"> 
    331                                         <img alt="print this view" src="{$resourcesRoot}/resources/std-print-icon.gif" width="20" height="14" border="0"/> print 
    332                                 </a> 
    333                                 <a class="rss" href="{$setSelection}&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a> 
    334                         </td> 
    335                 </table> 
    336         </xsl:template> 
    337  
    338         <xsl:template name="sideBar"> 
    339                 <h3> 
    340                         <!--<img alt="manage views" src="{$resourcesRoot}/resources/glassFill-icon-menuButton.gif" width="12" height="11" border="0"/>--> 
     127  <xsl:template match="/"> 
     128    <html lang="en"> 
     129      <head> 
     130        <xsl:call-template name="headSection"/> 
     131      </head> 
     132      <body> 
     133      <xsl:choose> 
     134        <xsl:when test="/bedework/page='selectCalForEvent'"> 
     135          <xsl:call-template name="selectCalForEvent"/> 
     136        </xsl:when> 
     137        <xsl:otherwise> 
     138            <xsl:call-template name="headBar"/> 
     139            <xsl:if test="/bedework/message"> 
     140              <div id="messages"> 
     141                <xsl:apply-templates select="/bedework/message"/> 
     142              </div> 
     143            </xsl:if> 
     144            <xsl:if test="/bedework/error"> 
     145              <div id="errors"> 
     146                <xsl:apply-templates select="/bedework/error"/> 
     147              </div> 
     148            </xsl:if> 
     149            <table id="bodyBlock" cellspacing="0"> 
     150              <tr> 
     151                <xsl:choose> 
     152                  <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
     153                    <td id="sideBarClosed"> 
     154                      <img src="{$resourcesRoot}/resources/spacer.gif" width="1" height="1" border="0" alt="*"/> 
     155                    </td> 
     156                  </xsl:when> 
     157                  <xsl:otherwise> 
     158                    <td id="sideBar"> 
     159                      <xsl:call-template name="sideBar"/> 
     160                    </td> 
     161                  </xsl:otherwise> 
     162                </xsl:choose> 
     163                <td id="bodyContent"> 
     164                  <xsl:call-template name="tabs"/> 
     165                  <xsl:call-template name="navigation"/> 
     166                  <xsl:choose> 
     167                    <xsl:when test="/bedework/page='event'"> 
     168                      <!-- show an event --> 
     169                      <xsl:apply-templates select="/bedework/event"/> 
     170                    </xsl:when> 
     171                    <xsl:when test="/bedework/page='addEvent'"> 
     172                      <xsl:call-template name="addEvent"/> 
     173                    </xsl:when> 
     174                    <xsl:when test="/bedework/page='addEventRef'"> 
     175                      <xsl:apply-templates select="/bedework/event" mode="addEventRef"/> 
     176                    </xsl:when> 
     177                    <xsl:when test="/bedework/page='editEvent'"> 
     178                      <!-- edit an event --> 
     179                      <xsl:apply-templates select="/bedework/formElements" mode="editEvent"/> 
     180                    </xsl:when> 
     181                    <xsl:when test="/bedework/page='alarmOptions'"> 
     182                      <xsl:call-template name="alarmOptions" /> 
     183                    </xsl:when> 
     184                    <xsl:when test="/bedework/page='upload'"> 
     185                      <xsl:call-template name="upload" /> 
     186                    </xsl:when> 
     187                    <xsl:when test="/bedework/page='manageLocations'"> 
     188                      <xsl:call-template name="manageLocations" /> 
     189                    </xsl:when> 
     190                    <xsl:when test="/bedework/page='editLocation'"> 
     191                      <xsl:apply-templates select="/bedework/formElements" mode="editLocation"/> 
     192                    </xsl:when> 
     193                    <xsl:when test="/bedework/page='subscriptions' or 
     194                                    /bedework/page='modSubscription' or 
     195                                    /bedework/page='addSubByUri'"> 
     196                      <xsl:apply-templates select="/bedework/subscriptions"/> 
     197                    </xsl:when> 
     198                    <xsl:when test="/bedework/page='calendarList' or 
     199                                    /bedework/page='calendarDescriptions' or 
     200                                    /bedework/page='displayCalendar' or 
     201                                    /bedework/page='modCalendar' or 
     202                                    /bedework/page='deleteCalendarConfirm' or 
     203                                    /bedework/page='calendarReferenced'"> 
     204                      <xsl:apply-templates select="/bedework/calendars"/> 
     205                    </xsl:when> 
     206                    <xsl:when test="/bedework/page='freeBusy'"> 
     207                      <xsl:call-template name="utilBar"/> 
     208                      <xsl:apply-templates select="/bedework/freebusy"/> 
     209                    </xsl:when> 
     210                    <xsl:when test="/bedework/page='modPrefs'"> 
     211                      <xsl:apply-templates select="/bedework/prefs"/> 
     212                    </xsl:when> 
     213                    <xsl:when test="/bedework/page='other'"> 
     214                      <!-- show an arbitrary page --> 
     215                      <xsl:call-template name="selectPage"/> 
     216                    </xsl:when> 
     217                    <xsl:otherwise> 
     218                      <!-- otherwise, show the eventsCalendar --> 
     219                      <xsl:call-template name="utilBar"/> 
     220                      <!-- main eventCalendar content --> 
     221                      <xsl:choose> 
     222                        <xsl:when test="/bedework/periodname='Day'"> 
     223                          <xsl:call-template name="listView"/> 
     224                        </xsl:when> 
     225                        <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
     226                          <xsl:choose> 
     227                            <xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> 
     228                              <xsl:call-template name="listView"/> 
     229                            </xsl:when> 
     230                            <xsl:otherwise> 
     231                              <xsl:call-template name="weekView"/> 
     232                            </xsl:otherwise> 
     233                          </xsl:choose> 
     234                        </xsl:when> 
     235                        <xsl:when test="/bedework/periodname='Month'"> 
     236                          <xsl:choose> 
     237                            <xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> 
     238                              <xsl:call-template name="listView"/> 
     239                            </xsl:when> 
     240                            <xsl:otherwise> 
     241                              <xsl:call-template name="monthView"/> 
     242                            </xsl:otherwise> 
     243                          </xsl:choose> 
     244                        </xsl:when> 
     245                        <xsl:otherwise> 
     246                          <xsl:call-template name="yearView"/> 
     247                        </xsl:otherwise> 
     248                      </xsl:choose> 
     249                    </xsl:otherwise> 
     250                  </xsl:choose> 
     251                </td> 
     252              </tr> 
     253            </table> 
     254            <!-- footer --> 
     255            <xsl:call-template name="footer"/> 
     256          </xsl:otherwise> 
     257        </xsl:choose> 
     258      </body> 
     259    </html> 
     260  </xsl:template> 
     261 
     262  <!--==== HEAD SECTION  ====--> 
     263 
     264  <xsl:template name="headSection"> 
     265    <title>Bedework: Personal Calendar Client</title> 
     266    <meta name="robots" content="noindex,nofollow"/> 
     267    <link rel="stylesheet" href="{$resourcesRoot}/default/default/default.css"/> 
     268    <link rel="stylesheet" href="{$resourcesRoot}/default/default/subColors.css"/> 
     269    <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> 
     270    <link rel="icon" type="image/ico" href="{$resourcesRoot}/resources/bedework.ico" /> 
     271    <xsl:if test="/bedework/page='addEvent' or 
     272                  /bedework/page='addEventRef' or 
     273                  /bedework/page='editEvent' or 
     274                  /bedework/page='selectCalForEvent' or 
     275                  /bedework/page='upload' or 
     276                  /bedework/page='addSubByUri' or 
     277                  /bedework/page='modPrefs'"> 
     278      <script type="text/javascript" src="{$resourcesRoot}/resources/includes.js"></script> 
     279    </xsl:if> 
     280    <xsl:if test="/bedework/page='addEvent' or 
     281                  /bedework/page='editEvent'"> 
     282      <script type="text/javascript" src="{$resourcesRoot}/resources/bwClock.js"></script> 
     283      <link rel="stylesheet" href="{$resourcesRoot}/resources/bwClock.css"/> 
     284      <script type="text/javascript" src="{$resourcesRoot}/resources/dynCalendarWidget.js"></script> 
     285      <link rel="stylesheet" href="{$resourcesRoot}/resources/dynCalendarWidget.css"/> 
     286      <script type="text/javascript" src="{$resourcesRoot}/resources/browserSniffer.js"></script> 
     287    </xsl:if> 
     288  </xsl:template> 
     289 
     290  <!--==== HEADER TEMPLATES and NAVIGATION  ====--> 
     291 
     292  <xsl:template name="headBar"> 
     293    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="logoTable"> 
     294      <tr> 
     295        <td colspan="3" id="logoCell"><a href="http://www.bedework.org/"><img src="{$resourcesRoot}/resources/bedeworkLogo.gif" width="292" height="75" border="0" alt="Bedework"/></a></td> 
     296        <td colspan="2" id="schoolLinksCell"> 
     297          <h2>Personal Calendar</h2> 
     298          <a href="{$publicCal}">Public Calendar</a> | 
     299          <a href="http://www.yourschoolhere.edu">School Home</a> | 
     300          <a href="http://www.bedework.org/">Other Link</a> | 
     301          <a href="http://helpdesk.rpi.edu/update.do?catcenterkey=51"> 
     302            Example Calendar Help 
     303          </a> 
     304        </td> 
     305      </tr> 
     306    </table> 
     307    <table id="curDateRangeTable"  cellspacing="0"> 
     308      <tr> 
     309        <td class="sideBarOpenCloseIcon"> 
     310          <xsl:choose> 
     311            <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
     312              <a href="?setappvar=sidebar(opened)"> 
     313                <img alt="open sidebar" src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/> 
     314              </a> 
     315            </xsl:when> 
     316            <xsl:otherwise> 
     317              <a href="?setappvar=sidebar(closed)"> 
     318                <img alt="close sidebar" src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/> 
     319              </a> 
     320            </xsl:otherwise> 
     321          </xsl:choose> 
     322        </td> 
     323        <td class="date"> 
     324          <xsl:value-of select="/bedework/firstday/longdate"/> 
     325          <xsl:if test="/bedework/periodname!='Day'"> 
     326            - 
     327            <xsl:value-of select="/bedework/lastday/longdate"/> 
     328          </xsl:if> 
     329        </td> 
     330        <td class="rssPrint"> 
     331          <a href="javascript:window.print()" title="print this view"> 
     332            <img alt="print this view" src="{$resourcesRoot}/resources/std-print-icon.gif" width="20" height="14" border="0"/> print 
     333          </a> 
     334          <a class="rss" href="{$setSelection}&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a> 
     335        </td> 
     336      </tr> 
     337    </table> 
     338  </xsl:template> 
     339 
     340  <xsl:template name="sideBar"> 
     341    <h3> 
     342      <!--<img alt="manage views" src="{$resourcesRoot}/resources/glassFill-icon-menuButton.gif" width="12" height="11" border="0"/>--> 
    341343      views 
    342                </h3> 
    343                <ul id="myViews"> 
    344                        <xsl:choose> 
    345                                <xsl:when test="/bedework/views/view"> 
    346                                        <xsl:for-each select="/bedework/views/view"> 
    347                                                <xsl:variable name="viewName" select="name"/> 
    348                                                <xsl:choose> 
    349                                                        <xsl:when test="/bedework/selectionState/selectionType = 'view' 
    350                                                                                                                        and name=/bedework/selectionState/view/name"> 
    351                                                                <li class="selected"><a href="{$setSelection}&amp;viewName={$viewName}"><xsl:value-of select="name"/></a></li> 
    352                                                        </xsl:when> 
    353                                                        <xsl:otherwise> 
    354                                                                <li><a href="{$setSelection}&amp;viewName={$viewName}"><xsl:value-of select="name"/></a></li> 
    355                                                        </xsl:otherwise> 
    356                                                </xsl:choose> 
    357                                        </xsl:for-each> 
    358                                </xsl:when> 
    359                                <xsl:otherwise> 
    360                                        <li class="none">no views</li> 
    361                                </xsl:otherwise> 
    362                        </xsl:choose> 
    363                </ul> 
    364  
    365                <h3> 
    366                        <a href="{$calendar-fetch}"> 
    367                                <img alt="manage calendars" src="{$resourcesRoot}/resources/glassFill-icon-menuButton.gif" width="12" height="11" border="0"/> calendars 
    368                        </a> 
    369                </h3> 
    370                <ul class="calendarTree"> 
    371                        <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar" mode="myCalendars"/> 
    372                </ul> 
    373  
    374                <h3> 
    375                        <a href="{$subscriptions-fetch}" title="manage subscriptions"> 
    376                                <img alt="manage subscriptions" src="{$resourcesRoot}/resources/glassFill-icon-menuButton.gif" width="12" height="11" border="0"/> 
    377                                subscriptions 
    378                        </a> 
    379                </h3> 
    380                <ul class="calendarTree"> 
    381                        <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
    382                        <xsl:choose> 
    383                                <xsl:when test="/bedework/mySubscriptions/subscription[not(contains(uri,$userPath))]"> 
    384                                        <xsl:apply-templates select="/bedework/mySubscriptions/subscription[not(contains(uri,$userPath))]" mode="mySubscriptions"/> 
    385                                </xsl:when> 
    386                                <xsl:otherwise> 
    387                                        <li class="none">no subscriptions</li> 
    388                                </xsl:otherwise> 
    389                        </xsl:choose> 
    390                </ul> 
    391  
    392                <h3>options</h3> 
    393                <ul id="sideBarMenu"> 
    394                        <li><a href="{$manageLocations}">Manage Locations</a></li> 
    395                        <li><a href="{$prefs-fetchForUpdate}">Preferences</a></li> 
    396                </ul> 
    397        </xsl:template> 
    398  
    399        <xsl:template name="tabs"> 
    400                <xsl:choose> 
    401                        <xsl:when test="/bedework/page='eventscalendar' or /bedework/page='freeBusy'"> 
    402                                <xsl:variable name="navAction"> 
    403                                        <xsl:choose> 
    404                                                <xsl:when test="/bedework/page='freeBusy'"><xsl:value-of select="$freeBusy-fetch"/></xsl:when> 
    405                                                <xsl:otherwise><xsl:value-of select="$setViewPeriod"/></xsl:otherwise> 
    406                                        </xsl:choose> 
    407                                </xsl:variable> 
    408                                <table border="0" cellpadding="0" cellspacing="0" id="tabsTable"> 
    409                                        <tr> 
    410                                                <td> 
    411                                                        <xsl:choose> 
    412                                                                <xsl:when test="/bedework/periodname='Day'"> 
    413                                                                        <a href="{$navAction}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-day-on.gif" width="91" height="20" border="0" alt="DAY"/></a> 
    414                                                                </xsl:when> 
    415                                                                <xsl:otherwise> 
    416                                                                        <a href="{$navAction}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a> 
    417                                                                </xsl:otherwise> 
    418                                                        </xsl:choose> 
    419                                                </td> 
    420                                                <td> 
    421                                                        <xsl:choose> 
    422                                                                <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
    423                                                                        <a href="{$navAction}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-week-on.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
    424                                                                 </xsl:when> 
    425                                                                <xsl:otherwise> 
    426                                                                        <a href="{$navAction}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
    427                                                                 </xsl:otherwise> 
    428                                                        </xsl:choose> 
    429                                                </td> 
    430                                                <td> 
    431                                                        <xsl:choose> 
    432                                                                <xsl:when test="/bedework/periodname='Month'"> 
    433                                                                        <a href="{$navAction}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-month-on.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
    434                                                                </xsl:when> 
    435                                                                <xsl:otherwise> 
    436                                                                        <a href="{$navAction}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
    437                                                                </xsl:otherwise> 
    438                                                        </xsl:choose> 
    439                                                </td> 
    440                                                <td> 
    441                                                        <xsl:choose> 
    442                                                                <!-- don't allow switching to year for free busy view, so only use setViewPeriod action --> 
    443                                                                <xsl:when test="/bedework/periodname='Year'"> 
    444                                                                        <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-year-on.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
    445                                                                </xsl:when> 
    446                                                                <xsl:otherwise> 
    447                                                                        <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
    448                                                                </xsl:otherwise> 
    449                                                        </xsl:choose> 
    450                                                </td> 
    451                                                <td class="rightCell"> 
    452                                                        logged in as 
    453                                                        <xsl:text> </xsl:text> 
    454                                                        <strong><xsl:value-of select="/bedework/userid"/></strong> 
    455                                                        <xsl:text> </xsl:text> 
    456                                                        <span class="logout"><a href="{$setup}&amp;logout=true">logout</a></span> 
    457                                                </td> 
    458                                        </tr> 
    459                                </table> 
    460                        </xsl:when> 
    461                        <xsl:otherwise> 
    462                                <table border="0" cellpadding="0" cellspacing="0" id="tabsTable"> 
    463                                        <tr> 
    464                                                <td> 
    465                                                        <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a> 
    466                                                </td> 
    467                                                <td> 
    468                                                        <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
    469                                                </td> 
    470                                                <td> 
    471                                                        <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
    472                                                </td> 
    473                                                <td> 
    474                                                        <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
    475                                                </td> 
    476                                                <td class="rightCell"> 
    477                                                        logged in as 
    478                                                        <xsl:text> </xsl:text> 
    479                                                        <strong><xsl:value-of select="/bedework/userid"/></strong> 
    480                                                        <xsl:text> </xsl:text> 
    481                                                        <span class="logout"><a href="{$setup}&amp;logout=true">logout</a></span> 
    482                                                </td> 
    483                                        </tr> 
    484                                </table> 
    485                        </xsl:otherwise> 
    486                </xsl:choose> 
    487        </xsl:template> 
    488  
    489        <xsl:template name="navigation"> 
    490                <xsl:variable name="navAction"> 
    491                        <xsl:choose> 
    492                                <xsl:when test="/bedework/page='freeBusy'"><xsl:value-of select="$freeBusy-fetch"/></xsl:when> 
    493                                <xsl:otherwise><xsl:value-of select="$setViewPeriod"/></xsl:otherwise> 
    494                        </xsl:choose> 
    495                </xsl:variable> 
    496                <table border="0" cellpadding="0" cellspacing="0" id="navigationBarTable"> 
    497                        <tr> 
    498                                <td class="leftCell"> 
    499                                        <a href="{$navAction}&amp;date={$prevdate}"><img src="{$resourcesRoot}/resources/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a> 
    500                                        <a href="{$navAction}&amp;date={$nextdate}"><img src="{$resourcesRoot}/resources/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a> 
    501                                        <xsl:choose> 
    502                                                <xsl:when test="/bedework/periodname='Year'"> 
    503                                                        <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
    504                                                </xsl:when> 
    505                                                <xsl:when test="/bedework/periodname='Month'"> 
    506                                                        <xsl:value-of select="/bedework/firstday/monthname"/>, <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
    507                                                </xsl:when> 
    508                                                <xsl:when test="/bedework/periodname='Week'"> 
    509                                                        Week of <xsl:value-of select="substring-after(/bedework/firstday/longdate,', ')"/> 
    510                                                </xsl:when> 
    511                                                <xsl:otherwise> 
    512                                                        <xsl:value-of select="/bedework/firstday/longdate"/> 
    513                                                </xsl:otherwise> 
    514                                        </xsl:choose> 
    515                                </td> 
    516                                <td class="todayButton"> 
    517                                        <a href="{$navAction}&amp;viewType=todayView&amp;date={$curdate}"> 
    518                                                <img src="{$resourcesRoot}/resources/std-button-today-off.gif" width="54" height="22" border="0" alt="Go to Today" align="left"/> 
    519                                        </a> 
    520                                </td> 
    521                                <td align="right" class="gotoForm"> 
    522                                        <form name="calForm" method="get" action="{$navAction}"> 
    523                                                 <table border="0" cellpadding="0" cellspacing="0"> 
    524                                                        <tr> 
    525                                                                <xsl:if test="/bedework/periodname!='Year'"> 
    526                                                                        <td> 
    527                                                                                <select name="viewStartDate.month"> 
    528                                                                                        <xsl:for-each select="/bedework/monthvalues/val"> 
    529                                                                                                <xsl:variable name="temp" select="."/> 
    530                                                                                                <xsl:variable name="pos" select="position()"/> 
    531                                                                                                <xsl:choose> 
    532                                                                                                        <xsl:when test="/bedework/monthvalues[start=$temp]"> 
    533                                                                                                                <option value="{$temp}" selected="selected"> 
    534                                                                                                                        <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
    535                                                                                                                </option> 
    536                                                                                                        </xsl:when> 
    537                                                                                                        <xsl:otherwise> 
    538                                                                                                                <option value="{$temp}"> 
    539                                                                                                                        <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
    540                                                                                                                </option> 
    541                                                                                                        </xsl:otherwise> 
    542                                                                                                </xsl:choose> 
    543                                                                                        </xsl:for-each> 
    544                                                                                </select> 
    545                                                                        </td> 
    546                                                                        <xsl:if test="/bedework/periodname!='Month'"> 
    547                                                                                <td> 
    548                                                                                        <select name="viewStartDate.day"> 
    549                                                                                                <xsl:for-each select="/bedework/dayvalues/val"> 
    550                                                                                                        <xsl:variable name="temp" select="."/> 
    551                                                                                                        <xsl:variable name="pos" select="position()"/> 
    552                                                                                                        <xsl:choose> 
    553                                                                                                                <xsl:when test="/bedework/dayvalues[start=$temp]"> 
    554                                                                                                                        <option value="{$temp}" selected="selected"> 
    555                                                                                                                                <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
    556                                                                                                                        </option> 
    557                                                                                                                </xsl:when> 
    558                                                                                                                <xsl:otherwise> 
    559                                                                                                                        <option value="{$temp}"> 
    560                                                                                                                                <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
    561                                                                                                                        </option> 
    562                                                                                                                </xsl:otherwise> 
    563                                                                                                        </xsl:choose> 
    564                                                                                                </xsl:for-each> 
    565                                                                                        </select> 
    566                                                                                </td> 
    567                                                                        </xsl:if> 
    568                                                                </xsl:if> 
    569                                                                <td> 
    570                                                                        <xsl:variable name="temp" select="/bedework/yearvalues/start"/> 
    571                                                                        <input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/> 
    572                                                                </td> 
    573                                                                <td> 
    574                                                                        <input name="submit" type="submit" value="go"/> 
    575                                                                </td> 
    576                                                        </tr> 
    577                                                </table> 
    578                                        </form> 
    579                                </td> 
    580                        </tr> 
    581                </table> 
    582        </xsl:template> 
    583  
    584        <xsl:template name="utilBar"> 
    585                <table width="100%" border="0" cellpadding="0" cellspacing="0" id="utilBarTable"> 
    586                         <tr> 
    587                                 <td class="leftCell"> 
    588                                         <xsl:choose> 
    589                                                 <xsl:when test="/bedework/periodname = 'day'"> 
    590                                                         <xsl:variable name="date" select="/bedework/firstday/date"/> 
    591                                                         <a href="{$initEvent}&amp;startdate={$date}" title="add event"> 
    592                                                                        <img src="{$resourcesRoot}/resources/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="add event"/> 
    593                                                                        add event 
    594                                                         </a> 
    595                                                 </xsl:when> 
    596                                                 <xsl:otherwise> 
    597                                                         <a href="{$initEvent}" title="add event"> 
    598                                                                        <img src="{$resourcesRoot}/resources/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="add event"/> 
    599                                                                        add event 
    600                                                         </a> 
    601                                                 </xsl:otherwise> 
    602                                         </xsl:choose> 
    603                                         <a href="{$initUpload}" title="upload event"> 
    604                                                        <img src="{$resourcesRoot}/resources/std-icalUpload-icon-small.gif" width="12" height="16" border="0" alt="upload event"/> 
    605                                                        upload 
    606                                         </a> 
    607                                 </td> 
    608                                 <td class="rightCell"> 
    609  
    610                                         <!-- show free / busy --> 
    611                                         <xsl:choose> 
    612                                                 <xsl:when test="/bedework/periodname!='Year'"> 
    613                                                         <xsl:choose> 
    614                                                                 <xsl:when test="/bedework/page='freeBusy'"> 
    615                                                                         <a href="{$setViewPeriod}&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-button-events.gif" width="70" height="21" border="0" alt="show events"/></a> 
    616                                                                 </xsl:when> 
    617                                                                 <xsl:otherwise> 
    618                                                                         <a href="{$freeBusy-fetch}&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-button-freebusy.gif" width="70" height="21" border="0" alt="show free/busy"/></a> 
    619                                                                 </xsl:otherwise> 
    620                                                         </xsl:choose> 
    621                                                 </xsl:when> 
    622                                                 <xsl:otherwise> 
    623                                                         <img src="{$resourcesRoot}/resources/std-button-freebusy-off.gif" width="70" height="21" border="0" alt="show free/busy"/> 
    624                                                 </xsl:otherwise> 
    625                                         </xsl:choose> 
    626  
    627                                         <!-- toggle list / calendar view --> 
    628                                         <xsl:choose> 
    629                                                 <xsl:when test="/bedework/periodname='Day'"> 
    630                                                         <img src="{$resourcesRoot}/resources/std-button-listview-off.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    631                                                 </xsl:when> 
    632                                                 <xsl:when test="/bedework/periodname='Year'"> 
    633                                                         <img src="{$resourcesRoot}/resources/std-button-calview-off.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    634                                                 </xsl:when> 
    635                                                 <xsl:when test="/bedework/periodname='Month'"> 
    636                                                         <xsl:choose> 
    637                                                                 <xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> 
    638                                                                         <a href="{$setup}&amp;setappvar=monthViewMode(cal)" title="toggle list/calendar view"> 
    639                                                                                 <img src="{$resourcesRoot}/resources/std-button-calview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    640                                                                         </a> 
    641                                                                 </xsl:when> 
    642                                                                 <xsl:otherwise> 
    643                                                                         <a href="{$setup}&amp;setappvar=monthViewMode(list)" title="toggle list/calendar view"> 
    644                                                                                 <img src="{$resourcesRoot}/resources/std-button-listview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    645                                                                         </a> 
    646                                                                 </xsl:otherwise> 
    647                                                         </xsl:choose> 
    648                                                 </xsl:when> 
    649                                                 <xsl:otherwise> 
    650                                                         <xsl:choose> 
    651                                                                 <xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> 
    652                                                                         <a href="{$setup}&amp;setappvar=weekViewMode(cal)" title="toggle list/calendar view"> 
    653                                                                                 <img src="{$resourcesRoot}/resources/std-button-calview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    654                                                                         </a> 
    655                                                                 </xsl:when> 
    656                                                                 <xsl:otherwise> 
    657                                                                         <a href="{$setup}&amp;setappvar=weekViewMode(list)" title="toggle list/calendar view"> 
    658                                                                                 <img src="{$resourcesRoot}/resources/std-button-listview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    659                                                                         </a> 
    660                                                                 </xsl:otherwise> 
    661                                                         </xsl:choose> 
    662                                                 </xsl:otherwise> 
    663                                         </xsl:choose> 
    664  
    665                                         <!-- summary / detailed mode toggle --> 
    666                                         <xsl:choose> 
    667                                                 <xsl:when test="/bedework/periodname='Year' or 
    668                                                                                                                        (/bedework/periodname='Month' and 
    669                                                                                                                        (/bedework/appvar[key='monthViewMode']/value='cal' or 
    670                                                                                                                         not(/bedework/appvar[key='monthViewMode']))) or 
    671                                                                                                                        (/bedework/periodname='Week' and 
    672                                                                                                                        (/bedework/appvar[key='weekViewMode']/value='cal' or 
    673                                                                                                                         not(/bedework/appvar[key='weekViewMode'])))"> 
    674                                                         <xsl:choose> 
    675                                                                 <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    676                                                                         <img src="{$resourcesRoot}/resources/std-button-summary-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
    677                                                                 </xsl:when> 
    678                                                                 <xsl:otherwise> 
    679                                                                         <img src="{$resourcesRoot}/resources/std-button-details-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
    680                                                                 </xsl:otherwise> 
    681                                                         </xsl:choose> 
    682                                                 </xsl:when> 
    683                                                 <xsl:otherwise> 
    684                                                         <xsl:choose> 
    685                                                                 <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    686                                                                         <a href="{$setup}&amp;setappvar=summaryMode(summary)" title="toggle summary/detailed view"> 
    687                                                                                 <img src="{$resourcesRoot}/resources/std-button-summary.gif" width="62" height="21" border="0" alt="toggle summary/detailed view"/> 
    688                                                                         </a> 
    689                                                                 </xsl:when> 
    690                                                                 <xsl:otherwise> 
    691                                                                         <a href="{$setup}&amp;setappvar=summaryMode(details)" title="toggle summary/detailed view"> 
    692                                                                                 <img src="{$resourcesRoot}/resources/std-button-details.gif" width="62" height="21" border="0" alt="toggle summary/detailed view"/> 
    693                                                                         </a> 
    694                                                                 </xsl:otherwise> 
    695                                                         </xsl:choose> 
    696                                                 </xsl:otherwise> 
    697                                         </xsl:choose> 
    698  
    699                                         <!-- refresh button --> 
    700                                         <a href="{$setup}"><img src="{$resourcesRoot}/resources/std-button-refresh.gif" width="70" height="21" border="0" alt="refresh view"/></a> 
    701                                 </td> 
    702                         </tr> 
    703                </table> 
    704        </xsl:template> 
    705  
    706        <!--==== LIST VIEW  (for day, week, and month) ====--> 
    707        <xsl:template name="listView"> 
    708                <table id="listTable" border="0" cellpadding="0" cellspacing="0"> 
    709                        <xsl:choose> 
    710                                <xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> 
    711                                        <tr> 
    712                                                <td class="noEventsCell"> 
    713                                                        No events to display. 
    714                                                </td> 
    715                                        </tr> 
    716                                </xsl:when> 
    717                                <xsl:otherwise> 
    718                                        <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[event]"> 
    719                                                <xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''"> 
    720                                                        <tr> 
    721                                                                <td colspan="6" class="dateRow"> 
    722                                                                         <xsl:variable name="date" select="date"/> 
    723                                                                         <a href="{$initEvent}&amp;startdate={$date}" class="listAdd"> 
    724                                                                                 add event 
    725                                                                         </a> 
    726                                                                         <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$date}"> 
    727                                                                                 <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> 
    728                                                                         </a> 
    729                                                                 </td> 
    730                                                        </tr> 
    731                                                </xsl:if> 
    732                                                <xsl:for-each select="event"> 
    733                                                        <xsl:variable name="id" select="id"/> 
    734                                                        <xsl:variable name="subscriptionId" select="subscription/id"/> 
    735                                                        <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    736                                                        <xsl:variable name="guid" select="guid"/> 
    737                                                        <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    738                                                        <tr> 
    739                                                                <xsl:variable name="dateRangeStyle"> 
    740                                                                        <xsl:choose> 
    741                                                                                <xsl:when test="start/shortdate = parent::day/shortdate"> 
    742                                                                                        <xsl:choose> 
    743                                                                                                <xsl:when test="start/allday = 'true'">dateRangeCrossDay</xsl:when> 
    744                                                                                                <xsl:when test="start/hour24 &lt; 6">dateRangeEarlyMorning</xsl:when> 
    745                                                                                                <xsl:when test="start/hour24 &lt; 12">dateRangeMorning</xsl:when> 
    746                                                                                                <xsl:when test="start/hour24 &lt; 18">dateRangeAfternoon</xsl:when> 
    747                                                                                                <xsl:otherwise>dateRangeEvening</xsl:otherwise> 
    748                                                                                        </xsl:choose> 
    749                                                                                </xsl:when> 
    750                                                                                <xsl:otherwise>dateRangeCrossDay</xsl:otherwise> 
    751                                                                        </xsl:choose> 
    752                                                                </xsl:variable> 
    753                                                                <xsl:choose> 
    754                                                                        <xsl:when test="start/allday = 'true' and 
    755                                                                                                                                        start/shortdate = end/shortdate"> 
    756                                                                                <td class="{$dateRangeStyle} center" colspan="3"> 
    757                                                                                        all day 
    758                                                                                </td> 
    759                                                                        </xsl:when> 
    760                                                                        <xsl:when test="start/shortdate = end/shortdate and 
    761                                                                                                                                        start/time = end/time"> 
    762                                                                                <td class="{$dateRangeStyle} center" colspan="3"> 
    763                                                                                        <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    764                                                                                                <xsl:value-of select="start/time"/> 
    765                                                                                        </a> 
    766                                                                                </td> 
    767                                                                        </xsl:when> 
    768                                                                        <xsl:otherwise> 
    769                                                                                <td class="{$dateRangeStyle} right"> 
    770                                                                                        <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    771                                                                                        <xsl:choose> 
    772                                                                                                <xsl:when test="start/allday = 'true' and 
    773                                                                                                                                                                parent::day/shortdate = start/shortdate"> 
    774                                                                                                        today 
    775                                                                                                </xsl:when> 
    776                                                                                                <xsl:when test="parent::day/shortdate != start/shortdate"> 
    777                                                                                                        <span class="littleArrow">&#171;</span>&#160; 
    778                                                                                                        <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> 
    779                                                                                                </xsl:when> 
    780                                                                                                <xsl:otherwise> 
    781                                                                                                        <xsl:value-of select="start/time"/> 
    782                                                                                                </xsl:otherwise> 
    783                                                                                        </xsl:choose> 
    784                                                                                        </a> 
    785                                                                                </td> 
    786                                                                                <td class="{$dateRangeStyle} center"> 
    787                                                                                        <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">-</a> 
    788                                                                                </td> 
    789                                                                                <td class="{$dateRangeStyle} left"> 
    790                                                                                        <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    791                                                                                        <xsl:choose> 
    792                                                                                                <xsl:when test="end/allday = 'true' and 
    793                                                                                                                                                                parent::day/shortdate = end/shortdate"> 
    794                                                                                                        today 
    795                                                                                                </xsl:when> 
    796                                                                                                <xsl:when test="parent::day/shortdate != end/shortdate"> 
    797                                                                                                        <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> 
    798                                                                                                        &#160;<span class="littleArrow">&#187;</span> 
    799                                                                                                </xsl:when> 
    800                                                                                                <xsl:otherwise> 
    801                                                                                                        <xsl:value-of select="end/time"/> 
    802                                                                                                </xsl:otherwise> 
    803                                                                                        </xsl:choose> 
    804                                                                                        </a> 
    805                                                                                </td> 
    806                                                                        </xsl:otherwise> 
    807                                                                </xsl:choose> 
    808                                                                <xsl:variable name="descriptionClass"> 
    809                                                                        <xsl:choose> 
    810                                                                                <xsl:when test="status='CANCELLED'">description bwStatusCancelled</xsl:when> 
    811                                                                                <xsl:when test="status='TENTATIVE'">description bwStatusTentative</xsl:when> 
    812                                                                                <xsl:otherwise>description</xsl:otherwise> 
    813                                                                        </xsl:choose> 
    814                                                                </xsl:variable> 
    815                                                                <xsl:variable name="subStyle" select="subscription/style"/> 
    816                                                                <td class="{$descriptionClass} {$subStyle}"> 
    817                                                                        <xsl:if test="status='CANCELLED'"><strong>CANCELLED: </strong></xsl:if> 
    818                                                                        <xsl:choose> 
    819                                                                                <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    820                                                                                        <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    821                                                                                                <strong> 
    822                                                                                                        <xsl:value-of select="summary"/>: 
    823                                                                                                </strong> 
    824                                                                                                <xsl:value-of select="description"/>&#160; 
    825                                                                                                <em> 
    826                                                                                                        <xsl:value-of select="location/address"/> 
    827                                                                                                        <xsl:if test="location/subaddress != ''"> 
    828                                                                                                                , <xsl:value-of select="location/subaddress"/> 
    829                                                                                                        </xsl:if>.&#160; 
    830                                                                                                        <xsl:if test="cost!=''"> 
    831                                                                                                                <xsl:value-of select="cost"/>.&#160; 
    832                                                                                                        </xsl:if> 
    833                                                                                                        <xsl:if test="sponsor/name!='none'"> 
    834                                                                                                                Contact: <xsl:value-of select="sponsor/name"/> 
    835                                                                                                        </xsl:if> 
    836                                                                                                </em> 
    837                                                                                        </a> 
    838                                                                                        <xsl:if test="link != ''"> 
    839                                                                                                <xsl:variable name="link" select="link"/> 
    840                                                                                                <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> 
    841                                                                                        </xsl:if> 
    842                                                                                </xsl:when> 
    843                                                                                <xsl:otherwise> 
    844                                                                                        <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    845                                                                                                <xsl:value-of select="summary"/> 
    846                                                                                                <xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> 
    847                                                                                        </a> 
    848                                                                                </xsl:otherwise> 
    849                                                                        </xsl:choose> 
    850                                                                </td> 
    851                                                                <td class="eventLinks"> 
    852                                                                        <xsl:call-template name="eventLinks"/> 
    853                                                                </td> 
    854                                                                <td class="smallIcon"> 
    855                                                                        <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    856                                                                        <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
    857                                                                                <img src="{$resourcesRoot}/resources/std-ical_icon_small.gif" width="12" height="16" border="0" alt="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"/> 
    858                                                                        </a> 
    859                                                                </td> 
    860                                                        </tr> 
    861                                                </xsl:for-each> 
    862                                        </xsl:for-each> 
    863                                </xsl:otherwise> 
    864                        </xsl:choose> 
    865                </table> 
    866        </xsl:template> 
    867  
    868        <xsl:template name="eventLinks"> 
    869                <xsl:variable name="subscriptionId" select="subscription/id"/> 
    870                <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    871                <xsl:variable name="guid" select="guid"/> 
    872                <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    873                <xsl:choose> 
    874                        <xsl:when test="isAnnotation"> 
    875                                <xsl:choose> 
    876                                        <xsl:when test="recurring=true"> 
    877                                                <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;confirmationid={$confId}">Remove All</a> 
    878                                        </xsl:when> 
    879                                        <xsl:otherwise> 
    880                                                <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}">Remove</a> 
    881                                        </xsl:otherwise> 
    882                                </xsl:choose> 
    883                        </xsl:when> 
    884                        <xsl:when test="calendar/owner = /bedework/userid"> 
    885                                <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">Edit</a> | 
    886                                <xsl:choose> 
    887                                        <xsl:when test="recurring=true"> 
    888                                                <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}">Delete All</a> 
    889                                        </xsl:when> 
    890                                        <xsl:otherwise> 
    891                                                <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}">Delete</a> 
    892                                        </xsl:otherwise> 
    893                                </xsl:choose> 
    894                        </xsl:when> 
    895                        <xsl:otherwise> 
    896                                <a href="{$subscriptions-fetch}">Subscription</a> 
    897                        </xsl:otherwise> 
    898                </xsl:choose> 
    899        </xsl:template> 
    900  
    901        <!--==== WEEK CALENDAR VIEW ====--> 
    902        <xsl:template name="weekView"> 
    903                <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
    904                        <tr> 
    905                                <xsl:for-each select="/bedework/daynames/val"> 
    906                                        <th class="dayHeading"><xsl:value-of select="."/></th> 
    907                                </xsl:for-each> 
    908                        </tr> 
    909                        <tr> 
    910                                <xsl:for-each select="/bedework/eventscalendar/year/month/week/day"> 
    911                                        <xsl:variable name="dayPos" select="position()"/> 
    912                                        <xsl:if test="filler='false'"> 
    913                                                <td> 
    914                                                        <xsl:variable name="dayDate" select="date"/> 
    915                                                        <a href="{$initEvent}&amp;startdate={$dayDate}" class="gridAdd" title="add event"> 
    916                                                                <img src="{$resourcesRoot}/resources/addEvent-forGrid-icon.gif" width="9" height="10" border="0" alt="add event"/> 
    917                                                        </a> 
    918                                                        <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}" class="dayLink" title="go to day"> 
    919                                                                <xsl:value-of select="value"/> 
    920                                                        </a> 
    921                                                        <ul> 
    922                                                                <xsl:apply-templates select="event" mode="calendarLayout"> 
    923                                                                        <xsl:with-param name="dayPos" select="$dayPos"/> 
    924                                                                </xsl:apply-templates> 
    925                                                        </ul> 
    926                                                </td> 
    927                                        </xsl:if> 
    928                                </xsl:for-each> 
    929                        </tr> 
    930                </table> 
    931        </xsl:template> 
    932  
    933        <!--==== MONTH CALENDAR VIEW ====--> 
    934        <xsl:template name="monthView"> 
    935                <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
    936                        <tr> 
    937                                <xsl:for-each select="/bedework/daynames/val"> 
    938                                        <th class="dayHeading"><xsl:value-of select="."/></th> 
    939                                </xsl:for-each> 
    940                        </tr> 
    941                        <xsl:for-each select="/bedework/eventscalendar/year/month/week"> 
    942                                <tr> 
    943                                        <xsl:for-each select="day"> 
    944                                                <xsl:variable name="dayPos" select="position()"/> 
    945                                                <xsl:choose> 
    946                                                        <xsl:when test="filler='true'"> 
    947                                                                <td class="filler">&#160;</td> 
    948                                                        </xsl:when> 
    949                                                        <xsl:otherwise> 
    950                                                                <td> 
    951                                                                        <xsl:variable name="dayDate" select="date"/> 
    952                                                                        <a href="{$initEvent}&amp;startdate={$dayDate}" class="gridAdd" title="add event"> 
    953                                                                                <img src="{$resourcesRoot}/resources/addEvent-forGrid-icon.gif" width="10" height="10" border="0" alt="add event"/> 
    954                                                                        </a> 
    955                                                                        <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}" class="dayLink" title="go to day"> 
    956                                                                                <xsl:value-of select="value"/> 
    957                                                                        </a> 
    958                                                                        <ul> 
    959                                                                                <xsl:apply-templates select="event" mode="calendarLayout"> 
    960                                                                                        <xsl:with-param name="dayPos" select="$dayPos"/> 
    961                                                                                </xsl:apply-templates> 
    962                                                                        </ul> 
    963                                                                </td> 
    964                                                        </xsl:otherwise> 
    965                                                </xsl:choose> 
    966                                        </xsl:for-each> 
    967                                </tr> 
    968                        </xsl:for-each> 
    969                </table> 
    970        </xsl:template> 
    971  
    972        <xsl:template match="event" mode="calendarLayout"> 
    973                <xsl:param name="dayPos"/> 
    974                <xsl:variable name="subscriptionId" select="subscription/id"/> 
    975                <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    976                <xsl:variable name="guid" select="guid"/> 
    977                <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    978                <xsl:variable name="eventRootClass"> 
    979                        <xsl:choose> 
    980                                <!-- Otherwise: Alternating colors for all standard events --> 
    981                                <xsl:when test="position() = 1">event firstEvent</xsl:when> 
    982                                <xsl:otherwise>event</xsl:otherwise> 
    983                        </xsl:choose> 
    984                </xsl:variable> 
    985                <xsl:variable name="eventClass"> 
    986                        <xsl:choose> 
    987                                <!-- Special styles for the month grid --> 
    988                                <xsl:when test="status='CANCELLED'">eventCancelled</xsl:when> 
    989                                <xsl:when test="status='TENTATIVE'">eventTentative</xsl:when> 
    990                                <!-- Otherwise: Alternating colors for all standard events --> 
    991                                <xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when> 
    992                                <xsl:otherwise>eventLinkB</xsl:otherwise> 
    993                        </xsl:choose> 
    994                </xsl:variable> 
    995                <!-- User defined subscription styles. 
    996                                 These are set in the add/modify subscription forms which 
    997                                 rely (in this stylesheet) on subColors.css; if present, these 
    998                                 override the background-color set by eventClass. User styles should 
    999                                 not be used for cancelled events (tentative is ok). --> 
    1000                <xsl:variable name="subColor"> 
    1001                        <xsl:choose> 
    1002                                 <xsl:when test="status != 'CANCELLED' and 
    1003                                                                                                subscription/style != '' and 
    1004                                                                                                subscription/style != 'default'"><xsl:value-of select="subscription/style"/></xsl:when> 
    1005                                <xsl:otherwise></xsl:otherwise> 
    1006                        </xsl:choose> 
    1007                </xsl:variable> 
    1008                <li> 
    1009                        <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" 
    1010                                class="{$eventRootClass} {$eventClass} {$subColor}"> 
    1011                                <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
    1012                                <xsl:value-of select="summary"/> 
    1013                                <xsl:variable name="eventTipClass"> 
    1014                                        <xsl:choose> 
    1015                                                <xsl:when test="$dayPos &gt; 5">eventTipReverse</xsl:when> 
    1016                                                <xsl:otherwise>eventTip</xsl:otherwise> 
    1017                                        </xsl:choose> 
    1018                                </xsl:variable> 
    1019                                <span class="{$eventTipClass}"> 
    1020                                        <xsl:if test="status='CANCELLED'"><span class="eventTipStatusCancelled">CANCELLED</span></xsl:if> 
    1021                                        <xsl:if test="status='TENTATIVE'"><span class="eventTipStatusTentative">TENTATIVE</span></xsl:if> 
    1022                                        <strong><xsl:value-of select="summary"/></strong><br/> 
    1023                                        Time: 
    1024                                        <xsl:choose> 
    1025                                                <xsl:when test="start/allday = 'false'"> 
    1026                                                        <xsl:value-of select="start/time"/> 
    1027                                                        <xsl:if test="start/time != end/time"> 
    1028                                                                - <xsl:value-of select="end/time"/> 
    1029                                                        </xsl:if> 
    1030                                                </xsl:when> 
    1031                                                <xsl:otherwise> 
    1032                                                        all day 
    1033                                                </xsl:otherwise> 
    1034                                        </xsl:choose><br/> 
    1035                                        <xsl:if test="location/address"> 
    1036                                                Location: <xsl:value-of select="location/address"/><br/> 
    1037                                        </xsl:if> 
    1038                                        Calendar: 
    1039                                                <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
    1040                                                <xsl:choose> 
    1041                                                        <xsl:when test="contains(calendar/path,$userPath)"> 
    1042                                                                <xsl:value-of select="substring-after(calendar/path,$userPath)"/> 
    1043                                                        </xsl:when> 
    1044                                                        <xsl:otherwise> 
    1045                                                                <xsl:value-of select="calendar/path"/> 
    1046                                                        </xsl:otherwise> 
    1047                                                </xsl:choose><br/> 
    1048                                        Type: 
    1049                                        <xsl:choose> 
    1050                                                <xsl:when test="isAnnotation"> 
    1051                                                        public event 
    1052                                                </xsl:when> 
    1053                                                <xsl:when test="calendar/owner = /bedework/userid"> 
    1054                                                        personal event, editable 
    1055                                                </xsl:when> 
    1056                                                <xsl:otherwise> 
    1057                                                        subscription 
    1058                                                </xsl:otherwise> 
    1059                                        </xsl:choose> 
    1060                                </span> 
    1061                        </a> 
    1062                </li> 
    1063        </xsl:template> 
    1064  
    1065        <!--==== YEAR VIEW ====--> 
    1066        <xsl:template name="yearView"> 
    1067                <table id="yearCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
    1068                        <tr> 
    1069                                <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &lt;= 3]"/> 
    1070                        </tr> 
    1071                        <tr> 
    1072                                <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 3) and (position() &lt;= 6)]"/> 
    1073                        </tr> 
    1074                        <tr> 
    1075                                <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 6) and (position() &lt;= 9)]"/> 
    1076                        </tr> 
    1077                        <tr> 
    1078                                <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &gt; 9]"/> 
    1079                        </tr> 
    1080                </table> 
    1081        </xsl:template> 
    1082  
    1083        <!-- year view month tables --> 
    1084        <xsl:template match="month"> 
    1085                <td> 
    1086                        <table class="yearViewMonthTable" border="0" cellpadding="0" cellspacing="0"> 
    1087                                <tr> 
    1088                                        <td colspan="8" class="monthName"> 
    1089                                                <xsl:variable name="firstDayOfMonth" select="week/day/date"/> 
    1090                                                <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$firstDayOfMonth}"> 
    1091                                                        <xsl:value-of select="longname"/> 
    1092                                                </a> 
    1093                                        </td> 
    1094                                </tr> 
    1095                                <tr> 
    1096                                        <th>&#160;</th> 
    1097                                        <xsl:for-each select="/bedework/shortdaynames/val"> 
    1098                                                <th><xsl:value-of select="."/></th> 
    1099                                        </xsl:for-each> 
    1100                                </tr> 
    1101                                <xsl:for-each select="week"> 
    1102                                        <tr> 
    1103                                                <td class="weekCell"> 
    1104                                                        <xsl:variable name="firstDayOfWeek" select="day/date"/> 
    1105                                                        <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$firstDayOfWeek}"> 
    1106                                                                <xsl:value-of select="value"/> 
    1107                                                        </a> 
    1108                                                </td> 
    1109                                                <xsl:for-each select="day"> 
    1110                                                        <xsl:choose> 
    1111                                                                <xsl:when test="filler='true'"> 
    1112                                                                        <td class="filler">&#160;</td> 
    1113                                                                </xsl:when> 
    1114                                                                <xsl:otherwise> 
    1115                                                                        <td> 
    1116                                                                                <xsl:variable name="dayDate" select="date"/> 
    1117                                                                                <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}"> 
    1118                                                                                        <xsl:value-of select="value"/> 
    1119                                                                                </a> 
    1120                                                                        </td> 
    1121                                                                </xsl:otherwise> 
    1122                                                        </xsl:choose> 
    1123                                                </xsl:for-each> 
    1124                                        </tr> 
    1125                                </xsl:for-each> 
    1126                        </table> 
    1127                </td> 
    1128        </xsl:template> 
    1129  
    1130        <!--==== SINGLE EVENT ====--> 
    1131        <xsl:template match="event"> 
    1132                <xsl:variable name="subscriptionId" select="subscription/id"/> 
    1133                <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    1134                <xsl:variable name="guid" select="guid"/> 
    1135                <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    1136                <xsl:variable name="statusClass"> 
    1137                        <xsl:choose> 
    1138                                <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> 
    1139                                <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> 
    1140                                <xsl:otherwise>bwStatusConfirmed</xsl:otherwise> 
    1141                        </xsl:choose> 
    1142                </xsl:variable> 
    1143                <h2 class="{$statusClass}"> 
    1144                        <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
    1145                        <xsl:choose> 
    1146                                <xsl:when test="link != ''"> 
    1147                                        <xsl:variable name="link" select="link"/> 
    1148                                        <a href="{$link}"> 
    1149                                                <xsl:value-of select="summary"/> 
    1150                                        </a> 
    1151                                </xsl:when> 
    1152                                <xsl:otherwise> 
    1153                                        <xsl:value-of select="summary"/> 
    1154                                </xsl:otherwise> 
    1155                        </xsl:choose> 
    1156                </h2> 
    1157                <table class="common" cellspacing="0"> 
    1158                        <tr> 
    1159                                <th colspan="2" class="commonHeader"> 
    1160                                        <div id="eventActions"> 
    1161                                                <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    1162                                                <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
    1163                                                        <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"/> 
    1164                                                        Download 
    1165                                                </a> | 
    1166                                                <xsl:choose> 
    1167                                                        <xsl:when test="isAnnotation"> 
    1168                                                                <xsl:choose> 
    1169                                                                        <xsl:when test="recurring=true"> 
    1170                                                                                <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;confirmationid={$confId}"> 
    1171                                                                                        <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    1172                                                                                        Remove All (recurring) 
    1173                                                                                </a> 
    1174                                                                        </xsl:when> 
    1175                                                                        <xsl:otherwise> 
    1176                                                                                <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
    1177                                                                                        <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    1178                                                                                        Remove 
    1179                                                                                </a> 
    1180                                                                        </xsl:otherwise> 
    1181                                                                </xsl:choose> 
    1182                                                        </xsl:when> 
    1183                                                        <xsl:when test="currentAccess/current-user-privilege-set/privilege/write-content"> 
    1184                                                                <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
    1185                                                                        <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit"/> 
    1186                                                                        Edit 
    1187                                                                </a> 
    1188                                                        </xsl:when> 
    1189                                                        <xsl:otherwise> 
    1190                                                                <a href="{$subscriptions-fetch}"> 
    1191                                                                        <img src="{$resourcesRoot}/resources/std-ical_iconSubsDkGray.gif" width="12" height="16" border="0" alt="edit"/> 
    1192                                                                        Manage Subscriptions 
    1193                                                                </a> 
    1194                                                        </xsl:otherwise> 
    1195                                                </xsl:choose> 
    1196                                                <xsl:if test="currentAccess/current-user-privilege-set/privilege/unbind and not(isAnnotation)"> 
    1197                                                        
    1198                                                        <xsl:choose> 
    1199                                                                <xsl:when test="recurring=true"> 
    1200                                                                        <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;confirmationid={$confId}"> 
    1201                                                                                <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    1202                                                                                Delete All (recurring) 
    1203                                                                        </a> 
    1204                                                                </xsl:when> 
    1205                                                                <xsl:otherwise> 
    1206                                                                        <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
    1207                                                                                <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    1208                                                                                Delete 
    1209                                                                        </a> 
    1210                                                                </xsl:otherwise> 
    1211                                                        </xsl:choose> 
    1212                                                </xsl:if> 
    1213                                        </div> 
    1214                                        <xsl:choose> 
    1215                                                <xsl:when test="calendar/owner = /bedework/userid"> 
    1216                                                        Personal Event 
    1217                                                </xsl:when> 
    1218                                                <xsl:when test="starts-with(calendar/path,'/user/')"> 
    1219                                                        User Event (<xsl:value-of select="calendar/owner"/>) 
    1220                                                </xsl:when> 
    1221                                                <xsl:when test="isAnnotation"> 
    1222                                                        Public Event 
    1223                                                </xsl:when> 
    1224                                                <xsl:otherwise> 
    1225                                                        <xsl:choose> 
    1226                                                                <xsl:when test="starts-with(calendar/path,'/public/')"> 
    1227                                                                        Public Event from Subscription 
    1228                                                                </xsl:when> 
    1229                                                                <xsl:otherwise> 
    1230                                                                        Event from Subscription 
    1231                                                                </xsl:otherwise> 
    1232                                                        </xsl:choose> 
    1233                                                </xsl:otherwise> 
    1234                                        </xsl:choose> 
    1235                                </th> 
    1236                        </tr> 
    1237                        <tr> 
    1238                                <td class="fieldname">When:</td> 
    1239                                <td class="fieldval"> 
    1240                                        <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 
    1241                                        <xsl:if test="start/allday = 'false'"> 
    1242                                                <span class="time"><xsl:value-of select="start/time"/></span> 
    1243                                        </xsl:if> 
    1244                                        <xsl:if test="(end/longdate != start/longdate) or 
    1245                                                                                                ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 
    1246                                        <xsl:if test="end/longdate != start/longdate"> 
    1247                                                <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 
    1248                                        </xsl:if> 
    1249                                        <xsl:choose> 
    1250                                                <xsl:when test="start/allday = 'true'"> 
    1251                                                        <span class="time"><em>(all day)</em></span> 
    1252                                                </xsl:when> 
    1253                                                <xsl:when test="end/longdate != start/longdate"> 
    1254                                                        <span class="time"><xsl:value-of select="end/time"/></span> 
    1255                                                </xsl:when> 
    1256                                                <xsl:when test="end/time != start/time"> 
    1257                                                        <span class="time"><xsl:value-of select="end/time"/></span> 
    1258                                                </xsl:when> 
    1259                                        </xsl:choose> 
    1260                                </td> 
    1261                                <!--<th class="icon" rowspan="2"> 
    1262                                        <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    1263                                        <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
    1264                                                <img src="{$resourcesRoot}/resources/std-ical-icon.gif" width="20" height="26" border="0" align="left" alt="Download this event"/> 
    1265                                        </a> 
    1266                                </th>--> 
    1267                        </tr> 
    1268                        <tr> 
    1269                                <td class="fieldname">Where:</td> 
    1270                                <td class="fieldval"> 
    1271                                        <xsl:choose> 
    1272                                                <xsl:when test="location/link=''"> 
    1273                                                        <xsl:value-of select="location/address"/> 
    1274                                                </xsl:when> 
    1275                                                <xsl:otherwise> 
    1276                                                        <xsl:variable name="locationLink" select="location/link"/> 
    1277                                                        <a href="{$locationLink}"> 
    1278                                                                <xsl:value-of select="location/address"/> 
    1279                                                        </a> 
    1280                                                </xsl:otherwise> 
    1281                                        </xsl:choose> 
    1282                                        <xsl:if test="location/subaddress!=''"> 
    1283                                                <br/><xsl:value-of select="location/subaddress"/> 
    1284                                        </xsl:if> 
    1285                                </td> 
    1286                        </tr> 
    1287                        <tr> 
    1288                                <td class="fieldname">Description:</td> 
    1289                                <td class="fieldval"> 
    1290                                        <xsl:call-template name="replace"> 
    1291                                                <xsl:with-param name="string" select="description"/> 
    1292                                                <xsl:with-param name="pattern" select="'&#xA;'"/> 
    1293                                                <xsl:with-param name="replacement"><br/></xsl:with-param> 
    1294                                        </xsl:call-template> 
    1295                                </td> 
    1296                        </tr> 
    1297                        <xsl:if test="status !='' and status != 'CONFIRMED'"> 
    1298                                <tr> 
    1299                                        <td class="fieldname">Status:</td> 
    1300                                        <td class="fieldval"> 
    1301                                                <xsl:value-of select="status"/> 
    1302                                        </td> 
    1303                                </tr> 
    1304                        </xsl:if> 
    1305                        <xsl:if test="organizer"> 
    1306                                <tr> 
    1307                                        <td class="fieldname">Organizer:</td> 
    1308                                        <xsl:variable name="organizerUri" select="organizer/organizerUri"/> 
    1309                                        <td class="fieldval"> 
    1310                                                <strong> 
    1311                                                        <a href="{$organizerUri}"> 
    1312                                                                <xsl:value-of select="organizer/cn"/> 
    1313                                                        </a> 
    1314                                                </strong> 
    1315                                        </td> 
    1316                                </tr> 
    1317                        </xsl:if> 
    1318                        <xsl:if test="attendee"> 
    1319                                <tr> 
    1320                                        <td class="fieldname">Attendees:</td> 
    1321                                        <td class="fieldval"> 
    1322                                                <table id="attendees" cellspacing="0"> 
    1323                                                        <tr> 
    1324                                                                <th>role</th> 
    1325                                                                <th>status</th> 
    1326                                                                <th>attendee</th> 
    1327                                                        </tr> 
    1328                                                        <xsl:for-each select="attendee"> 
    1329                                                                <xsl:sort select="cn" order="ascending" case-order="upper-first"/> 
    1330                                                                <tr> 
    1331                                                                        <td class="role"> 
    1332                                                                                <xsl:value-of select="role"/> 
    1333                                                                        </td> 
    1334                                                                        <td class="status"> 
    1335                                                                                <xsl:value-of select="partstat"/> 
    1336                                                                        </td> 
    1337                                                                        <td> 
    1338                                                                                <xsl:variable name="attendeeUri" select="attendeeUri"/> 
    1339                                                                                <a href="{$attendeeUri}"><xsl:value-of select="cn"/></a> 
    1340                                                                        </td> 
    1341                                                                </tr> 
    1342                                                        </xsl:for-each> 
    1343                                                </table> 
    1344                                        </td> 
    1345                                </tr> 
    1346                        </xsl:if> 
    1347                        <xsl:if test="cost!=''"> 
    1348                                <tr> 
    1349                                        <td class="fieldname">Cost:</td> 
    1350                                        <td class="fieldval"><xsl:value-of select="cost"/></td> 
    1351                                </tr> 
    1352                        </xsl:if> 
    1353                        <xsl:if test="link != ''"> 
    1354                                <tr> 
    1355                                        <td class="fieldname">See:</td> 
    1356                                        <td class="fieldval"> 
    1357                                                <xsl:variable name="link" select="link"/> 
    1358                                                <a href="{$link}"><xsl:value-of select="link"/></a> 
    1359                                        </td> 
    1360                                </tr> 
    1361                        </xsl:if> 
    1362                        <xsl:if test="sponsor/name!='none'"> 
    1363                                <tr> 
    1364                                        <td class="fieldname">Contact:</td> 
    1365                                        <td class="fieldval"> 
    1366                                                <xsl:choose> 
    1367                                                        <xsl:when test="sponsor/link=''"> 
    1368                                                                <xsl:value-of select="sponsor/name"/> 
    1369                                                        </xsl:when> 
    1370                                                        <xsl:otherwise> 
    1371                                                                <xsl:variable name="sponsorLink" select="sponsor/link"/> 
    1372                                                                <a href="{$sponsorLink}"> 
    1373                                                                        <xsl:value-of select="sponsor/name"/> 
    1374                                                                </a> 
    1375                                                        </xsl:otherwise> 
    1376                                                </xsl:choose> 
    1377                                                <xsl:if test="sponsor/phone!=''"> 
    1378                                                        <br /><xsl:value-of select="sponsor/phone"/> 
    1379                                                </xsl:if> 
    1380                                                <xsl:if test="sponsor/email!=''"> 
    1381                                                        <br /> 
    1382                                                        <xsl:variable name="email" select="sponsor/email"/> 
    1383                                                        <xsl:variable name="subject" select="summary"/> 
    1384                                                        <a href="mailto:{$email}&amp;subject={$subject}"> 
    1385                                                                <xsl:value-of select="sponsor/email"/> 
    1386                                                        </a> 
    1387                                                </xsl:if> 
    1388                                        </td> 
    1389                                </tr> 
    1390                        </xsl:if> 
    1391                        <xsl:if test="calendar/path!=''"> 
    1392                                <tr> 
    1393                                        <td class="fieldname">Calendar:</td> 
    1394                                        <td class="fieldval"> 
    1395                                                <xsl:variable name="calUrl" select="calendar/encodedPath"/> 
    1396                                                <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
    1397                                                <a href="{$setSelection}&amp;calUrl={$calUrl}"> 
    1398                                                        <xsl:choose> 
    1399                                                                <xsl:when test="contains(calendar/path,$userPath)"> 
    1400                                                                        <xsl:value-of select="substring-after(calendar/path,$userPath)"/> 
    1401                                                                </xsl:when> 
    1402                                                                <xsl:otherwise> 
    1403                                                                        <xsl:value-of select="calendar/path"/> 
    1404                                                                </xsl:otherwise> 
    1405                                                        </xsl:choose> 
    1406                                                </a> 
    1407                                        </td> 
    1408                                </tr> 
    1409                        </xsl:if> 
    1410                        <tr> 
    1411                                <td class="fieldname filler">&#160;</td> 
    1412                                <td class="fieldval">&#160;</td> 
    1413                        </tr> 
    1414                </table> 
    1415        </xsl:template> 
     344    </h3> 
     345    <ul id="myViews"> 
     346      <xsl:choose> 
     347        <xsl:when test="/bedework/views/view"> 
     348          <xsl:for-each select="/bedework/views/view"> 
     349            <xsl:variable name="viewName" select="name"/> 
     350            <xsl:choose> 
     351              <xsl:when test="/bedework/selectionState/selectionType = 'view' 
     352                              and name=/bedework/selectionState/view/name"> 
     353                <li class="selected"><a href="{$setSelection}&amp;viewName={$viewName}"><xsl:value-of select="name"/></a></li> 
     354              </xsl:when> 
     355              <xsl:otherwise> 
     356                <li><a href="{$setSelection}&amp;viewName={$viewName}"><xsl:value-of select="name"/></a></li> 
     357              </xsl:otherwise> 
     358            </xsl:choose> 
     359          </xsl:for-each> 
     360        </xsl:when> 
     361        <xsl:otherwise> 
     362          <li class="none">no views</li> 
     363        </xsl:otherwise> 
     364      </xsl:choose> 
     365    </ul> 
     366 
     367    <h3> 
     368      <a href="{$calendar-fetch}"> 
     369        <img alt="manage calendars" src="{$resourcesRoot}/resources/glassFill-icon-menuButton.gif" width="12" height="11" border="0"/> calendars 
     370      </a> 
     371    </h3> 
     372    <ul class="calendarTree"> 
     373      <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar" mode="myCalendars"/> 
     374    </ul> 
     375 
     376    <h3> 
     377      <a href="{$subscriptions-fetch}" title="manage subscriptions"> 
     378        <img alt="manage subscriptions" src="{$resourcesRoot}/resources/glassFill-icon-menuButton.gif" width="12" height="11" border="0"/> 
     379        subscriptions 
     380      </a> 
     381    </h3> 
     382    <ul class="calendarTree"> 
     383      <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
     384      <xsl:choose> 
     385        <xsl:when test="/bedework/mySubscriptions/subscription[not(contains(uri,$userPath))]"> 
     386          <xsl:apply-templates select="/bedework/mySubscriptions/subscription[not(contains(uri,$userPath))]" mode="mySubscriptions"/> 
     387        </xsl:when> 
     388        <xsl:otherwise> 
     389          <li class="none">no subscriptions</li> 
     390        </xsl:otherwise> 
     391      </xsl:choose> 
     392    </ul> 
     393 
     394    <h3>options</h3> 
     395    <ul id="sideBarMenu"> 
     396      <li><a href="{$manageLocations}">Manage Locations</a></li> 
     397      <li><a href="{$prefs-fetchForUpdate}">Preferences</a></li> 
     398    </ul> 
     399  </xsl:template> 
     400 
     401  <xsl:template name="tabs"> 
     402    <xsl:choose> 
     403      <xsl:when test="/bedework/page='eventscalendar' or /bedework/page='freeBusy'"> 
     404        <xsl:variable name="navAction"> 
     405          <xsl:choose> 
     406            <xsl:when test="/bedework/page='freeBusy'"><xsl:value-of select="$freeBusy-fetch"/></xsl:when> 
     407            <xsl:otherwise><xsl:value-of select="$setViewPeriod"/></xsl:otherwise> 
     408          </xsl:choose> 
     409        </xsl:variable> 
     410        <table border="0" cellpadding="0" cellspacing="0" id="tabsTable"> 
     411          <tr> 
     412            <td> 
     413              <xsl:choose> 
     414                <xsl:when test="/bedework/periodname='Day'"> 
     415                  <a href="{$navAction}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-day-on.gif" width="91" height="20" border="0" alt="DAY"/></a> 
     416                </xsl:when> 
     417                <xsl:otherwise> 
     418                  <a href="{$navAction}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a> 
     419                </xsl:otherwise> 
     420              </xsl:choose> 
     421            </td> 
     422            <td> 
     423              <xsl:choose> 
     424                <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
     425                  <a href="{$navAction}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-week-on.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
     426                </xsl:when> 
     427                <xsl:otherwise> 
     428                  <a href="{$navAction}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
     429                </xsl:otherwise> 
     430              </xsl:choose> 
     431            </td> 
     432            <td> 
     433              <xsl:choose> 
     434                <xsl:when test="/bedework/periodname='Month'"> 
     435                  <a href="{$navAction}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-month-on.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
     436                </xsl:when> 
     437                <xsl:otherwise> 
     438                  <a href="{$navAction}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
     439                </xsl:otherwise> 
     440              </xsl:choose> 
     441            </td> 
     442            <td> 
     443              <xsl:choose> 
     444                <!-- don't allow switching to year for free busy view, so only use setViewPeriod action --> 
     445                <xsl:when test="/bedework/periodname='Year'"> 
     446                  <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-year-on.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
     447                </xsl:when> 
     448                <xsl:otherwise> 
     449                  <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
     450                </xsl:otherwise> 
     451              </xsl:choose> 
     452            </td> 
     453            <td class="rightCell"> 
     454              logged in as 
     455              <xsl:text> </xsl:text> 
     456              <strong><xsl:value-of select="/bedework/userid"/></strong> 
     457              <xsl:text> </xsl:text> 
     458              <span class="logout"><a href="{$setup}&amp;logout=true">logout</a></span> 
     459            </td> 
     460          </tr> 
     461        </table> 
     462      </xsl:when> 
     463      <xsl:otherwise> 
     464        <table border="0" cellpadding="0" cellspacing="0" id="tabsTable"> 
     465          <tr> 
     466            <td> 
     467              <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-day-off.gif" width="91" height="20" border="0" alt="DAY"/></a> 
     468            </td> 
     469            <td> 
     470              <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
     471            </td> 
     472            <td> 
     473              <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
     474            </td> 
     475            <td> 
     476              <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
     477            </td> 
     478            <td class="rightCell"> 
     479              logged in as 
     480              <xsl:text> </xsl:text> 
     481              <strong><xsl:value-of select="/bedework/userid"/></strong> 
     482              <xsl:text> </xsl:text> 
     483              <span class="logout"><a href="{$setup}&amp;logout=true">logout</a></span> 
     484            </td> 
     485          </tr> 
     486        </table> 
     487      </xsl:otherwise> 
     488    </xsl:choose> 
     489  </xsl:template> 
     490 
     491  <xsl:template name="navigation"> 
     492    <xsl:variable name="navAction"> 
     493      <xsl:choose> 
     494        <xsl:when test="/bedework/page='freeBusy'"><xsl:value-of select="$freeBusy-fetch"/></xsl:when> 
     495        <xsl:otherwise><xsl:value-of select="$setViewPeriod"/></xsl:otherwise> 
     496      </xsl:choose> 
     497    </xsl:variable> 
     498    <table border="0" cellpadding="0" cellspacing="0" id="navigationBarTable"> 
     499      <tr> 
     500        <td class="leftCell"> 
     501          <a href="{$navAction}&amp;date={$prevdate}"><img src="{$resourcesRoot}/resources/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a> 
     502          <a href="{$navAction}&amp;date={$nextdate}"><img src="{$resourcesRoot}/resources/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a> 
     503          <xsl:choose> 
     504            <xsl:when test="/bedework/periodname='Year'"> 
     505              <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
     506            </xsl:when> 
     507            <xsl:when test="/bedework/periodname='Month'"> 
     508              <xsl:value-of select="/bedework/firstday/monthname"/>, <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
     509            </xsl:when> 
     510            <xsl:when test="/bedework/periodname='Week'"> 
     511              Week of <xsl:value-of select="substring-after(/bedework/firstday/longdate,', ')"/> 
     512            </xsl:when> 
     513            <xsl:otherwise> 
     514              <xsl:value-of select="/bedework/firstday/longdate"/> 
     515            </xsl:otherwise> 
     516          </xsl:choose> 
     517        </td> 
     518        <td class="todayButton"> 
     519          <a href="{$navAction}&amp;viewType=todayView&amp;date={$curdate}"> 
     520            <img src="{$resourcesRoot}/resources/std-button-today-off.gif" width="54" height="22" border="0" alt="Go to Today" align="left"/> 
     521          </a> 
     522        </td> 
     523        <td align="right" class="gotoForm"> 
     524          <form name="calForm" method="get" action="{$navAction}"> 
     525            <table border="0" cellpadding="0" cellspacing="0"> 
     526              <tr> 
     527                <xsl:if test="/bedework/periodname!='Year'"> 
     528                  <td> 
     529                    <select name="viewStartDate.month"> 
     530                      <xsl:for-each select="/bedework/monthvalues/val"> 
     531                        <xsl:variable name="temp" select="."/> 
     532                        <xsl:variable name="pos" select="position()"/> 
     533                        <xsl:choose> 
     534                          <xsl:when test="/bedework/monthvalues[start=$temp]"> 
     535                            <option value="{$temp}" selected="selected"> 
     536                              <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
     537                            </option> 
     538                          </xsl:when> 
     539                          <xsl:otherwise> 
     540                            <option value="{$temp}"> 
     541                              <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
     542                            </option> 
     543                          </xsl:otherwise> 
     544                        </xsl:choose> 
     545                      </xsl:for-each> 
     546                    </select> 
     547                  </td> 
     548                  <xsl:if test="/bedework/periodname!='Month'"> 
     549                    <td> 
     550                      <select name="viewStartDate.day"> 
     551                        <xsl:for-each select="/bedework/dayvalues/val"> 
     552                          <xsl:variable name="temp" select="."/> 
     553                          <xsl:variable name="pos" select="position()"/> 
     554                          <xsl:choose> 
     555                            <xsl:when test="/bedework/dayvalues[start=$temp]"> 
     556                              <option value="{$temp}" selected="selected"> 
     557                                <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
     558                              </option> 
     559                            </xsl:when> 
     560                            <xsl:otherwise> 
     561                              <option value="{$temp}"> 
     562                                <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
     563                              </option> 
     564                            </xsl:otherwise> 
     565                          </xsl:choose> 
     566                        </xsl:for-each> 
     567                      </select> 
     568                    </td> 
     569                  </xsl:if> 
     570                </xsl:if> 
     571                <td> 
     572                  <xsl:variable name="temp" select="/bedework/yearvalues/start"/> 
     573                  <input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/> 
     574                </td> 
     575                <td> 
     576                  <input name="submit" type="submit" value="go"/> 
     577                </td> 
     578              </tr> 
     579            </table> 
     580          </form> 
     581        </td> 
     582      </tr> 
     583    </table> 
     584  </xsl:template> 
     585 
     586  <xsl:template name="utilBar"> 
     587    <table width="100%" border="0" cellpadding="0" cellspacing="0" id="utilBarTable"> 
     588      <tr> 
     589        <td class="leftCell"> 
     590          <xsl:choose> 
     591            <xsl:when test="/bedework/periodname = 'day'"> 
     592              <xsl:variable name="date" select="/bedework/firstday/date"/> 
     593              <a href="{$initEvent}&amp;startdate={$date}" title="add event"> 
     594                  <img src="{$resourcesRoot}/resources/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="add event"/> 
     595                  add event 
     596              </a> 
     597            </xsl:when> 
     598            <xsl:otherwise> 
     599              <a href="{$initEvent}" title="add event"> 
     600                  <img src="{$resourcesRoot}/resources/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="add event"/> 
     601                  add event 
     602              </a> 
     603            </xsl:otherwise> 
     604          </xsl:choose> 
     605          <a href="{$initUpload}" title="upload event"> 
     606              <img src="{$resourcesRoot}/resources/std-icalUpload-icon-small.gif" width="12" height="16" border="0" alt="upload event"/> 
     607              upload 
     608          </a> 
     609        </td> 
     610        <td class="rightCell"> 
     611 
     612          <!-- show free / busy --> 
     613          <xsl:choose> 
     614            <xsl:when test="/bedework/periodname!='Year'"> 
     615              <xsl:choose> 
     616                <xsl:when test="/bedework/page='freeBusy'"> 
     617                  <a href="{$setViewPeriod}&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-button-events.gif" width="70" height="21" border="0" alt="show events"/></a> 
     618                </xsl:when> 
     619                <xsl:otherwise> 
     620                  <a href="{$freeBusy-fetch}&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-button-freebusy.gif" width="70" height="21" border="0" alt="show free/busy"/></a> 
     621                </xsl:otherwise> 
     622              </xsl:choose> 
     623            </xsl:when> 
     624            <xsl:otherwise> 
     625              <img src="{$resourcesRoot}/resources/std-button-freebusy-off.gif" width="70" height="21" border="0" alt="show free/busy"/> 
     626            </xsl:otherwise> 
     627          </xsl:choose> 
     628 
     629          <!-- toggle list / calendar view --> 
     630          <xsl:choose> 
     631            <xsl:when test="/bedework/periodname='Day'"> 
     632              <img src="{$resourcesRoot}/resources/std-button-listview-off.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
     633            </xsl:when> 
     634            <xsl:when test="/bedework/periodname='Year'"> 
     635              <img src="{$resourcesRoot}/resources/std-button-calview-off.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
     636            </xsl:when> 
     637            <xsl:when test="/bedework/periodname='Month'"> 
     638              <xsl:choose> 
     639                <xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> 
     640                  <a href="{$setup}&amp;setappvar=monthViewMode(cal)" title="toggle list/calendar view"> 
     641                    <img src="{$resourcesRoot}/resources/std-button-calview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
     642                  </a> 
     643                </xsl:when> 
     644                <xsl:otherwise> 
     645                  <a href="{$setup}&amp;setappvar=monthViewMode(list)" title="toggle list/calendar view"> 
     646                    <img src="{$resourcesRoot}/resources/std-button-listview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
     647                  </a> 
     648                </xsl:otherwise> 
     649              </xsl:choose> 
     650            </xsl:when> 
     651            <xsl:otherwise> 
     652              <xsl:choose> 
     653                <xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> 
     654                  <a href="{$setup}&amp;setappvar=weekViewMode(cal)" title="toggle list/calendar view"> 
     655                    <img src="{$resourcesRoot}/resources/std-button-calview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
     656                  </a> 
     657                </xsl:when> 
     658                <xsl:otherwise> 
     659                  <a href="{$setup}&amp;setappvar=weekViewMode(list)" title="toggle list/calendar view"> 
     660                    <img src="{$resourcesRoot}/resources/std-button-listview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
     661                  </a> 
     662                </xsl:otherwise> 
     663              </xsl:choose> 
     664            </xsl:otherwise> 
     665          </xsl:choose> 
     666 
     667          <!-- summary / detailed mode toggle --> 
     668          <xsl:choose> 
     669            <xsl:when test="/bedework/periodname='Year' or 
     670                              (/bedework/periodname='Month' and 
     671                              (/bedework/appvar[key='monthViewMode']/value='cal' or 
     672                              not(/bedework/appvar[key='monthViewMode']))) or 
     673                              (/bedework/periodname='Week' and 
     674                              (/bedework/appvar[key='weekViewMode']/value='cal' or 
     675                              not(/bedework/appvar[key='weekViewMode'])))"> 
     676              <xsl:choose> 
     677                <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
     678                  <img src="{$resourcesRoot}/resources/std-button-summary-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
     679                </xsl:when> 
     680                <xsl:otherwise> 
     681                  <img src="{$resourcesRoot}/resources/std-button-details-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
     682                </xsl:otherwise> 
     683              </xsl:choose> 
     684            </xsl:when> 
     685            <xsl:otherwise> 
     686              <xsl:choose> 
     687                <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
     688                  <a href="{$setup}&amp;setappvar=summaryMode(summary)" title="toggle summary/detailed view"> 
     689                    <img src="{$resourcesRoot}/resources/std-button-summary.gif" width="62" height="21" border="0" alt="toggle summary/detailed view"/> 
     690                  </a> 
     691                </xsl:when> 
     692                <xsl:otherwise> 
     693                  <a href="{$setup}&amp;setappvar=summaryMode(details)" title="toggle summary/detailed view"> 
     694                    <img src="{$resourcesRoot}/resources/std-button-details.gif" width="62" height="21" border="0" alt="toggle summary/detailed view"/> 
     695                  </a> 
     696                </xsl:otherwise> 
     697              </xsl:choose> 
     698            </xsl:otherwise> 
     699          </xsl:choose> 
     700 
     701          <!-- refresh button --> 
     702          <a href="{$setup}"><img src="{$resourcesRoot}/resources/std-button-refresh.gif" width="70" height="21" border="0" alt="refresh view"/></a> 
     703        </td> 
     704      </tr> 
     705    </table> 
     706  </xsl:template> 
     707 
     708  <!--==== LIST VIEW  (for day, week, and month) ====--> 
     709  <xsl:template name="listView"> 
     710    <table id="listTable" border="0" cellpadding="0" cellspacing="0"> 
     711      <xsl:choose> 
     712        <xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> 
     713          <tr> 
     714            <td class="noEventsCell"> 
     715              No events to display. 
     716            </td> 
     717          </tr> 
     718        </xsl:when> 
     719        <xsl:otherwise> 
     720          <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[event]"> 
     721            <xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''"> 
     722              <tr> 
     723                <td colspan="6" class="dateRow"> 
     724                  <xsl:variable name="date" select="date"/> 
     725                  <a href="{$initEvent}&amp;startdate={$date}" class="listAdd"> 
     726                    add event 
     727                  </a> 
     728                  <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$date}"> 
     729                    <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> 
     730                  </a> 
     731                </td> 
     732              </tr> 
     733            </xsl:if> 
     734            <xsl:for-each select="event"> 
     735              <xsl:variable name="id" select="id"/> 
     736              <xsl:variable name="subscriptionId" select="subscription/id"/> 
     737              <xsl:variable name="calPath" select="calendar/encodedPath"/> 
     738              <xsl:variable name="guid" select="guid"/> 
     739              <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     740              <tr> 
     741                <xsl:variable name="dateRangeStyle"> 
     742                  <xsl:choose> 
     743                    <xsl:when test="start/shortdate = parent::day/shortdate"> 
     744                      <xsl:choose> 
     745                        <xsl:when test="start/allday = 'true'">dateRangeCrossDay</xsl:when> 
     746                        <xsl:when test="start/hour24 &lt; 6">dateRangeEarlyMorning</xsl:when> 
     747                        <xsl:when test="start/hour24 &lt; 12">dateRangeMorning</xsl:when> 
     748                        <xsl:when test="start/hour24 &lt; 18">dateRangeAfternoon</xsl:when> 
     749                        <xsl:otherwise>dateRangeEvening</xsl:otherwise> 
     750                      </xsl:choose> 
     751                    </xsl:when> 
     752                    <xsl:otherwise>dateRangeCrossDay</xsl:otherwise> 
     753                  </xsl:choose> 
     754                </xsl:variable> 
     755                <xsl:choose> 
     756                  <xsl:when test="start/allday = 'true' and 
     757                                  start/shortdate = end/shortdate"> 
     758                    <td class="{$dateRangeStyle} center" colspan="3"> 
     759                      all day 
     760                    </td> 
     761                  </xsl:when> 
     762                  <xsl:when test="start/shortdate = end/shortdate and 
     763                                  start/time = end/time"> 
     764                    <td class="{$dateRangeStyle} center" colspan="3"> 
     765                      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     766                        <xsl:value-of select="start/time"/> 
     767                      </a> 
     768                    </td> 
     769                  </xsl:when> 
     770                  <xsl:otherwise> 
     771                    <td class="{$dateRangeStyle} right"> 
     772                      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     773                      <xsl:choose> 
     774                        <xsl:when test="start/allday = 'true' and 
     775                                        parent::day/shortdate = start/shortdate"> 
     776                          today 
     777                        </xsl:when> 
     778                        <xsl:when test="parent::day/shortdate != start/shortdate"> 
     779                          <span class="littleArrow">&#171;</span>&#160; 
     780                          <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> 
     781                        </xsl:when> 
     782                        <xsl:otherwise> 
     783                          <xsl:value-of select="start/time"/> 
     784                        </xsl:otherwise> 
     785                      </xsl:choose> 
     786                      </a> 
     787                    </td> 
     788                    <td class="{$dateRangeStyle} center"> 
     789                      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">-</a> 
     790                    </td> 
     791                    <td class="{$dateRangeStyle} left"> 
     792                      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     793                      <xsl:choose> 
     794                        <xsl:when test="end/allday = 'true' and 
     795                                        parent::day/shortdate = end/shortdate"> 
     796                          today 
     797                        </xsl:when> 
     798                        <xsl:when test="parent::day/shortdate != end/shortdate"> 
     799                          <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> 
     800                          &#160;<span class="littleArrow">&#187;</span> 
     801                        </xsl:when> 
     802                        <xsl:otherwise> 
     803                          <xsl:value-of select="end/time"/> 
     804                        </xsl:otherwise> 
     805                      </xsl:choose> 
     806                      </a> 
     807                    </td> 
     808                  </xsl:otherwise> 
     809                </xsl:choose> 
     810                <xsl:variable name="descriptionClass"> 
     811                  <xsl:choose> 
     812                    <xsl:when test="status='CANCELLED'">description bwStatusCancelled</xsl:when> 
     813                    <xsl:when test="status='TENTATIVE'">description bwStatusTentative</xsl:when> 
     814                    <xsl:otherwise>description</xsl:otherwise> 
     815                  </xsl:choose> 
     816                </xsl:variable> 
     817                <xsl:variable name="subStyle" select="subscription/style"/> 
     818                <td class="{$descriptionClass} {$subStyle}"> 
     819                  <xsl:if test="status='CANCELLED'"><strong>CANCELLED: </strong></xsl:if> 
     820                  <xsl:choose> 
     821                    <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
     822                      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     823                        <strong> 
     824                          <xsl:value-of select="summary"/>: 
     825                        </strong> 
     826                        <xsl:value-of select="description"/>&#160; 
     827                        <em> 
     828                          <xsl:value-of select="location/address"/> 
     829                          <xsl:if test="location/subaddress != ''"> 
     830                            , <xsl:value-of select="location/subaddress"/> 
     831                          </xsl:if>.&#160; 
     832                          <xsl:if test="cost!=''"> 
     833                            <xsl:value-of select="cost"/>.&#160; 
     834                          </xsl:if> 
     835                          <xsl:if test="sponsor/name!='none'"> 
     836                            Contact: <xsl:value-of select="sponsor/name"/> 
     837                          </xsl:if> 
     838                        </em> 
     839                      </a> 
     840                      <xsl:if test="link != ''"> 
     841                        <xsl:variable name="link" select="link"/> 
     842                        <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> 
     843                      </xsl:if> 
     844                    </xsl:when> 
     845                    <xsl:otherwise> 
     846                      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
     847                        <xsl:value-of select="summary"/> 
     848                        <xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> 
     849                      </a> 
     850                    </xsl:otherwise> 
     851                  </xsl:choose> 
     852                </td> 
     853                <td class="eventLinks"> 
     854                  <xsl:call-template name="eventLinks"/> 
     855                </td> 
     856                <td class="smallIcon"> 
     857                  <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
     858                  <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
     859                    <img src="{$resourcesRoot}/resources/std-ical_icon_small.gif" width="12" height="16" border="0" alt="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"/> 
     860                  </a> 
     861                </td> 
     862              </tr> 
     863            </xsl:for-each> 
     864          </xsl:for-each> 
     865        </xsl:otherwise> 
     866      </xsl:choose> 
     867    </table> 
     868  </xsl:template> 
     869 
     870  <xsl:template name="eventLinks"> 
     871    <xsl:variable name="subscriptionId" select="subscription/id"/> 
     872    <xsl:variable name="calPath" select="calendar/encodedPath"/> 
     873    <xsl:variable name="guid" select="guid"/> 
     874    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     875    <xsl:choose> 
     876      <xsl:when test="isAnnotation"> 
     877        <xsl:choose> 
     878          <xsl:when test="recurring=true"> 
     879            <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;confirmationid={$confId}">Remove All</a> 
     880          </xsl:when> 
     881          <xsl:otherwise> 
     882            <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}">Remove</a> 
     883          </xsl:otherwise> 
     884        </xsl:choose> 
     885      </xsl:when> 
     886      <xsl:when test="calendar/owner = /bedework/userid"> 
     887        <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">Edit</a> | 
     888        <xsl:choose> 
     889          <xsl:when test="recurring=true"> 
     890            <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}">Delete All</a> 
     891          </xsl:when> 
     892          <xsl:otherwise> 
     893            <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}">Delete</a> 
     894          </xsl:otherwise> 
     895        </xsl:choose> 
     896      </xsl:when> 
     897      <xsl:otherwise> 
     898        <a href="{$subscriptions-fetch}">Subscription</a> 
     899      </xsl:otherwise> 
     900    </xsl:choose> 
     901  </xsl:template> 
     902 
     903  <!--==== WEEK CALENDAR VIEW ====--> 
     904  <xsl:template name="weekView"> 
     905    <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
     906      <tr> 
     907        <xsl:for-each select="/bedework/daynames/val"> 
     908          <th class="dayHeading"><xsl:value-of select="."/></th> 
     909        </xsl:for-each> 
     910      </tr> 
     911      <tr> 
     912        <xsl:for-each select="/bedework/eventscalendar/year/month/week/day"> 
     913          <xsl:variable name="dayPos" select="position()"/> 
     914          <xsl:if test="filler='false'"> 
     915            <td> 
     916              <xsl:variable name="dayDate" select="date"/> 
     917              <a href="{$initEvent}&amp;startdate={$dayDate}" class="gridAdd" title="add event"> 
     918                <img src="{$resourcesRoot}/resources/addEvent-forGrid-icon.gif" width="9" height="10" border="0" alt="add event"/> 
     919              </a> 
     920              <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}" class="dayLink" title="go to day"> 
     921                <xsl:value-of select="value"/> 
     922              </a> 
     923              <ul> 
     924                <xsl:apply-templates select="event" mode="calendarLayout"> 
     925                  <xsl:with-param name="dayPos" select="$dayPos"/> 
     926                </xsl:apply-templates> 
     927              </ul> 
     928            </td> 
     929          </xsl:if> 
     930        </xsl:for-each> 
     931      </tr> 
     932    </table> 
     933  </xsl:template> 
     934 
     935  <!--==== MONTH CALENDAR VIEW ====--> 
     936  <xsl:template name="monthView"> 
     937    <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
     938      <tr> 
     939        <xsl:for-each select="/bedework/daynames/val"> 
     940          <th class="dayHeading"><xsl:value-of select="."/></th> 
     941        </xsl:for-each> 
     942      </tr> 
     943      <xsl:for-each select="/bedework/eventscalendar/year/month/week"> 
     944        <tr> 
     945          <xsl:for-each select="day"> 
     946            <xsl:variable name="dayPos" select="position()"/> 
     947            <xsl:choose> 
     948              <xsl:when test="filler='true'"> 
     949                <td class="filler">&#160;</td> 
     950              </xsl:when> 
     951              <xsl:otherwise> 
     952                <td> 
     953                  <xsl:variable name="dayDate" select="date"/> 
     954                  <a href="{$initEvent}&amp;startdate={$dayDate}" class="gridAdd" title="add event"> 
     955                    <img src="{$resourcesRoot}/resources/addEvent-forGrid-icon.gif" width="10" height="10" border="0" alt="add event"/> 
     956                  </a> 
     957                  <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}" class="dayLink" title="go to day"> 
     958                    <xsl:value-of select="value"/> 
     959                  </a> 
     960                  <ul> 
     961                    <xsl:apply-templates select="event" mode="calendarLayout"> 
     962                      <xsl:with-param name="dayPos" select="$dayPos"/> 
     963                    </xsl:apply-templates> 
     964                  </ul> 
     965                </td> 
     966              </xsl:otherwise> 
     967            </xsl:choose> 
     968          </xsl:for-each> 
     969        </tr> 
     970      </xsl:for-each> 
     971    </table> 
     972  </xsl:template> 
     973 
     974  <xsl:template match="event" mode="calendarLayout"> 
     975    <xsl:param name="dayPos"/> 
     976    <xsl:variable name="subscriptionId" select="subscription/id"/> 
     977    <xsl:variable name="calPath" select="calendar/encodedPath"/> 
     978    <xsl:variable name="guid" select="guid"/> 
     979    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     980    <xsl:variable name="eventRootClass"> 
     981      <xsl:choose> 
     982        <!-- Otherwise: Alternating colors for all standard events --> 
     983        <xsl:when test="position() = 1">event firstEvent</xsl:when> 
     984        <xsl:otherwise>event</xsl:otherwise> 
     985      </xsl:choose> 
     986    </xsl:variable> 
     987    <xsl:variable name="eventClass"> 
     988      <xsl:choose> 
     989        <!-- Special styles for the month grid --> 
     990        <xsl:when test="status='CANCELLED'">eventCancelled</xsl:when> 
     991        <xsl:when test="status='TENTATIVE'">eventTentative</xsl:when> 
     992        <!-- Otherwise: Alternating colors for all standard events --> 
     993        <xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when> 
     994        <xsl:otherwise>eventLinkB</xsl:otherwise> 
     995      </xsl:choose> 
     996    </xsl:variable> 
     997    <!-- User defined subscription styles. 
     998        These are set in the add/modify subscription forms which 
     999        rely (in this stylesheet) on subColors.css; if present, these 
     1000        override the background-color set by eventClass. User styles should 
     1001        not be used for cancelled events (tentative is ok). --> 
     1002    <xsl:variable name="subColor"> 
     1003      <xsl:choose> 
     1004        <xsl:when test="status != 'CANCELLED' and 
     1005                        subscription/style != '' and 
     1006                        subscription/style != 'default'"><xsl:value-of select="subscription/style"/></xsl:when> 
     1007        <xsl:otherwise></xsl:otherwise> 
     1008      </xsl:choose> 
     1009    </xsl:variable> 
     1010    <li> 
     1011      <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" 
     1012        class="{$eventRootClass} {$eventClass} {$subColor}"> 
     1013        <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
     1014        <xsl:value-of select="summary"/> 
     1015        <xsl:variable name="eventTipClass"> 
     1016          <xsl:choose> 
     1017            <xsl:when test="$dayPos &gt; 5">eventTipReverse</xsl:when> 
     1018            <xsl:otherwise>eventTip</xsl:otherwise> 
     1019          </xsl:choose> 
     1020        </xsl:variable> 
     1021        <span class="{$eventTipClass}"> 
     1022          <xsl:if test="status='CANCELLED'"><span class="eventTipStatusCancelled">CANCELLED</span></xsl:if> 
     1023          <xsl:if test="status='TENTATIVE'"><span class="eventTipStatusTentative">TENTATIVE</span></xsl:if> 
     1024          <strong><xsl:value-of select="summary"/></strong><br/> 
     1025          Time: 
     1026          <xsl:choose> 
     1027            <xsl:when test="start/allday = 'false'"> 
     1028              <xsl:value-of select="start/time"/> 
     1029              <xsl:if test="start/time != end/time"> 
     1030                - <xsl:value-of select="end/time"/> 
     1031              </xsl:if> 
     1032            </xsl:when> 
     1033            <xsl:otherwise> 
     1034              all day 
     1035            </xsl:otherwise> 
     1036          </xsl:choose><br/> 
     1037          <xsl:if test="location/address"> 
     1038            Location: <xsl:value-of select="location/address"/><br/> 
     1039          </xsl:if> 
     1040          Calendar: 
     1041            <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
     1042            <xsl:choose> 
     1043              <xsl:when test="contains(calendar/path,$userPath)"> 
     1044                <xsl:value-of select="substring-after(calendar/path,$userPath)"/> 
     1045              </xsl:when> 
     1046              <xsl:otherwise> 
     1047                <xsl:value-of select="calendar/path"/> 
     1048              </xsl:otherwise> 
     1049            </xsl:choose><br/> 
     1050          Type: 
     1051          <xsl:choose> 
     1052            <xsl:when test="isAnnotation"> 
     1053              public event 
     1054            </xsl:when> 
     1055            <xsl:when test="calendar/owner = /bedework/userid"> 
     1056              personal event, editable 
     1057            </xsl:when> 
     1058            <xsl:otherwise> 
     1059              subscription 
     1060            </xsl:otherwise> 
     1061          </xsl:choose> 
     1062        </span> 
     1063      </a> 
     1064    </li> 
     1065  </xsl:template> 
     1066 
     1067  <!--==== YEAR VIEW ====--> 
     1068  <xsl:template name="yearView"> 
     1069    <table id="yearCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
     1070      <tr> 
     1071        <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &lt;= 3]"/> 
     1072      </tr> 
     1073      <tr> 
     1074        <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 3) and (position() &lt;= 6)]"/> 
     1075      </tr> 
     1076      <tr> 
     1077        <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 6) and (position() &lt;= 9)]"/> 
     1078      </tr> 
     1079      <tr> 
     1080        <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &gt; 9]"/> 
     1081      </tr> 
     1082    </table> 
     1083  </xsl:template> 
     1084 
     1085  <!-- year view month tables --> 
     1086  <xsl:template match="month"> 
     1087    <td> 
     1088      <table class="yearViewMonthTable" border="0" cellpadding="0" cellspacing="0"> 
     1089        <tr> 
     1090          <td colspan="8" class="monthName"> 
     1091            <xsl:variable name="firstDayOfMonth" select="week/day/date"/> 
     1092            <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$firstDayOfMonth}"> 
     1093              <xsl:value-of select="longname"/> 
     1094            </a> 
     1095          </td> 
     1096        </tr> 
     1097        <tr> 
     1098          <th>&#160;</th> 
     1099          <xsl:for-each select="/bedework/shortdaynames/val"> 
     1100            <th><xsl:value-of select="."/></th> 
     1101          </xsl:for-each> 
     1102        </tr> 
     1103        <xsl:for-each select="week"> 
     1104          <tr> 
     1105            <td class="weekCell"> 
     1106              <xsl:variable name="firstDayOfWeek" select="day/date"/> 
     1107              <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$firstDayOfWeek}"> 
     1108                <xsl:value-of select="value"/> 
     1109              </a> 
     1110            </td> 
     1111            <xsl:for-each select="day"> 
     1112              <xsl:choose> 
     1113                <xsl:when test="filler='true'"> 
     1114                  <td class="filler">&#160;</td> 
     1115                </xsl:when> 
     1116                <xsl:otherwise> 
     1117                  <td> 
     1118                    <xsl:variable name="dayDate" select="date"/> 
     1119                    <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}"> 
     1120                      <xsl:value-of select="value"/> 
     1121                    </a> 
     1122                  </td> 
     1123                </xsl:otherwise> 
     1124              </xsl:choose> 
     1125            </xsl:for-each> 
     1126          </tr> 
     1127        </xsl:for-each> 
     1128      </table> 
     1129    </td> 
     1130  </xsl:template> 
     1131 
     1132  <!--==== SINGLE EVENT ====--> 
     1133  <xsl:template match="event"> 
     1134    <xsl:variable name="subscriptionId" select="subscription/id"/> 
     1135    <xsl:variable name="calPath" select="calendar/encodedPath"/> 
     1136    <xsl:variable name="guid" select="guid"/> 
     1137    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     1138    <xsl:variable name="statusClass"> 
     1139      <xsl:choose> 
     1140        <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> 
     1141        <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> 
     1142        <xsl:otherwise>bwStatusConfirmed</xsl:otherwise> 
     1143      </xsl:choose> 
     1144    </xsl:variable> 
     1145    <h2 class="{$statusClass}"> 
     1146      <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
     1147      <xsl:choose> 
     1148        <xsl:when test="link != ''"> 
     1149          <xsl:variable name="link" select="link"/> 
     1150          <a href="{$link}"> 
     1151            <xsl:value-of select="summary"/> 
     1152          </a> 
     1153        </xsl:when> 
     1154        <xsl:otherwise> 
     1155          <xsl:value-of select="summary"/> 
     1156        </xsl:otherwise> 
     1157      </xsl:choose> 
     1158    </h2> 
     1159    <table class="common" cellspacing="0"> 
     1160      <tr> 
     1161        <th colspan="2" class="commonHeader"> 
     1162          <div id="eventActions"> 
     1163            <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
     1164            <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
     1165              <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"/> 
     1166              Download 
     1167            </a> | 
     1168            <xsl:choose> 
     1169              <xsl:when test="isAnnotation"> 
     1170                <xsl:choose> 
     1171                  <xsl:when test="recurring=true"> 
     1172                    <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;confirmationid={$confId}"> 
     1173                      <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
     1174                      Remove All (recurring) 
     1175                    </a> 
     1176                  </xsl:when> 
     1177                  <xsl:otherwise> 
     1178                    <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
     1179                      <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
     1180                      Remove 
     1181                    </a> 
     1182                  </xsl:otherwise> 
     1183                </xsl:choose> 
     1184              </xsl:when> 
     1185              <xsl:when test="currentAccess/current-user-privilege-set/privilege/write-content"> 
     1186                <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
     1187                  <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit"/> 
     1188                  Edit 
     1189                </a> 
     1190              </xsl:when> 
     1191              <xsl:otherwise> 
     1192                <a href="{$subscriptions-fetch}"> 
     1193                  <img src="{$resourcesRoot}/resources/std-ical_iconSubsDkGray.gif" width="12" height="16" border="0" alt="edit"/> 
     1194                  Manage Subscriptions 
     1195                </a> 
     1196              </xsl:otherwise> 
     1197            </xsl:choose> 
     1198            <xsl:if test="currentAccess/current-user-privilege-set/privilege/unbind and not(isAnnotation)"> 
     1199             
     1200              <xsl:choose> 
     1201                <xsl:when test="recurring=true"> 
     1202                  <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;confirmationid={$confId}"> 
     1203                    <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
     1204                    Delete All (recurring) 
     1205                  </a> 
     1206                </xsl:when> 
     1207                <xsl:otherwise> 
     1208                  <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
     1209                    <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
     1210                    Delete 
     1211                  </a> 
     1212                </xsl:otherwise> 
     1213              </xsl:choose> 
     1214            </xsl:if> 
     1215          </div> 
     1216          <xsl:choose> 
     1217            <xsl:when test="calendar/owner = /bedework/userid"> 
     1218              Personal Event 
     1219            </xsl:when> 
     1220            <xsl:when test="starts-with(calendar/path,'/user/')"> 
     1221              User Event (<xsl:value-of select="calendar/owner"/>) 
     1222            </xsl:when> 
     1223            <xsl:when test="isAnnotation"> 
     1224              Public Event 
     1225            </xsl:when> 
     1226            <xsl:otherwise> 
     1227              <xsl:choose> 
     1228                <xsl:when test="starts-with(calendar/path,'/public/')"> 
     1229                  Public Event from Subscription 
     1230                </xsl:when> 
     1231                <xsl:otherwise> 
     1232                  Event from Subscription 
     1233                </xsl:otherwise> 
     1234              </xsl:choose> 
     1235            </xsl:otherwise> 
     1236          </xsl:choose> 
     1237        </th> 
     1238      </tr> 
     1239      <tr> 
     1240        <td class="fieldname">When:</td> 
     1241        <td class="fieldval"> 
     1242          <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 
     1243          <xsl:if test="start/allday = 'false'"> 
     1244            <span class="time"><xsl:value-of select="start/time"/></span> 
     1245          </xsl:if> 
     1246          <xsl:if test="(end/longdate != start/longdate) or 
     1247                        ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 
     1248          <xsl:if test="end/longdate != start/longdate"> 
     1249            <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 
     1250          </xsl:if> 
     1251          <xsl:choose> 
     1252            <xsl:when test="start/allday = 'true'"> 
     1253              <span class="time"><em>(all day)</em></span> 
     1254            </xsl:when> 
     1255            <xsl:when test="end/longdate != start/longdate"> 
     1256              <span class="time"><xsl:value-of select="end/time"/></span> 
     1257            </xsl:when> 
     1258            <xsl:when test="end/time != start/time"> 
     1259              <span class="time"><xsl:value-of select="end/time"/></span> 
     1260            </xsl:when> 
     1261          </xsl:choose> 
     1262        </td> 
     1263        <!--<th class="icon" rowspan="2"> 
     1264          <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
     1265          <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;skinName=ical&amp;contentType=text/calendar&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
     1266            <img src="{$resourcesRoot}/resources/std-ical-icon.gif" width="20" height="26" border="0" align="left" alt="Download this event"/> 
     1267          </a> 
     1268        </th>--> 
     1269      </tr> 
     1270      <tr> 
     1271        <td class="fieldname">Where:</td> 
     1272        <td class="fieldval"> 
     1273          <xsl:choose> 
     1274            <xsl:when test="location/link=''"> 
     1275              <xsl:value-of select="location/address"/> 
     1276            </xsl:when> 
     1277            <xsl:otherwise> 
     1278              <xsl:variable name="locationLink" select="location/link"/> 
     1279              <a href="{$locationLink}"> 
     1280                <xsl:value-of select="location/address"/> 
     1281              </a> 
     1282            </xsl:otherwise> 
     1283          </xsl:choose> 
     1284          <xsl:if test="location/subaddress!=''"> 
     1285            <br/><xsl:value-of select="location/subaddress"/> 
     1286          </xsl:if> 
     1287        </td> 
     1288      </tr> 
     1289      <tr> 
     1290        <td class="fieldname">Description:</td> 
     1291        <td class="fieldval"> 
     1292          <xsl:call-template name="replace"> 
     1293            <xsl:with-param name="string" select="description"/> 
     1294            <xsl:with-param name="pattern" select="'&#xA;'"/> 
     1295            <xsl:with-param name="replacement"><br/></xsl:with-param> 
     1296          </xsl:call-template> 
     1297        </td> 
     1298      </tr> 
     1299      <xsl:if test="status !='' and status != 'CONFIRMED'"> 
     1300        <tr> 
     1301          <td class="fieldname">Status:</td> 
     1302          <td class="fieldval"> 
     1303            <xsl:value-of select="status"/> 
     1304          </td> 
     1305        </tr> 
     1306      </xsl:if> 
     1307      <xsl:if test="organizer"> 
     1308        <tr> 
     1309          <td class="fieldname">Organizer:</td> 
     1310          <xsl:variable name="organizerUri" select="organizer/organizerUri"/> 
     1311          <td class="fieldval"> 
     1312            <strong> 
     1313              <a href="{$organizerUri}"> 
     1314                <xsl:value-of select="organizer/cn"/> 
     1315              </a> 
     1316            </strong> 
     1317          </td> 
     1318        </tr> 
     1319      </xsl:if> 
     1320      <xsl:if test="attendee"> 
     1321        <tr> 
     1322          <td class="fieldname">Attendees:</td> 
     1323          <td class="fieldval"> 
     1324            <table id="attendees" cellspacing="0"> 
     1325              <tr> 
     1326                <th>role</th> 
     1327                <th>status</th> 
     1328                <th>attendee</th> 
     1329              </tr> 
     1330              <xsl:for-each select="attendee"> 
     1331                <xsl:sort select="cn" order="ascending" case-order="upper-first"/> 
     1332                <tr> 
     1333                  <td class="role"> 
     1334                    <xsl:value-of select="role"/> 
     1335                  </td> 
     1336                  <td class="status"> 
     1337                    <xsl:value-of select="partstat"/> 
     1338                  </td> 
     1339                  <td> 
     1340                    <xsl:variable name="attendeeUri" select="attendeeUri"/> 
     1341                    <a href="{$attendeeUri}"><xsl:value-of select="cn"/></a> 
     1342                  </td> 
     1343                </tr> 
     1344              </xsl:for-each> 
     1345            </table> 
     1346          </td> 
     1347        </tr> 
     1348      </xsl:if> 
     1349      <xsl:if test="cost!=''"> 
     1350        <tr> 
     1351          <td class="fieldname">Cost:</td> 
     1352          <td class="fieldval"><xsl:value-of select="cost"/></td> 
     1353        </tr> 
     1354      </xsl:if> 
     1355      <xsl:if test="link != ''"> 
     1356        <tr> 
     1357          <td class="fieldname">See:</td> 
     1358          <td class="fieldval"> 
     1359            <xsl:variable name="link" select="link"/> 
     1360            <a href="{$link}"><xsl:value-of select="link"/></a> 
     1361          </td> 
     1362        </tr> 
     1363      </xsl:if> 
     1364      <xsl:if test="sponsor/name!='none'"> 
     1365        <tr> 
     1366          <td class="fieldname">Contact:</td> 
     1367          <td class="fieldval"> 
     1368            <xsl:choose> 
     1369              <xsl:when test="sponsor/link=''"> 
     1370                <xsl:value-of select="sponsor/name"/> 
     1371              </xsl:when> 
     1372              <xsl:otherwise> 
     1373                <xsl:variable name="sponsorLink" select="sponsor/link"/> 
     1374                <a href="{$sponsorLink}"> 
     1375                  <xsl:value-of select="sponsor/name"/> 
     1376                </a> 
     1377              </xsl:otherwise> 
     1378            </xsl:choose> 
     1379            <xsl:if test="sponsor/phone!=''"> 
     1380              <br /><xsl:value-of select="sponsor/phone"/> 
     1381            </xsl:if> 
     1382            <xsl:if test="sponsor/email!=''"> 
     1383              <br /> 
     1384              <xsl:variable name="email" select="sponsor/email"/> 
     1385              <xsl:variable name="subject" select="summary"/> 
     1386              <a href="mailto:{$email}&amp;subject={$subject}"> 
     1387                <xsl:value-of select="sponsor/email"/> 
     1388              </a> 
     1389            </xsl:if> 
     1390          </td> 
     1391        </tr> 
     1392      </xsl:if> 
     1393      <xsl:if test="calendar/path!=''"> 
     1394        <tr> 
     1395          <td class="fieldname">Calendar:</td> 
     1396          <td class="fieldval"> 
     1397            <xsl:variable name="calUrl" select="calendar/encodedPath"/> 
     1398            <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
     1399            <a href="{$setSelection}&amp;calUrl={$calUrl}"> 
     1400              <xsl:choose> 
     1401                <xsl:when test="contains(calendar/path,$userPath)"> 
     1402                  <xsl:value-of select="substring-after(calendar/path,$userPath)"/> 
     1403                </xsl:when> 
     1404                <xsl:otherwise> 
     1405                  <xsl:value-of select="calendar/path"/> 
     1406                </xsl:otherwise> 
     1407              </xsl:choose> 
     1408            </a> 
     1409          </td> 
     1410        </tr> 
     1411      </xsl:if> 
     1412      <tr> 
     1413        <td class="fieldname filler">&#160;</td> 
     1414        <td class="fieldval">&#160;</td> 
     1415      </tr> 
     1416    </table> 
     1417  </xsl:template> 
    14161418 
    14171419 <!--==== ADD EVENT ====--> 
    1418        <xsl:template name="addEvent"> 
    1419        <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    1420                change it without modifying includes.js --> 
    1421                <form name="eventForm" method="post" action="{$addEventUsingPage}" id="standardForm"> 
    1422                        <input type="hidden" name="confirmationid" value="{$confId}"/> 
    1423                        <input type="hidden" name="endType" value="date"/> 
    1424                        <h2>Add Event</h2> 
    1425                        <table class="common" cellspacing="0"> 
    1426                                <tr> 
    1427                                        <td class="fieldname"> 
    1428                                                Title: 
    1429                                        </td> 
    1430                                        <td class="fieldval"> 
    1431                                                <xsl:variable name="title" select="/bedework/formElements/form/title/input/@value"/> 
    1432                                                <input type="text" name="newEvent.summary" size="80" value="{$title}"/> 
    1433                                        </td> 
    1434                                </tr> 
    1435                                <tr> 
    1436                                        <td class="fieldname"> 
    1437                                                Calendar: 
    1438                                        </td> 
    1439                                        <td class="fieldval"> 
    1440                                                <xsl:variable name="newCalPath" select="/bedework/formElements/form/calendar/path"/> 
    1441                                                <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
    1442                                                <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
    1443                                                <span id="bwEventCalDisplay"> 
    1444                                                        <xsl:choose> 
    1445                                                                <xsl:when test="contains(/bedework/formElements/form/calendar/path,$userPath)"> 
    1446                                                                        <xsl:value-of select="substring-after(/bedework/formElements/form/calendar/path,$userPath)"/> 
    1447                                                                </xsl:when> 
    1448                                                                <xsl:otherwise> 
    1449                                                                        <xsl:value-of select="/bedework/formElements/form/calendar/path"/> 
    1450                                                                </xsl:otherwise> 
    1451                                                        </xsl:choose> 
    1452                                                </span> 
    1453                                                <a href="javascript:launchCalSelectWindow('{$event-selectCalForEvent}')" class="small">[change]</a> 
    1454                                        </td> 
    1455                                </tr> 
    1456                                <tr> 
    1457                                        <td class="fieldname"> 
    1458                                                Date &amp; Time: 
    1459                                        </td> 
    1460                                        <td class="fieldval"> 
    1461                                                <!-- Set the timefields class for the first load of the page; 
    1462                                                                 subsequent changes will take place using javascript without a 
    1463                                                                 page reload. --> 
    1464                                                <xsl:variable name="timeFieldsClass"> 
    1465                                                        <xsl:choose> 
    1466                                                                <xsl:when test="/bedework/formElements/form/allDay/input/@checked='checked'">invisible</xsl:when> 
    1467                                                                <xsl:otherwise>timeFields</xsl:otherwise> 
    1468                                                        </xsl:choose> 
    1469                                                </xsl:variable> 
    1470                                                <xsl:choose> 
    1471                                                        <xsl:when test="/bedework/formElements/form/allDay/input/@checked='checked'"> 
    1472                                                                <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 
    1473                                                                <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/> 
    1474                                                                <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/> 
    1475                                                        </xsl:when> 
    1476                                                        <xsl:otherwise> 
    1477                                                                <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 
    1478                                                                <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"/> 
    1479                                                                <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"/> 
    1480                                                        </xsl:otherwise> 
    1481                                                </xsl:choose> 
    1482                                                all day event<br/> 
    1483                                                <div class="dateStartEndBox"> 
    1484                                                        <strong>Start:</strong> 
    1485                                                        <div class="dateFields"> 
    1486                                                                <span class="startDateLabel">Date </span> 
    1487                                                                <xsl:copy-of select="/bedework/formElements/form/start/month/*"/> 
    1488                                                                <xsl:copy-of select="/bedework/formElements/form/start/day/*"/> 
    1489                                                                <xsl:choose> 
    1490                                                                        <xsl:when test="/bedework/creating = 'true'"> 
    1491                                                                                <xsl:copy-of select="/bedework/formElements/form/start/year/*"/> 
    1492                                                                        </xsl:when> 
    1493                                                                        <xsl:otherwise> 
    1494                                                                                <xsl:copy-of select="/bedework/formElements/form/start/yearText/*"/> 
    1495                                                                        </xsl:otherwise> 
    1496                                                                </xsl:choose> 
    1497                                                        </div> 
    1498                                                        <script language="JavaScript" type="text/javascript"> 
    1499                                                        <xsl:comment> 
    1500                                                                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'); 
    1501                                                        </xsl:comment> 
    1502                                                        </script> 
    1503                                                        <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
    1504                                                        <div class="{$timeFieldsClass}" id="startTimeFields"> 
    1505                                                                <span id="calWidgetStartTimeHider" class="show"> 
    1506                                                                        <xsl:copy-of select="/bedework/formElements/form/start/hour/*"/> 
    1507                                                                        <xsl:copy-of select="/bedework/formElements/form/start/minute/*"/> 
    1508                                                                        <xsl:if test="/bedework/formElements/form/start/ampm"> 
    1509                                                                                <xsl:copy-of select="/bedework/formElements/form/start/ampm/*"/> 
    1510                                                                        </xsl:if> 
    1511                                                                        <xsl:text> </xsl:text> 
    1512                                                                        <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
    1513                                                                </span> 
    1514                                                        </div> 
    1515                                                </div> 
    1516                                                <div class="dateStartEndBox"> 
    1517                                                        <strong>End:</strong> 
    1518                                                        <xsl:choose> 
    1519                                                                <xsl:when test="/bedework/formElements/form/end/type='E'"> 
    1520                                                                        <input type="radio" name="eventEndType" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    1521                                                                </xsl:when> 
    1522                                                                <xsl:otherwise> 
    1523                                                                        <input type="radio" name="eventEndType" value="E" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    1524                                                                </xsl:otherwise> 
    1525                                                        </xsl:choose> 
    1526                                                        Date 
    1527                                                        <xsl:variable name="endDateTimeClass"> 
    1528                                                                <xsl:choose> 
    1529                                                                        <xsl:when test="/bedework/formElements/form/end/type='E'">shown</xsl:when> 
    1530                                                                        <xsl:otherwise>invisible</xsl:otherwise> 
    1531                                                                </xsl:choose> 
    1532                                                        </xsl:variable> 
    1533                                                        <div class="{$endDateTimeClass}" id="endDateTime"> 
    1534                                                                <div class="dateFields"> 
    1535                                                                        <xsl:copy-of select="/bedework/formElements/form/end/dateTime/month/*"/> 
    1536                                                                        <xsl:copy-of select="/bedework/formElements/form/end/dateTime/day/*"/> 
    1537                                                                        <xsl:choose> 
    1538                                                                                <xsl:when test="/bedework/creating = 'true'"> 
    1539                                                                                        <xsl:copy-of select="/bedework/formElements/form/end/dateTime/year/*"/> 
    1540                                                                                </xsl:when> 
    1541                                                                                <xsl:otherwise> 
    1542                                                                                        <xsl:copy-of select="/bedework/formElements/form/end/dateTime/yearText/*"/> 
    1543                                                                                </xsl:otherwise> 
    1544                                                                        </xsl:choose> 
    1545                                                                </div> 
    1546                                                                <script language="JavaScript" type="text/javascript"> 
    1547                                                                <xsl:comment> 
    1548                                                                        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'); 
    1549                                                                </xsl:comment> 
    1550                                                                </script> 
    1551                                                                <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
    1552                                                                <div class="{$timeFieldsClass}" id="endTimeFields"> 
    1553                                                                        <span id="calWidgetEndTimeHider" class="show"> 
    1554                                                                                <xsl:copy-of select="/bedework/formElements/form/end/dateTime/hour/*"/> 
    1555                                                                                <xsl:copy-of select="/bedework/formElements/form/end/dateTime/minute/*"/> 
    1556                                                                                <xsl:if test="/bedework/formElements/form/end/dateTime/ampm"> 
    1557                                                                                        <xsl:copy-of select="/bedework/formElements/form/end/dateTime/ampm/*"/> 
    1558                                                                                </xsl:if> 
    1559                                                                                <xsl:text> </xsl:text> 
    1560                                                                                <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
    1561                                                                        </span> 
    1562                                                                </div> 
    1563                                                        </div><br/> 
    1564                                                        <div id="clock" class="invisible"> 
    1565                                                                <xsl:call-template name="clock"/> 
    1566                                                        </div> 
    1567                                                        <div class="dateFields"> 
    1568                                                                <xsl:choose> 
    1569                                                                        <xsl:when test="/bedework/formElements/form/end/type='D'"> 
    1570                                                                                <input type="radio" name="eventEndType" value="D" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    1571                                                                        </xsl:when> 
    1572                                                                        <xsl:otherwise> 
    1573                                                                                <input type="radio" name="eventEndType" value="D" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    1574                                                                        </xsl:otherwise> 
    1575                                                                </xsl:choose> 
    1576                                                                Duration 
    1577                                                                <xsl:variable name="endDurationClass"> 
    1578                                                                        <xsl:choose> 
    1579                                                                                <xsl:when test="/bedework/formElements/form/end/type='D'">shown</xsl:when> 
    1580                                                                                <xsl:otherwise>invisible</xsl:otherwise> 
    1581                                                                        </xsl:choose> 
    1582                                                                </xsl:variable> 
    1583                                                                <xsl:variable name="durationHrMinClass"> 
    1584                                                                        <xsl:choose> 
    1585                                                                                <xsl:when test="/bedework/formElements/form/allDay/input/@checked='checked'">invisible</xsl:when> 
    1586                                                                                <xsl:otherwise>shown</xsl:otherwise> 
    1587                                                                        </xsl:choose> 
    1588                                                                </xsl:variable> 
    1589                                                                <div class="{$endDurationClass}" id="endDuration"> 
    1590                                                                        <xsl:choose> 
    1591                                                                                <xsl:when test="/bedework/formElements/form/end/duration/weeks/input/@value = '0'"> 
    1592                                                                                <!-- we are using day, hour, minute format --> 
    1593                                                                                <!-- must send either no week value or week value of 0 (zero) --> 
    1594                                                                                        <div class="durationBox"> 
    1595                                                                                                <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 
    1596                                                                                                <xsl:variable name="daysStr" select="/bedework/formElements/form/end/duration/days/input/@value"/> 
    1597                                                                                                <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 
    1598                                                                                                <span id="durationHrMin" class="{$durationHrMinClass}"> 
    1599                                                                                                        <xsl:variable name="hoursStr" select="/bedework/formElements/form/end/duration/hours/input/@value"/> 
    1600                                                                                                        <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 
    1601                                                                                                        <xsl:variable name="minutesStr" select="/bedework/formElements/form/end/duration/minutes/input/@value"/> 
    1602                                                                                                        <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 
    1603                                                                                                </span> 
    1604                                                                                        </div> 
    1605                                                                                        <span class="durationSpacerText">or</span> 
    1606                                                                                        <div class="durationBox"> 
    1607                                                                                                <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 
    1608                                                                                                <xsl:variable name="weeksStr" select="/bedework/formElements/form/end/duration/weeks/input/@value"/> 
    1609                                                                                                <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="true"/>weeks 
    1610                                                                                        </div> 
    1611                                                                                </xsl:when> 
    1612                                                                                <xsl:otherwise> 
    1613                                                                                        <!-- we are using week format --> 
    1614                                                                                        <div class="durationBox"> 
    1615                                                                                                <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 
    1616                                                                                                <xsl:variable name="daysStr" select="/bedework/formElements/form/end/duration/days/input/@value"/> 
    1617                                                                                                <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="true"/>days 
    1618                                                                                                <span id="durationHrMin" class="{$durationHrMinClass}"> 
    1619                                                                                                        <xsl:variable name="hoursStr" select="/bedework/formElements/form/end/duration/hours/input/@value"/> 
    1620                                                                                                        <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="true"/>hours 
    1621                                                                                                        <xsl:variable name="minutesStr" select="/bedework/formElements/form/end/duration/minutes/input/@value"/> 
    1622                                                                                                        <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="true"/>minutes 
    1623                                                                                                </span> 
    1624                                                                                        </div> 
    1625                                                                                        <span class="durationSpacerText">or</span> 
    1626                                                                                        <div class="durationBox"> 
    1627                                                                                                <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 
    1628                                                                                                <xsl:variable name="weeksStr" select="/bedework/formElements/form/end/duration/weeks/input/@value"/> 
    1629                                                                                                <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 
    1630                                                                                        </div> 
    1631                                                                                </xsl:otherwise> 
    1632                                                                        </xsl:choose> 
    1633                                                                </div> 
    1634                                                        </div><br/> 
    1635                                                        <div class="dateFields" id="noDuration"> 
    1636                                                                <xsl:choose> 
    1637                                                                        <xsl:when test="/bedework/formElements/form/end/type='N'"> 
    1638                                                                                <input type="radio" name="eventEndType" value="N" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    1639                                                                        </xsl:when> 
    1640                                                                        <xsl:otherwise> 
    1641                                                                                <input type="radio" name="eventEndType" value="N" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    1642                                                                        </xsl:otherwise> 
    1643                                                                </xsl:choose> 
    1644                                                                This event has no duration / end date 
    1645                                                        </div> 
    1646                                                </div> 
    1647                                        </td> 
    1648                                </tr> 
    1649                                <!--  Status  --> 
    1650                                <tr> 
    1651                                        <td class="fieldname"> 
    1652                                                Status: 
    1653                                        </td> 
    1654                                        <td class="fieldval"> 
    1655                                                <xsl:choose> 
    1656                                                        <xsl:when test="/bedework/formElements/form/status = 'TENTATIVE'"> 
    1657                                                                <input type="radio" name="newEvent.status" value="CONFIRMED"/>confirmed <input type="radio" name="newEvent.status" value="TENTATIVE" checked="checked"/>tentative <input type="radio" name="newEvent.status" value="CANCELLED"/>cancelled 
    1658                                                        </xsl:when> 
    1659                                                        <xsl:when test="/bedework/formElements/form/status = 'CANCELLED'"> 
    1660                                                                <input type="radio" name="newEvent.status" value="CONFIRMED"/>confirmed <input type="radio" name="newEvent.status" value="TENTATIVE"/>tentative <input type="radio" name="newEvent.status" value="CANCELLED" checked="checked"/>cancelled 
    1661                                                        </xsl:when> 
    1662                                                        <xsl:otherwise> 
    1663                                                                <input type="radio" name="newEvent.status" value="CONFIRMED" checked="checked"/>confirmed <input type="radio" name="newEvent.status" value="TENTATIVE"/>tentative <input type="radio" name="newEvent.status" value="CANCELLED"/>cancelled 
    1664                                                        </xsl:otherwise> 
    1665                                                </xsl:choose> 
    1666                                        </td> 
    1667                                </tr> 
    1668                                <!--  Transparency  --> 
    1669                                <tr> 
    1670                                        <td class="fieldname"> 
    1671                                                Effects free/busy: 
    1672                                        </td> 
    1673                                        <td class="fieldval"> 
    1674                                                <input type="radio" name="newEvent.transparency" value="OPAQUE" checked="checked"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
     1420  <xsl:template name="addEvent"> 
     1421  <!-- The name "eventForm" is referenced by several javascript functions. Do not 
     1422    change it without modifying includes.js --> 
     1423    <form name="eventForm" method="post" action="{$addEventUsingPage}" id="standardForm"> 
     1424      <input type="hidden" name="confirmationid" value="{$confId}"/> 
     1425      <input type="hidden" name="endType" value="date"/> 
     1426      <h2>Add Event</h2> 
     1427      <table class="common" cellspacing="0"> 
     1428        <tr> 
     1429          <td class="fieldname"> 
     1430            Title: 
     1431          </td> 
     1432          <td class="fieldval"> 
     1433            <xsl:variable name="title" select="/bedework/formElements/form/title/input/@value"/> 
     1434            <input type="text" name="newEvent.summary" size="80" value="{$title}"/> 
     1435          </td> 
     1436        </tr> 
     1437        <tr> 
     1438          <td class="fieldname"> 
     1439            Calendar: 
     1440          </td> 
     1441          <td class="fieldval"> 
     1442            <xsl:variable name="newCalPath" select="/bedework/formElements/form/calendar/path"/> 
     1443            <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
     1444            <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
     1445            <span id="bwEventCalDisplay"> 
     1446              <xsl:choose> 
     1447                <xsl:when test="contains(/bedework/formElements/form/calendar/path,$userPath)"> 
     1448                  <xsl:value-of select="substring-after(/bedework/formElements/form/calendar/path,$userPath)"/> 
     1449                </xsl:when> 
     1450                <xsl:otherwise> 
     1451                  <xsl:value-of select="/bedework/formElements/form/calendar/path"/> 
     1452                </xsl:otherwise> 
     1453              </xsl:choose> 
     1454            </span> 
     1455            <a href="javascript:launchCalSelectWindow('{$event-selectCalForEvent}')" class="small">[change]</a> 
     1456          </td> 
     1457        </tr> 
     1458        <tr> 
     1459          <td class="fieldname"> 
     1460            Date &amp; Time: 
     1461          </td> 
     1462          <td class="fieldval"> 
     1463            <!-- Set the timefields class for the first load of the page; 
     1464                subsequent changes will take place using javascript without a 
     1465                page reload. --> 
     1466            <xsl:variable name="timeFieldsClass"> 
     1467              <xsl:choose> 
     1468                <xsl:when test="/bedework/formElements/form/allDay/input/@checked='checked'">invisible</xsl:when> 
     1469                <xsl:otherwise>timeFields</xsl:otherwise> 
     1470              </xsl:choose> 
     1471            </xsl:variable> 
     1472            <xsl:choose> 
     1473              <xsl:when test="/bedework/formElements/form/allDay/input/@checked='checked'"> 
     1474                <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 
     1475                <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/> 
     1476                <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/> 
     1477              </xsl:when> 
     1478              <xsl:otherwise> 
     1479                <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 
     1480                <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"/> 
     1481                <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"/> 
     1482              </xsl:otherwise> 
     1483            </xsl:choose> 
     1484            all day event<br/> 
     1485            <div class="dateStartEndBox"> 
     1486              <strong>Start:</strong> 
     1487              <div class="dateFields"> 
     1488                <span class="startDateLabel">Date </span> 
     1489                <xsl:copy-of select="/bedework/formElements/form/start/month/*"/> 
     1490                <xsl:copy-of select="/bedework/formElements/form/start/day/*"/> 
     1491                <xsl:choose> 
     1492                  <xsl:when test="/bedework/creating = 'true'"> 
     1493                    <xsl:copy-of select="/bedework/formElements/form/start/year/*"/> 
     1494                  </xsl:when> 
     1495                  <xsl:otherwise> 
     1496                    <xsl:copy-of select="/bedework/formElements/form/start/yearText/*"/> 
     1497                  </xsl:otherwise> 
     1498                </xsl:choose> 
     1499              </div> 
     1500              <script language="JavaScript" type="text/javascript"> 
     1501              <xsl:comment> 
     1502                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'); 
     1503              </xsl:comment> 
     1504              </script> 
     1505              <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
     1506              <div class="{$timeFieldsClass}" id="startTimeFields"> 
     1507                <span id="calWidgetStartTimeHider" class="show"> 
     1508                  <xsl:copy-of select="/bedework/formElements/form/start/hour/*"/> 
     1509                  <xsl:copy-of select="/bedework/formElements/form/start/minute/*"/> 
     1510                  <xsl:if test="/bedework/formElements/form/start/ampm"> 
     1511                    <xsl:copy-of select="/bedework/formElements/form/start/ampm/*"/> 
     1512                  </xsl:if> 
     1513                  <xsl:text> </xsl:text> 
     1514                  <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
     1515                </span> 
     1516              </div> 
     1517            </div> 
     1518            <div class="dateStartEndBox"> 
     1519              <strong>End:</strong> 
     1520              <xsl:choose> 
     1521                <xsl:when test="/bedework/formElements/form/end/type='E'"> 
     1522                  <input type="radio" name="eventEndType" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     1523                </xsl:when> 
     1524                <xsl:otherwise> 
     1525                  <input type="radio" name="eventEndType" value="E" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     1526                </xsl:otherwise> 
     1527              </xsl:choose> 
     1528              Date 
     1529              <xsl:variable name="endDateTimeClass"> 
     1530                <xsl:choose> 
     1531                  <xsl:when test="/bedework/formElements/form/end/type='E'">shown</xsl:when> 
     1532                  <xsl:otherwise>invisible</xsl:otherwise> 
     1533                </xsl:choose> 
     1534              </xsl:variable> 
     1535              <div class="{$endDateTimeClass}" id="endDateTime"> 
     1536                <div class="dateFields"> 
     1537                  <xsl:copy-of select="/bedework/formElements/form/end/dateTime/month/*"/> 
     1538                  <xsl:copy-of select="/bedework/formElements/form/end/dateTime/day/*"/> 
     1539                  <xsl:choose> 
     1540                    <xsl:when test="/bedework/creating = 'true'"> 
     1541                      <xsl:copy-of select="/bedework/formElements/form/end/dateTime/year/*"/> 
     1542                    </xsl:when> 
     1543                    <xsl:otherwise> 
     1544                      <xsl:copy-of select="/bedework/formElements/form/end/dateTime/yearText/*"/> 
     1545                    </xsl:otherwise> 
     1546                  </xsl:choose> 
     1547                </div> 
     1548                <script language="JavaScript" type="text/javascript"> 
     1549                <xsl:comment> 
     1550                  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'); 
     1551                </xsl:comment> 
     1552                </script> 
     1553                <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
     1554                <div class="{$timeFieldsClass}" id="endTimeFields"> 
     1555                  <span id="calWidgetEndTimeHider" class="show"> 
     1556                    <xsl:copy-of select="/bedework/formElements/form/end/dateTime/hour/*"/> 
     1557                    <xsl:copy-of select="/bedework/formElements/form/end/dateTime/minute/*"/> 
     1558                    <xsl:if test="/bedework/formElements/form/end/dateTime/ampm"> 
     1559                      <xsl:copy-of select="/bedework/formElements/form/end/dateTime/ampm/*"/> 
     1560                    </xsl:if> 
     1561                    <xsl:text> </xsl:text> 
     1562                    <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
     1563                  </span> 
     1564                </div> 
     1565              </div><br/> 
     1566              <div id="clock" class="invisible"> 
     1567                <xsl:call-template name="clock"/> 
     1568              </div> 
     1569              <div class="dateFields"> 
     1570                <xsl:choose> 
     1571                  <xsl:when test="/bedework/formElements/form/end/type='D'"> 
     1572                    <input type="radio" name="eventEndType" value="D" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     1573                  </xsl:when> 
     1574                  <xsl:otherwise> 
     1575                    <input type="radio" name="eventEndType" value="D" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     1576                  </xsl:otherwise> 
     1577                </xsl:choose> 
     1578                Duration 
     1579                <xsl:variable name="endDurationClass"> 
     1580                  <xsl:choose> 
     1581                    <xsl:when test="/bedework/formElements/form/end/type='D'">shown</xsl:when> 
     1582                    <xsl:otherwise>invisible</xsl:otherwise> 
     1583                  </xsl:choose> 
     1584                </xsl:variable> 
     1585                <xsl:variable name="durationHrMinClass"> 
     1586                  <xsl:choose> 
     1587                    <xsl:when test="/bedework/formElements/form/allDay/input/@checked='checked'">invisible</xsl:when> 
     1588                    <xsl:otherwise>shown</xsl:otherwise> 
     1589                  </xsl:choose> 
     1590                </xsl:variable> 
     1591                <div class="{$endDurationClass}" id="endDuration"> 
     1592                  <xsl:choose> 
     1593                    <xsl:when test="/bedework/formElements/form/end/duration/weeks/input/@value = '0'"> 
     1594                    <!-- we are using day, hour, minute format --> 
     1595                    <!-- must send either no week value or week value of 0 (zero) --> 
     1596                      <div class="durationBox"> 
     1597                        <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 
     1598                        <xsl:variable name="daysStr" select="/bedework/formElements/form/end/duration/days/input/@value"/> 
     1599                        <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 
     1600                        <span id="durationHrMin" class="{$durationHrMinClass}"> 
     1601                          <xsl:variable name="hoursStr" select="/bedework/formElements/form/end/duration/hours/input/@value"/> 
     1602                          <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 
     1603                          <xsl:variable name="minutesStr" select="/bedework/formElements/form/end/duration/minutes/input/@value"/> 
     1604                          <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 
     1605                        </span> 
     1606                      </div> 
     1607                      <span class="durationSpacerText">or</span> 
     1608                      <div class="durationBox"> 
     1609                        <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 
     1610                        <xsl:variable name="weeksStr" select="/bedework/formElements/form/end/duration/weeks/input/@value"/> 
     1611                        <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="true"/>weeks 
     1612                      </div> 
     1613                    </xsl:when> 
     1614                    <xsl:otherwise> 
     1615                      <!-- we are using week format --> 
     1616                      <div class="durationBox"> 
     1617                        <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 
     1618                        <xsl:variable name="daysStr" select="/bedework/formElements/form/end/duration/days/input/@value"/> 
     1619                        <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="true"/>days 
     1620                        <span id="durationHrMin" class="{$durationHrMinClass}"> 
     1621                          <xsl:variable name="hoursStr" select="/bedework/formElements/form/end/duration/hours/input/@value"/> 
     1622                          <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="true"/>hours 
     1623                          <xsl:variable name="minutesStr" select="/bedework/formElements/form/end/duration/minutes/input/@value"/> 
     1624                          <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="true"/>minutes 
     1625                        </span> 
     1626                      </div> 
     1627                      <span class="durationSpacerText">or</span> 
     1628                      <div class="durationBox"> 
     1629                        <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 
     1630                        <xsl:variable name="weeksStr" select="/bedework/formElements/form/end/duration/weeks/input/@value"/> 
     1631                        <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 
     1632                      </div> 
     1633                    </xsl:otherwise> 
     1634                  </xsl:choose> 
     1635                </div> 
     1636              </div><br/> 
     1637              <div class="dateFields" id="noDuration"> 
     1638                <xsl:choose> 
     1639                  <xsl:when test="/bedework/formElements/form/end/type='N'"> 
     1640                    <input type="radio" name="eventEndType" value="N" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     1641                  </xsl:when> 
     1642                  <xsl:otherwise> 
     1643                    <input type="radio" name="eventEndType" value="N" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     1644                  </xsl:otherwise> 
     1645                </xsl:choose> 
     1646                This event has no duration / end date 
     1647              </div> 
     1648            </div> 
     1649          </td> 
     1650        </tr> 
     1651        <!--  Status  --> 
     1652        <tr> 
     1653          <td class="fieldname"> 
     1654            Status: 
     1655          </td> 
     1656          <td class="fieldval"> 
     1657            <xsl:choose> 
     1658              <xsl:when test="/bedework/formElements/form/status = 'TENTATIVE'"> 
     1659                <input type="radio" name="newEvent.status" value="CONFIRMED"/>confirmed <input type="radio" name="newEvent.status" value="TENTATIVE" checked="checked"/>tentative <input type="radio" name="newEvent.status" value="CANCELLED"/>cancelled 
     1660              </xsl:when> 
     1661              <xsl:when test="/bedework/formElements/form/status = 'CANCELLED'"> 
     1662                <input type="radio" name="newEvent.status" value="CONFIRMED"/>confirmed <input type="radio" name="newEvent.status" value="TENTATIVE"/>tentative <input type="radio" name="newEvent.status" value="CANCELLED" checked="checked"/>cancelled 
     1663              </xsl:when> 
     1664              <xsl:otherwise> 
     1665                <input type="radio" name="newEvent.status" value="CONFIRMED" checked="checked"/>confirmed <input type="radio" name="newEvent.status" value="TENTATIVE"/>tentative <input type="radio" name="newEvent.status" value="CANCELLED"/>cancelled 
     1666              </xsl:otherwise> 
     1667            </xsl:choose> 
     1668          </td> 
     1669        </tr> 
     1670        <!--  Transparency  --> 
     1671        <tr> 
     1672          <td class="fieldname"> 
     1673            Effects free/busy: 
     1674          </td> 
     1675          <td class="fieldval"> 
     1676            <input type="radio" name="newEvent.transparency" value="OPAQUE" checked="checked"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    16751677            <input type="radio" name="newEvent.transparency" value="TRANSPARENT"/>no <span class="note">(transparent: event status does not affect your free/busy)</span> 
    1676                                        </td> 
    1677                                </tr> 
    1678                                <!--  Description  --> 
    1679                                <tr> 
    1680                                        <td class="fieldname">Description:</td> 
    1681                                        <td class="fieldval"> 
    1682                                                <textarea name="newEvent.description" cols="60" rows="4"> 
    1683                                                        <xsl:value-of select="/bedework/formElements/form/desc/textarea"/> 
    1684                                                </textarea> 
    1685                                        </td> 
    1686                                </tr> 
    1687                                <tr> 
    1688                                        <td class="fieldname">Location:</td> 
    1689                                        <td class="fieldval" align="left"> 
    1690                                                <span class="std-text">choose: </span> 
    1691                                                <span id="eventFormLocationList"> 
    1692                                                        <select name="locationId"> 
    1693                                                                <option value="-1">select...</option> 
    1694                                                                <xsl:copy-of select="/bedework/formElements/form/location/locationmenu/select/*"/> 
    1695                                                        </select> 
    1696                                                </span> 
    1697                                                <span class="std-text"> or add new: </span> 
    1698                                                <input type="text" name="newLocation.address" value="" /> 
    1699                                        </td> 
    1700                                </tr> 
    1701                                <tr> 
    1702                                        <td class="fieldname">Event Link:</td> 
    1703                                        <td class="fieldval"> 
    1704                                                <xsl:variable name="link" select="/bedework/formElements/form/link/input/@value"/> 
    1705                                                <input type="text" name="newEvent.link" size="80" value="{$link}"/> 
    1706                                        </td> 
    1707                                </tr> 
    1708                                <tr> 
    1709                                        <td class="fieldname">&#160;</td> 
    1710                                        <td class="fieldval"> 
    1711                                                <input name="submit" type="submit" value="Submit Event"/>&#160; 
    1712                                                <input name="cancelled" type="submit" value="Cancel"/> 
    1713                                        </td> 
    1714                                </tr> 
    1715                        </table> 
    1716                </form> 
    1717        </xsl:template> 
    1718  
    1719        <xsl:template name="clock"> 
    1720                <div id="bwClock"> 
    1721                        <!-- Bedework 24-Hour Clock time selection widget 
    1722                                         used with resources/bwClock.js and resources/bwClock.css --> 
    1723                        <div id="bwClockClock"> 
    1724                                <img id="clockMap" src="{$resourcesRoot}/resources/clockMap.gif" width="368" height="368" border="0" alt="" usemap="#bwClockMap" /> 
    1725                        </div> 
    1726                        <div id="bwClockCover"> 
    1727                                <!-- this is a special effect div used simply to cover the pixelated edge 
    1728                                                 where the clock meets the clock box title --> 
    1729                        </div> 
    1730                        <div id="bwClockBox"> 
    1731                                <h2> 
    1732                                        Bedework 24-Hour Clock 
    1733                                </h2> 
    1734                                <div id="bwClockDateTypeIndicator"> 
    1735                                        type 
    1736                                </div> 
    1737                                <div id="bwClockTime"> 
    1738                                        select time 
    1739                                </div> 
    1740                                <div id="bwClockCloseText"> 
    1741                                        close 
    1742                                </div> 
    1743                                <div id="bwClockCloseButton"> 
    1744                                        <a href="javascript:bwClockClose();">X</a> 
    1745                                </div> 
    1746                        </div> 
    1747                        <map name="bwClockMap" id="bwClockMap"> 
    1748                                <area shape="rect" alt="close clock" title="close clock" coords="160,167, 200,200" href="javascript:bwClockClose()"/> 
    1749                                <area shape="poly" alt="minute 00:55" title="minute 00:55" coords="156,164, 169,155, 156,107, 123,128" href="javascript:bwClockUpdateDateTimeForm('minute','55')" /> 
    1750                                <area shape="poly" alt="minute 00:50" title="minute 00:50" coords="150,175, 156,164, 123,128, 103,161" href="javascript:bwClockUpdateDateTimeForm('minute','50')" /> 
    1751                                <area shape="poly" alt="minute 00:45" title="minute 00:45" coords="150,191, 150,175, 103,161, 103,206" href="javascript:bwClockUpdateDateTimeForm('minute','45')" /> 
    1752                                <area shape="poly" alt="minute 00:40" title="minute 00:40" coords="158,208, 150,191, 105,206, 123,237" href="javascript:bwClockUpdateDateTimeForm('minute','40')" /> 
    1753                                <area shape="poly" alt="minute 00:35" title="minute 00:35" coords="171,218, 158,208, 123,238, 158,261" href="javascript:bwClockUpdateDateTimeForm('minute','35')" /> 
    1754                                <area shape="poly" alt="minute 00:30" title="minute 00:30" coords="193,218, 172,218, 158,263, 209,263" href="javascript:bwClockUpdateDateTimeForm('minute','30')" /> 
    1755                                <area shape="poly" alt="minute 00:25" title="minute 00:25" coords="209,210, 193,218, 209,261, 241,240" href="javascript:bwClockUpdateDateTimeForm('minute','25')" /> 
    1756                                <area shape="poly" alt="minute 00:20" title="minute 00:20" coords="216,196, 209,210, 241,240, 261,206" href="javascript:bwClockUpdateDateTimeForm('minute','20')" /> 
    1757                                <area shape="poly" alt="minute 00:15" title="minute 00:15" coords="216,178, 216,196, 261,206, 261,159" href="javascript:bwClockUpdateDateTimeForm('minute','15')" /> 
    1758                                <area shape="poly" alt="minute 00:10" title="minute 00:10" coords="209,164, 216,178, 261,159, 240,126" href="javascript:bwClockUpdateDateTimeForm('minute','10')" /> 
    1759                                <area shape="poly" alt="minute 00:05" title="minute 00:05" coords="196,155, 209,164, 238,126, 206,107" href="javascript:bwClockUpdateDateTimeForm('minute','05')" /> 
    1760                                <area shape="poly" alt="minute 00:00" title="minute 00:00" coords="169,155, 196,155, 206,105, 156,105" href="javascript:bwClockUpdateDateTimeForm('minute','00')" /> 
    1761                                <area shape="poly" alt="11 PM, 2300 hour" title="11 PM, 2300 hour" coords="150,102, 172,96, 158,1, 114,14" href="javascript:bwClockUpdateDateTimeForm('hour','23')" /> 
    1762                                <area shape="poly" alt="10 PM, 2200 hour" title="10 PM, 2200 hour" coords="131,114, 150,102, 114,14, 74,36" href="javascript:bwClockUpdateDateTimeForm('hour','22')" /> 
    1763                                <area shape="poly" alt="9 PM, 2100 hour" title="9 PM, 2100 hour" coords="111,132, 131,114, 74,36, 40,69" href="javascript:bwClockUpdateDateTimeForm('hour','21')" /> 
    1764                                <area shape="poly" alt="8 PM, 2000 hour" title="8 PM, 2000 hour" coords="101,149, 111,132, 40,69, 15,113" href="javascript:bwClockUpdateDateTimeForm('hour','20')" /> 
    1765                                <area shape="poly" alt="7 PM, 1900 hour" title="7 PM, 1900 hour" coords="95,170, 101,149, 15,113, 1,159" href="javascript:bwClockUpdateDateTimeForm('hour','19')" /> 
    1766                                <area shape="poly" alt="6 PM, 1800 hour" title="6 PM, 1800 hour" coords="95,196, 95,170, 0,159, 0,204" href="javascript:bwClockUpdateDateTimeForm('hour','18')" /> 
    1767                                <area shape="poly" alt="5 PM, 1700 hour" title="5 PM, 1700 hour" coords="103,225, 95,196, 1,205, 16,256" href="javascript:bwClockUpdateDateTimeForm('hour','17')" /> 
    1768                                <area shape="poly" alt="4 PM, 1600 hour" title="4 PM, 1600 hour" coords="116,245, 103,225, 16,256, 41,298" href="javascript:bwClockUpdateDateTimeForm('hour','16')" /> 
    1769                                <area shape="poly" alt="3 PM, 1500 hour" title="3 PM, 1500 hour" coords="134,259, 117,245, 41,298, 76,332" href="javascript:bwClockUpdateDateTimeForm('hour','15')" /> 
    1770                                <area shape="poly" alt="2 PM, 1400 hour" title="2 PM, 1400 hour" coords="150,268, 134,259, 76,333, 121,355" href="javascript:bwClockUpdateDateTimeForm('hour','14')" /> 
    1771                                <area shape="poly" alt="1 PM, 1300 hour" title="1 PM, 1300 hour" coords="169,273, 150,268, 120,356, 165,365" href="javascript:bwClockUpdateDateTimeForm('hour','13')" /> 
    1772                                <area shape="poly" alt="Noon, 1200 hour" title="Noon, 1200 hour" coords="193,273, 169,273, 165,365, 210,364" href="javascript:bwClockUpdateDateTimeForm('hour','12')" /> 
    1773                                <area shape="poly" alt="11 AM, 1100 hour" title="11 AM, 1100 hour" coords="214,270, 193,273, 210,363, 252,352" href="javascript:bwClockUpdateDateTimeForm('hour','11')" /> 
    1774                                <area shape="poly" alt="10 AM, 1000 hour" title="10 AM, 1000 hour" coords="232,259, 214,270, 252,352, 291,330" href="javascript:bwClockUpdateDateTimeForm('hour','10')" /> 
    1775                                <area shape="poly" alt="9 AM, 0900 hour" title="9 AM, 0900 hour" coords="251,240, 232,258, 291,330, 323,301" href="javascript:bwClockUpdateDateTimeForm('hour','09')" /> 
    1776                                <area shape="poly" alt="8 AM, 0800 hour" title="8 AM, 0800 hour" coords="263,219, 251,239, 323,301, 349,261" href="javascript:bwClockUpdateDateTimeForm('hour','08')" /> 
    1777                                <area shape="poly" alt="7 AM, 0700 hour" title="7 AM, 0700 hour" coords="269,194, 263,219, 349,261, 363,212" href="javascript:bwClockUpdateDateTimeForm('hour','07')" /> 
    1778                                <area shape="poly" alt="6 AM, 0600 hour" title="6 AM, 0600 hour" coords="269,172, 269,193, 363,212, 363,155" href="javascript:bwClockUpdateDateTimeForm('hour','06')" /> 
    1779                                <area shape="poly" alt="5 AM, 0500 hour" title="5 AM, 0500 hour" coords="263,150, 269,172, 363,155, 351,109" href="javascript:bwClockUpdateDateTimeForm('hour','05')" /> 
    1780                                <area shape="poly" alt="4 AM, 0400 hour" title="4 AM, 0400 hour" coords="251,130, 263,150, 351,109, 325,68" href="javascript:bwClockUpdateDateTimeForm('hour','04')" /> 
    1781                                <area shape="poly" alt="3 AM, 0300 hour" title="3 AM, 0300 hour" coords="234,112, 251,130, 325,67, 295,37" href="javascript:bwClockUpdateDateTimeForm('hour','03')" /> 
    1782                                <area shape="poly" alt="2 AM, 0200 hour" title="2 AM, 0200 hour" coords="221,102, 234,112, 295,37, 247,11" href="javascript:bwClockUpdateDateTimeForm('hour','02')" /> 
    1783                                <area shape="poly" alt="1 AM, 0100 hour" title="1 AM, 0100 hour" coords="196,96, 221,102, 247,10, 209,-1, 201,61, 206,64, 205,74, 199,75" href="javascript:bwClockUpdateDateTimeForm('hour','01')" /> 
    1784                                <area shape="poly" alt="Midnight, 0000 hour" title="Midnight, 0000 hour" coords="172,96, 169,74, 161,73, 161,65, 168,63, 158,-1, 209,-1, 201,61, 200,62, 206,64, 205,74, 198,75, 196,96, 183,95" href="javascript:bwClockUpdateDateTimeForm('hour','00')" /> 
    1785                        </map> 
    1786                </div> 
    1787        </xsl:template> 
    1788  
    1789        <!--==== EDIT EVENT ====--> 
    1790        <xsl:template match="formElements" mode="editEvent"> 
    1791                <xsl:variable name="subscriptionId" select="subscriptionId"/> 
    1792                <xsl:variable name="calPathEncoded" select="form/calendar/encodedPath"/> 
    1793                <xsl:variable name="calPath" select="form/calendar/path"/> 
    1794                <xsl:variable name="guid" select="guid"/> 
    1795                <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    1796                <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    1797                change it without modifying includes.js --> 
    1798                <form name="eventForm" method="post" action="{$editEvent}" id="standardForm"> 
    1799                        <input type="hidden" name="updateEvent" value="true"/> 
    1800                        <input type="hidden" name="confirmationid" value="{$confId}"/> 
    1801                        <input type="hidden" name="endType" value="date"/> 
    1802                        <h2>Edit Event</h2> 
    1803                        <table class="common" cellspacing="0"> 
    1804                                <tr> 
    1805                                        <th colspan="2" class="commonHeader"> 
    1806                                                <div id="eventActions"> 
    1807                                                        <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
    1808                                                                <img src="{$resourcesRoot}/resources/glassFill-icon-viewGray.gif" width="13" height="13" border="0" alt="view"/> 
    1809                                                                View 
    1810                                                        </a> 
    1811                                                        <xsl:if test="currentAccess/current-user-privilege-set/privilege/unbind"> 
    1812                                                                
    1813                                                                <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPathEncoded}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
    1814                                                                        <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    1815                                                                        Delete 
    1816                                                                </a> 
    1817                                                        </xsl:if> 
    1818                                                </div> 
    1819                                                Personal Event 
    1820                                        </th> 
    1821                                </tr> 
    1822                                <tr> 
    1823                                        <td class="fieldname"> 
    1824                                                Title: 
    1825                                        </td> 
    1826                                        <td class="fieldval"> 
    1827                                                <xsl:variable name="title" select="form/title/input/@value"/> 
    1828                                                <input type="text" name="editEvent.summary" size="80" value="{$title}"/> 
    1829                                        </td> 
    1830                                </tr> 
    1831                                <tr> 
    1832                                        <td class="fieldname"> 
    1833                                                Calendar: 
    1834                                        </td> 
    1835                                        <td class="fieldval"> 
    1836                                                <xsl:variable name="newCalPath" select="/bedework/formElements/form/calendar/path"/> 
    1837                                                <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
    1838                                                <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
    1839                                                <span id="bwEventCalDisplay"> 
    1840                                                        <xsl:choose> 
    1841                                                                <xsl:when test="contains(/bedework/formElements/form/calendar/path,$userPath)"> 
    1842                                                                        <xsl:value-of select="substring-after(/bedework/formElements/form/calendar/path,$userPath)"/> 
    1843                                                                </xsl:when> 
    1844                                                                <xsl:otherwise> 
    1845                                                                        <xsl:value-of select="/bedework/formElements/form/calendar/path"/> 
    1846                                                                </xsl:otherwise> 
    1847                                                        </xsl:choose> 
    1848                                                </span> 
    1849                                                <a href="javascript:launchCalSelectWindow('{$event-selectCalForEvent}')" class="small">[change]</a> 
    1850                                        </td> 
    1851                                </tr> 
    1852                                <tr> 
    1853                                        <td class="fieldname"> 
    1854                                                Date &amp; Time: 
    1855                                        </td> 
    1856                                        <td class="fieldval"> 
    1857                                                <!-- Set the timefields class for the first load of the page; 
    1858                                                                 subsequent changes will take place using javascript without a 
    1859                                                                 page reload. --> 
    1860                                                <xsl:variable name="timeFieldsClass"> 
    1861                                                        <xsl:choose> 
    1862                                                                <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
    1863                                                                <xsl:otherwise>timeFields</xsl:otherwise> 
    1864                                                        </xsl:choose> 
    1865                                                </xsl:variable> 
    1866                                                <xsl:choose> 
    1867                                                        <xsl:when test="form/allDay/input/@checked='checked'"> 
    1868                                                                <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 
    1869                                                                <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/> 
    1870                                                                <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/> 
    1871                                                        </xsl:when> 
    1872                                                        <xsl:otherwise> 
    1873                                                                <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 
    1874                                                                <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"/> 
    1875                                                                <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"/> 
    1876                                                        </xsl:otherwise> 
    1877                                                </xsl:choose> 
    1878                                                all day event<br/> 
    1879                                                <div class="dateStartEndBox"> 
    1880                                                        <strong>Start:</strong> 
    1881                                                        <div class="dateFields"> 
    1882                                                                <span class="startDateLabel">Date </span> 
    1883                                                                <xsl:copy-of select="form/start/month/*"/> 
    1884                                                                <xsl:copy-of select="form/start/day/*"/> 
    1885                                                                <xsl:choose> 
    1886                                                                        <xsl:when test="/bedework/creating = 'true'"> 
    1887                                                                                <xsl:copy-of select="form/start/year/*"/> 
    1888                                                                        </xsl:when> 
    1889                                                                        <xsl:otherwise> 
    1890                                                                                <xsl:copy-of select="form/start/yearText/*"/> 
    1891                                                                        </xsl:otherwise> 
    1892                                                                </xsl:choose> 
    1893                                                        </div> 
    1894                                                        <script language="JavaScript" type="text/javascript"> 
    1895                                                        <xsl:comment> 
    1896                                                                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'); 
    1897                                                        </xsl:comment> 
    1898                                                        </script> 
    1899                                                        <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
    1900                                                        <div class="{$timeFieldsClass}" id="startTimeFields"> 
    1901                                                                <span id="calWidgetStartTimeHider" class="show"> 
    1902                                                                        <xsl:copy-of select="form/start/hour/*"/> 
    1903                                                                        <xsl:copy-of select="form/start/minute/*"/> 
    1904                                                                        <xsl:if test="form/start/ampm"> 
    1905                                                                                <xsl:copy-of select="form/start/ampm/*"/> 
    1906                                                                        </xsl:if> 
    1907                                                                        <xsl:text> </xsl:text> 
    1908                                                                        <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
    1909                                                                </span> 
    1910                                                        </div> 
    1911                                                </div> 
    1912                                                <div class="dateStartEndBox"> 
    1913                                                        <strong>End:</strong> 
    1914                                                        <xsl:choose> 
    1915                                                                <xsl:when test="form/end/type='E'"> 
    1916                                                                        <input type="radio" name="eventEndType" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    1917                                                                </xsl:when> 
    1918                                                                <xsl:otherwise> 
    1919                                                                        <input type="radio" name="eventEndType" value="E" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    1920                                                                </xsl:otherwise> 
    1921                                                        </xsl:choose> 
    1922                                                        Date 
    1923                                                        <xsl:variable name="endDateTimeClass"> 
    1924                                                                <xsl:choose> 
    1925                                                                        <xsl:when test="form/end/type='E'">shown</xsl:when> 
    1926                                                                        <xsl:otherwise>invisible</xsl:otherwise> 
    1927                                                                </xsl:choose> 
    1928                                                        </xsl:variable> 
    1929                                                        <div class="{$endDateTimeClass}" id="endDateTime"> 
    1930                                                                <div class="dateFields"> 
    1931                                                                        <xsl:copy-of select="form/end/dateTime/month/*"/> 
    1932                                                                        <xsl:copy-of select="form/end/dateTime/day/*"/> 
    1933                                                                        <xsl:choose> 
    1934                                                                                <xsl:when test="/bedework/creating = 'true'"> 
    1935                                                                                        <xsl:copy-of select="form/end/dateTime/year/*"/> 
    1936                                                                                </xsl:when> 
    1937                                                                                <xsl:otherwise> 
    1938                                                                                        <xsl:copy-of select="form/end/dateTime/yearText/*"/> 
    1939                                                                                </xsl:otherwise> 
    1940                                                                        </xsl:choose> 
    1941                                                                </div> 
    1942                                                                <script language="JavaScript" type="text/javascript"> 
    1943                                                                <xsl:comment> 
    1944                                                                        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'); 
    1945                                                                </xsl:comment> 
    1946                                                                </script> 
    1947                                                                <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
    1948                                                                <div class="{$timeFieldsClass}" id="endTimeFields"> 
    1949                                                                        <span id="calWidgetEndTimeHider" class="show"> 
    1950                                                                                <xsl:copy-of select="form/end/dateTime/hour/*"/> 
    1951                                                                                <xsl:copy-of select="form/end/dateTime/minute/*"/> 
    1952                                                                                <xsl:if test="form/end/dateTime/ampm"> 
    1953                                                                                        <xsl:copy-of select="form/end/dateTime/ampm/*"/> 
    1954                                                                                </xsl:if> 
    1955                                                                                <xsl:text> </xsl:text> 
    1956                                                                                <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
    1957                                                                        </span> 
    1958                                                                </div> 
    1959                                                        </div><br/> 
    1960                                                        <div id="clock" class="invisible"> 
    1961                                                                <xsl:call-template name="clock"/> 
    1962                                                        </div> 
    1963                                                        <div class="dateFields"> 
    1964                                                                <xsl:choose> 
    1965                                                                        <xsl:when test="form/end/type='D'"> 
    1966                                                                                <input type="radio" name="eventEndType" value="D" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    1967                                                                        </xsl:when> 
    1968                                                                        <xsl:otherwise> 
    1969                                                                                <input type="radio" name="eventEndType" value="D" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    1970                                                                        </xsl:otherwise> 
    1971                                                                </xsl:choose> 
    1972                                                                Duration 
    1973                                                                <xsl:variable name="endDurationClass"> 
    1974                                                                        <xsl:choose> 
    1975                                                                                <xsl:when test="form/end/type='D'">shown</xsl:when> 
    1976                                                                                <xsl:otherwise>invisible</xsl:otherwise> 
    1977                                                                        </xsl:choose> 
    1978                                                                </xsl:variable> 
    1979                                                                <xsl:variable name="durationHrMinClass"> 
    1980                                                                        <xsl:choose> 
    1981                                                                                <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
    1982                                                                                <xsl:otherwise>shown</xsl:otherwise> 
    1983                                                                        </xsl:choose> 
    1984                                                                </xsl:variable> 
    1985                                                                <div class="{$endDurationClass}" id="endDuration"> 
    1986                                                                        <xsl:choose> 
    1987                                                                                <xsl:when test="form/end/duration/weeks/input/@value = '0'"> 
    1988                                                                                <!-- we are using day, hour, minute format --> 
    1989                                                                                <!-- must send either no week value or week value of 0 (zero) --> 
    1990                                                                                        <div class="durationBox"> 
    1991                                                                                                <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 
    1992                                                                                                <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
    1993                                                                                                <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 
    1994                                                                                                <span id="durationHrMin" class="{$durationHrMinClass}"> 
    1995                                                                                                        <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
    1996                                                                                                        <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 
    1997                                                                                                        <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
    1998                                                                                                        <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 
    1999                                                                                                </span> 
    2000                                                                                        </div> 
    2001                                                                                        <span class="durationSpacerText">or</span> 
    2002                                                                                        <div class="durationBox"> 
    2003                                                                                                <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 
    2004                                                                                                <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
    2005                                                                                                <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="true"/>weeks 
    2006                                                                                        </div> 
    2007                                                                                </xsl:when> 
    2008                                                                                <xsl:otherwise> 
    2009                                                                                        <!-- we are using week format --> 
    2010                                                                                        <div class="durationBox"> 
    2011                                                                                                <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 
    2012                                                                                                <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
    2013                                                                                                <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="true"/>days 
    2014                                                                                                <span id="durationHrMin" class="{$durationHrMinClass}"> 
    2015                                                                                                        <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
    2016                                                                                                        <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="true"/>hours 
    2017                                                                                                        <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
    2018                                                                                                        <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="true"/>minutes 
    2019                                                                                                </span> 
    2020                                                                                        </div> 
    2021                                                                                        <span class="durationSpacerText">or</span> 
    2022                                                                                        <div class="durationBox"> 
    2023                                                                                                <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 
    2024                                                                                                <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
    2025                                                                                                <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 
    2026                                                                                        </div> 
    2027                                                                                </xsl:otherwise> 
    2028                                                                        </xsl:choose> 
    2029                                                                </div> 
    2030                                                        </div><br/> 
    2031                                                        <div class="dateFields" id="noDuration"> 
    2032                                                                <xsl:choose> 
    2033                                                                        <xsl:when test="form/end/type='N'"> 
    2034                                                                                <input type="radio" name="eventEndType" value="N" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    2035                                                                        </xsl:when> 
    2036                                                                        <xsl:otherwise> 
    2037                                                                                <input type="radio" name="eventEndType" value="N" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    2038                                                                        </xsl:otherwise> 
    2039                                                                </xsl:choose> 
    2040                                                                This event has no duration / end date 
    2041                                                        </div> 
    2042                                                </div> 
    2043                                        </td> 
    2044                                </tr> 
    2045                                <!--  Status  --> 
    2046                                <tr> 
    2047                                        <td class="fieldname"> 
    2048                                                Status: 
    2049                                        </td> 
    2050                                        <td class="fieldval"> 
    2051                                                <xsl:choose> 
    2052                                                        <xsl:when test="form/status = 'TENTATIVE'"> 
    2053                                                                <input type="radio" name="editEvent.status" value="CONFIRMED"/>confirmed <input type="radio" name="editEvent.status" value="TENTATIVE" checked="checked"/>tentative <input type="radio" name="editEvent.status" value="CANCELLED"/>cancelled 
    2054                                                        </xsl:when> 
    2055                                                        <xsl:when test="form/status = 'CANCELLED'"> 
    2056                                                                <input type="radio" name="editEvent.status" value="CONFIRMED"/>confirmed <input type="radio" name="editEvent.status" value="TENTATIVE"/>tentative <input type="radio" name="editEvent.status" value="CANCELLED" checked="checked"/>cancelled 
    2057                                                        </xsl:when> 
    2058                                                        <xsl:otherwise> 
    2059                                                                <input type="radio" name="editEvent.status" value="CONFIRMED" checked="checked"/>confirmed <input type="radio" name="editEvent.status" value="TENTATIVE"/>tentative <input type="radio" name="editEvent.status" value="CANCELLED"/>cancelled 
    2060                                                        </xsl:otherwise> 
    2061                                                </xsl:choose> 
    2062                                        </td> 
    2063                                </tr> 
    2064                                <!--  Transparency  --> 
    2065                                <tr> 
    2066                                        <td class="fieldname"> 
    2067                                                Effects free/busy: 
    2068                                        </td> 
    2069                                        <td class="fieldval"> 
    2070                                                <xsl:choose> 
    2071                                                        <xsl:when test="form/transparency = 'TRANSPARENT'"> 
    2072                                                                <input type="radio" name="editEvent.transparency" value="OPAQUE"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
     1678          </td> 
     1679        </tr> 
     1680        <!--  Description  --> 
     1681        <tr> 
     1682          <td class="fieldname">Description:</td> 
     1683          <td class="fieldval"> 
     1684            <textarea name="newEvent.description" cols="60" rows="4"> 
     1685              <xsl:value-of select="/bedework/formElements/form/desc/textarea"/> 
     1686            </textarea> 
     1687          </td> 
     1688        </tr> 
     1689        <tr> 
     1690          <td class="fieldname">Location:</td> 
     1691          <td class="fieldval" align="left"> 
     1692            <span class="std-text">choose: </span> 
     1693            <span id="eventFormLocationList"> 
     1694              <select name="locationId"> 
     1695                <option value="-1">select...</option> 
     1696                <xsl:copy-of select="/bedework/formElements/form/location/locationmenu/select/*"/> 
     1697              </select> 
     1698            </span> 
     1699            <span class="std-text"> or add new: </span> 
     1700            <input type="text" name="newLocation.address" value="" /> 
     1701          </td> 
     1702        </tr> 
     1703        <tr> 
     1704          <td class="fieldname">Event Link:</td> 
     1705          <td class="fieldval"> 
     1706            <xsl:variable name="link" select="/bedework/formElements/form/link/input/@value"/> 
     1707            <input type="text" name="newEvent.link" size="80" value="{$link}"/> 
     1708          </td> 
     1709        </tr> 
     1710        <tr> 
     1711          <td class="fieldname">&#160;</td> 
     1712          <td class="fieldval"> 
     1713            <input name="submit" type="submit" value="Submit Event"/>&#160; 
     1714            <input name="cancelled" type="submit" value="Cancel"/> 
     1715          </td> 
     1716        </tr> 
     1717      </table> 
     1718    </form> 
     1719  </xsl:template> 
     1720 
     1721  <xsl:template name="clock"> 
     1722    <div id="bwClock"> 
     1723      <!-- Bedework 24-Hour Clock time selection widget 
     1724          used with resources/bwClock.js and resources/bwClock.css --> 
     1725      <div id="bwClockClock"> 
     1726        <img id="clockMap" src="{$resourcesRoot}/resources/clockMap.gif" width="368" height="368" border="0" alt="" usemap="#bwClockMap" /> 
     1727      </div> 
     1728      <div id="bwClockCover"> 
     1729        <!-- this is a special effect div used simply to cover the pixelated edge 
     1730            where the clock meets the clock box title --> 
     1731      </div> 
     1732      <div id="bwClockBox"> 
     1733        <h2> 
     1734          Bedework 24-Hour Clock 
     1735        </h2> 
     1736        <div id="bwClockDateTypeIndicator"> 
     1737          type 
     1738        </div> 
     1739        <div id="bwClockTime"> 
     1740          select time 
     1741        </div> 
     1742        <div id="bwClockCloseText"> 
     1743          close 
     1744        </div> 
     1745        <div id="bwClockCloseButton"> 
     1746          <a href="javascript:bwClockClose();">X</a> 
     1747        </div> 
     1748      </div> 
     1749      <map name="bwClockMap" id="bwClockMap"> 
     1750        <area shape="rect" alt="close clock" title="close clock" coords="160,167, 200,200" href="javascript:bwClockClose()"/> 
     1751        <area shape="poly" alt="minute 00:55" title="minute 00:55" coords="156,164, 169,155, 156,107, 123,128" href="javascript:bwClockUpdateDateTimeForm('minute','55')" /> 
     1752        <area shape="poly" alt="minute 00:50" title="minute 00:50" coords="150,175, 156,164, 123,128, 103,161" href="javascript:bwClockUpdateDateTimeForm('minute','50')" /> 
     1753        <area shape="poly" alt="minute 00:45" title="minute 00:45" coords="150,191, 150,175, 103,161, 103,206" href="javascript:bwClockUpdateDateTimeForm('minute','45')" /> 
     1754        <area shape="poly" alt="minute 00:40" title="minute 00:40" coords="158,208, 150,191, 105,206, 123,237" href="javascript:bwClockUpdateDateTimeForm('minute','40')" /> 
     1755        <area shape="poly" alt="minute 00:35" title="minute 00:35" coords="171,218, 158,208, 123,238, 158,261" href="javascript:bwClockUpdateDateTimeForm('minute','35')" /> 
     1756        <area shape="poly" alt="minute 00:30" title="minute 00:30" coords="193,218, 172,218, 158,263, 209,263" href="javascript:bwClockUpdateDateTimeForm('minute','30')" /> 
     1757        <area shape="poly" alt="minute 00:25" title="minute 00:25" coords="209,210, 193,218, 209,261, 241,240" href="javascript:bwClockUpdateDateTimeForm('minute','25')" /> 
     1758        <area shape="poly" alt="minute 00:20" title="minute 00:20" coords="216,196, 209,210, 241,240, 261,206" href="javascript:bwClockUpdateDateTimeForm('minute','20')" /> 
     1759        <area shape="poly" alt="minute 00:15" title="minute 00:15" coords="216,178, 216,196, 261,206, 261,159" href="javascript:bwClockUpdateDateTimeForm('minute','15')" /> 
     1760        <area shape="poly" alt="minute 00:10" title="minute 00:10" coords="209,164, 216,178, 261,159, 240,126" href="javascript:bwClockUpdateDateTimeForm('minute','10')" /> 
     1761        <area shape="poly" alt="minute 00:05" title="minute 00:05" coords="196,155, 209,164, 238,126, 206,107" href="javascript:bwClockUpdateDateTimeForm('minute','05')" /> 
     1762        <area shape="poly" alt="minute 00:00" title="minute 00:00" coords="169,155, 196,155, 206,105, 156,105" href="javascript:bwClockUpdateDateTimeForm('minute','00')" /> 
     1763        <area shape="poly" alt="11 PM, 2300 hour" title="11 PM, 2300 hour" coords="150,102, 172,96, 158,1, 114,14" href="javascript:bwClockUpdateDateTimeForm('hour','23')" /> 
     1764        <area shape="poly" alt="10 PM, 2200 hour" title="10 PM, 2200 hour" coords="131,114, 150,102, 114,14, 74,36" href="javascript:bwClockUpdateDateTimeForm('hour','22')" /> 
     1765        <area shape="poly" alt="9 PM, 2100 hour" title="9 PM, 2100 hour" coords="111,132, 131,114, 74,36, 40,69" href="javascript:bwClockUpdateDateTimeForm('hour','21')" /> 
     1766        <area shape="poly" alt="8 PM, 2000 hour" title="8 PM, 2000 hour" coords="101,149, 111,132, 40,69, 15,113" href="javascript:bwClockUpdateDateTimeForm('hour','20')" /> 
     1767        <area shape="poly" alt="7 PM, 1900 hour" title="7 PM, 1900 hour" coords="95,170, 101,149, 15,113, 1,159" href="javascript:bwClockUpdateDateTimeForm('hour','19')" /> 
     1768        <area shape="poly" alt="6 PM, 1800 hour" title="6 PM, 1800 hour" coords="95,196, 95,170, 0,159, 0,204" href="javascript:bwClockUpdateDateTimeForm('hour','18')" /> 
     1769        <area shape="poly" alt="5 PM, 1700 hour" title="5 PM, 1700 hour" coords="103,225, 95,196, 1,205, 16,256" href="javascript:bwClockUpdateDateTimeForm('hour','17')" /> 
     1770        <area shape="poly" alt="4 PM, 1600 hour" title="4 PM, 1600 hour" coords="116,245, 103,225, 16,256, 41,298" href="javascript:bwClockUpdateDateTimeForm('hour','16')" /> 
     1771        <area shape="poly" alt="3 PM, 1500 hour" title="3 PM, 1500 hour" coords="134,259, 117,245, 41,298, 76,332" href="javascript:bwClockUpdateDateTimeForm('hour','15')" /> 
     1772        <area shape="poly" alt="2 PM, 1400 hour" title="2 PM, 1400 hour" coords="150,268, 134,259, 76,333, 121,355" href="javascript:bwClockUpdateDateTimeForm('hour','14')" /> 
     1773        <area shape="poly" alt="1 PM, 1300 hour" title="1 PM, 1300 hour" coords="169,273, 150,268, 120,356, 165,365" href="javascript:bwClockUpdateDateTimeForm('hour','13')" /> 
     1774        <area shape="poly" alt="Noon, 1200 hour" title="Noon, 1200 hour" coords="193,273, 169,273, 165,365, 210,364" href="javascript:bwClockUpdateDateTimeForm('hour','12')" /> 
     1775        <area shape="poly" alt="11 AM, 1100 hour" title="11 AM, 1100 hour" coords="214,270, 193,273, 210,363, 252,352" href="javascript:bwClockUpdateDateTimeForm('hour','11')" /> 
     1776        <area shape="poly" alt="10 AM, 1000 hour" title="10 AM, 1000 hour" coords="232,259, 214,270, 252,352, 291,330" href="javascript:bwClockUpdateDateTimeForm('hour','10')" /> 
     1777        <area shape="poly" alt="9 AM, 0900 hour" title="9 AM, 0900 hour" coords="251,240, 232,258, 291,330, 323,301" href="javascript:bwClockUpdateDateTimeForm('hour','09')" /> 
     1778        <area shape="poly" alt="8 AM, 0800 hour" title="8 AM, 0800 hour" coords="263,219, 251,239, 323,301, 349,261" href="javascript:bwClockUpdateDateTimeForm('hour','08')" /> 
     1779        <area shape="poly" alt="7 AM, 0700 hour" title="7 AM, 0700 hour" coords="269,194, 263,219, 349,261, 363,212" href="javascript:bwClockUpdateDateTimeForm('hour','07')" /> 
     1780        <area shape="poly" alt="6 AM, 0600 hour" title="6 AM, 0600 hour" coords="269,172, 269,193, 363,212, 363,155" href="javascript:bwClockUpdateDateTimeForm('hour','06')" /> 
     1781        <area shape="poly" alt="5 AM, 0500 hour" title="5 AM, 0500 hour" coords="263,150, 269,172, 363,155, 351,109" href="javascript:bwClockUpdateDateTimeForm('hour','05')" /> 
     1782        <area shape="poly" alt="4 AM, 0400 hour" title="4 AM, 0400 hour" coords="251,130, 263,150, 351,109, 325,68" href="javascript:bwClockUpdateDateTimeForm('hour','04')" /> 
     1783        <area shape="poly" alt="3 AM, 0300 hour" title="3 AM, 0300 hour" coords="234,112, 251,130, 325,67, 295,37" href="javascript:bwClockUpdateDateTimeForm('hour','03')" /> 
     1784        <area shape="poly" alt="2 AM, 0200 hour" title="2 AM, 0200 hour" coords="221,102, 234,112, 295,37, 247,11" href="javascript:bwClockUpdateDateTimeForm('hour','02')" /> 
     1785        <area shape="poly" alt="1 AM, 0100 hour" title="1 AM, 0100 hour" coords="196,96, 221,102, 247,10, 209,-1, 201,61, 206,64, 205,74, 199,75" href="javascript:bwClockUpdateDateTimeForm('hour','01')" /> 
     1786        <area shape="poly" alt="Midnight, 0000 hour" title="Midnight, 0000 hour" coords="172,96, 169,74, 161,73, 161,65, 168,63, 158,-1, 209,-1, 201,61, 200,62, 206,64, 205,74, 198,75, 196,96, 183,95" href="javascript:bwClockUpdateDateTimeForm('hour','00')" /> 
     1787      </map> 
     1788    </div> 
     1789  </xsl:template> 
     1790 
     1791  <!--==== EDIT EVENT ====--> 
     1792  <xsl:template match="formElements" mode="editEvent"> 
     1793    <xsl:variable name="subscriptionId" select="subscriptionId"/> 
     1794    <xsl:variable name="calPathEncoded" select="form/calendar/encodedPath"/> 
     1795    <xsl:variable name="calPath" select="form/calendar/path"/> 
     1796    <xsl:variable name="guid" select="guid"/> 
     1797    <xsl:variable name="recurrenceId" select="recurrenceId"/> 
     1798    <!-- The name "eventForm" is referenced by several javascript functions. Do not 
     1799    change it without modifying includes.js --> 
     1800    <form name="eventForm" method="post" action="{$editEvent}" id="standardForm"> 
     1801      <input type="hidden" name="updateEvent" value="true"/> 
     1802      <input type="hidden" name="confirmationid" value="{$confId}"/> 
     1803      <input type="hidden" name="endType" value="date"/> 
     1804      <h2>Edit Event</h2> 
     1805      <table class="common" cellspacing="0"> 
     1806        <tr> 
     1807          <th colspan="2" class="commonHeader"> 
     1808            <div id="eventActions"> 
     1809              <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
     1810                <img src="{$resourcesRoot}/resources/glassFill-icon-viewGray.gif" width="13" height="13" border="0" alt="view"/> 
     1811                View 
     1812              </a> 
     1813              <xsl:if test="currentAccess/current-user-privilege-set/privilege/unbind"> 
     1814               
     1815                <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPathEncoded}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;confirmationid={$confId}"> 
     1816                  <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
     1817                  Delete 
     1818                </a> 
     1819              </xsl:if> 
     1820            </div> 
     1821            Personal Event 
     1822          </th> 
     1823        </tr> 
     1824        <tr> 
     1825          <td class="fieldname"> 
     1826            Title: 
     1827          </td> 
     1828          <td class="fieldval"> 
     1829            <xsl:variable name="title" select="form/title/input/@value"/> 
     1830            <input type="text" name="editEvent.summary" size="80" value="{$title}"/> 
     1831          </td> 
     1832        </tr> 
     1833        <tr> 
     1834          <td class="fieldname"> 
     1835            Calendar: 
     1836          </td> 
     1837          <td class="fieldval"> 
     1838            <xsl:variable name="newCalPath" select="/bedework/formElements/form/calendar/path"/> 
     1839            <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
     1840            <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
     1841            <span id="bwEventCalDisplay"> 
     1842              <xsl:choose> 
     1843                <xsl:when test="contains(/bedework/formElements/form/calendar/path,$userPath)"> 
     1844                  <xsl:value-of select="substring-after(/bedework/formElements/form/calendar/path,$userPath)"/> 
     1845                </xsl:when> 
     1846                <xsl:otherwise> 
     1847                  <xsl:value-of select="/bedework/formElements/form/calendar/path"/> 
     1848                </xsl:otherwise> 
     1849              </xsl:choose> 
     1850            </span> 
     1851            <a href="javascript:launchCalSelectWindow('{$event-selectCalForEvent}')" class="small">[change]</a> 
     1852          </td> 
     1853        </tr> 
     1854        <tr> 
     1855          <td class="fieldname"> 
     1856            Date &amp; Time: 
     1857          </td> 
     1858          <td class="fieldval"> 
     1859            <!-- Set the timefields class for the first load of the page; 
     1860                subsequent changes will take place using javascript without a 
     1861                page reload. --> 
     1862            <xsl:variable name="timeFieldsClass"> 
     1863              <xsl:choose> 
     1864                <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
     1865                <xsl:otherwise>timeFields</xsl:otherwise> 
     1866              </xsl:choose> 
     1867            </xsl:variable> 
     1868            <xsl:choose> 
     1869              <xsl:when test="form/allDay/input/@checked='checked'"> 
     1870                <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 
     1871                <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/> 
     1872                <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/> 
     1873              </xsl:when> 
     1874              <xsl:otherwise> 
     1875                <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 
     1876                <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"/> 
     1877                <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"/> 
     1878              </xsl:otherwise> 
     1879            </xsl:choose> 
     1880            all day event<br/> 
     1881            <div class="dateStartEndBox"> 
     1882              <strong>Start:</strong> 
     1883              <div class="dateFields"> 
     1884                <span class="startDateLabel">Date </span> 
     1885                <xsl:copy-of select="form/start/month/*"/> 
     1886                <xsl:copy-of select="form/start/day/*"/> 
     1887                <xsl:choose> 
     1888                  <xsl:when test="/bedework/creating = 'true'"> 
     1889                    <xsl:copy-of select="form/start/year/*"/> 
     1890                  </xsl:when> 
     1891                  <xsl:otherwise> 
     1892                    <xsl:copy-of select="form/start/yearText/*"/> 
     1893                  </xsl:otherwise> 
     1894                </xsl:choose> 
     1895              </div> 
     1896              <script language="JavaScript" type="text/javascript"> 
     1897              <xsl:comment> 
     1898                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'); 
     1899              </xsl:comment> 
     1900              </script> 
     1901              <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
     1902              <div class="{$timeFieldsClass}" id="startTimeFields"> 
     1903                <span id="calWidgetStartTimeHider" class="show"> 
     1904                  <xsl:copy-of select="form/start/hour/*"/> 
     1905                  <xsl:copy-of select="form/start/minute/*"/> 
     1906                  <xsl:if test="form/start/ampm"> 
     1907                    <xsl:copy-of select="form/start/ampm/*"/> 
     1908                  </xsl:if> 
     1909                  <xsl:text> </xsl:text> 
     1910                  <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
     1911                </span> 
     1912              </div> 
     1913            </div> 
     1914            <div class="dateStartEndBox"> 
     1915              <strong>End:</strong> 
     1916              <xsl:choose> 
     1917                <xsl:when test="form/end/type='E'"> 
     1918                  <input type="radio" name="eventEndType" value="E" checked="checked" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     1919                </xsl:when> 
     1920                <xsl:otherwise> 
     1921                  <input type="radio" name="eventEndType" value="E" onClick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
     1922                </xsl:otherwise> 
     1923              </xsl:choose> 
     1924              Date 
     1925              <xsl:variable name="endDateTimeClass"> 
     1926                <xsl:choose> 
     1927                  <xsl:when test="form/end/type='E'">shown</xsl:when> 
     1928                  <xsl:otherwise>invisible</xsl:otherwise> 
     1929                </xsl:choose> 
     1930              </xsl:variable> 
     1931              <div class="{$endDateTimeClass}" id="endDateTime"> 
     1932                <div class="dateFields"> 
     1933                  <xsl:copy-of select="form/end/dateTime/month/*"/> 
     1934                  <xsl:copy-of select="form/end/dateTime/day/*"/> 
     1935                  <xsl:choose> 
     1936                    <xsl:when test="/bedework/creating = 'true'"> 
     1937                      <xsl:copy-of select="form/end/dateTime/year/*"/> 
     1938                    </xsl:when> 
     1939                    <xsl:otherwise> 
     1940                      <xsl:copy-of select="form/end/dateTime/yearText/*"/> 
     1941                    </xsl:otherwise> 
     1942                  </xsl:choose> 
     1943                </div> 
     1944                <script language="JavaScript" type="text/javascript"> 
     1945                <xsl:comment> 
     1946                  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'); 
     1947                </xsl:comment> 
     1948                </script> 
     1949                <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
     1950                <div class="{$timeFieldsClass}" id="endTimeFields"> 
     1951                  <span id="calWidgetEndTimeHider" class="show"> 
     1952                    <xsl:copy-of select="form/end/dateTime/hour/*"/> 
     1953                    <xsl:copy-of select="form/end/dateTime/minute/*"/> 
     1954                    <xsl:if test="form/end/dateTime/ampm"> 
     1955                      <xsl:copy-of select="form/end/dateTime/ampm/*"/> 
     1956                    </xsl:if> 
     1957                    <xsl:text> </xsl:text> 
     1958                    <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a> 
     1959                  </span> 
     1960                </div> 
     1961              </div><br/> 
     1962              <div id="clock" class="invisible"> 
     1963                <xsl:call-template name="clock"/> 
     1964              </div> 
     1965              <div class="dateFields"> 
     1966                <xsl:choose> 
     1967                  <xsl:when test="form/end/type='D'"> 
     1968                    <input type="radio" name="eventEndType" value="D" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     1969                  </xsl:when> 
     1970                  <xsl:otherwise> 
     1971                    <input type="radio" name="eventEndType" value="D" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
     1972                  </xsl:otherwise> 
     1973                </xsl:choose> 
     1974                Duration 
     1975                <xsl:variable name="endDurationClass"> 
     1976                  <xsl:choose> 
     1977                    <xsl:when test="form/end/type='D'">shown</xsl:when> 
     1978                    <xsl:otherwise>invisible</xsl:otherwise> 
     1979                  </xsl:choose> 
     1980                </xsl:variable> 
     1981                <xsl:variable name="durationHrMinClass"> 
     1982                  <xsl:choose> 
     1983                    <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
     1984                    <xsl:otherwise>shown</xsl:otherwise> 
     1985                  </xsl:choose> 
     1986                </xsl:variable> 
     1987                <div class="{$endDurationClass}" id="endDuration"> 
     1988                  <xsl:choose> 
     1989                    <xsl:when test="form/end/duration/weeks/input/@value = '0'"> 
     1990                    <!-- we are using day, hour, minute format --> 
     1991                    <!-- must send either no week value or week value of 0 (zero) --> 
     1992                      <div class="durationBox"> 
     1993                        <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 
     1994                        <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
     1995                        <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 
     1996                        <span id="durationHrMin" class="{$durationHrMinClass}"> 
     1997                          <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
     1998                          <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 
     1999                          <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
     2000                          <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 
     2001                        </span> 
     2002                      </div> 
     2003                      <span class="durationSpacerText">or</span> 
     2004                      <div class="durationBox"> 
     2005                        <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 
     2006                        <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
     2007                        <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="true"/>weeks 
     2008                      </div> 
     2009                    </xsl:when> 
     2010                    <xsl:otherwise> 
     2011                      <!-- we are using week format --> 
     2012                      <div class="durationBox"> 
     2013                        <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 
     2014                        <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
     2015                        <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="true"/>days 
     2016                        <span id="durationHrMin" class="{$durationHrMinClass}"> 
     2017                          <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
     2018                          <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="true"/>hours 
     2019                          <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
     2020                          <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="true"/>minutes 
     2021                        </span> 
     2022                      </div> 
     2023                      <span class="durationSpacerText">or</span> 
     2024                      <div class="durationBox"> 
     2025                        <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 
     2026                        <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
     2027                        <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 
     2028                      </div> 
     2029                    </xsl:otherwise> 
     2030                  </xsl:choose> 
     2031                </div> 
     2032              </div><br/> 
     2033              <div class="dateFields" id="noDuration"> 
     2034                <xsl:choose> 
     2035                  <xsl:when test="form/end/type='N'"> 
     2036                    <input type="radio" name="eventEndType" value="N" checked="checked" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     2037                  </xsl:when> 
     2038                  <xsl:otherwise> 
     2039                    <input type="radio" name="eventEndType" value="N" onClick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
     2040                  </xsl:otherwise> 
     2041                </xsl:choose> 
     2042                This event has no duration / end date 
     2043              </div> 
     2044            </div> 
     2045          </td> 
     2046        </tr> 
     2047        <!--  Status  --> 
     2048        <tr> 
     2049          <td class="fieldname"> 
     2050            Status: 
     2051          </td> 
     2052          <td class="fieldval"> 
     2053            <xsl:choose> 
     2054              <xsl:when test="form/status = 'TENTATIVE'"> 
     2055                <input type="radio" name="editEvent.status" value="CONFIRMED"/>confirmed <input type="radio" name="editEvent.status" value="TENTATIVE" checked="checked"/>tentative <input type="radio" name="editEvent.status" value="CANCELLED"/>cancelled 
     2056              </xsl:when> 
     2057              <xsl:when test="form/status = 'CANCELLED'"> 
     2058                <input type="radio" name="editEvent.status" value="CONFIRMED"/>confirmed <input type="radio" name="editEvent.status" value="TENTATIVE"/>tentative <input type="radio" name="editEvent.status" value="CANCELLED" checked="checked"/>cancelled 
     2059              </xsl:when> 
     2060              <xsl:otherwise> 
     2061                <input type="radio" name="editEvent.status" value="CONFIRMED" checked="checked"/>confirmed <input type="radio" name="editEvent.status" value="TENTATIVE"/>tentative <input type="radio" name="editEvent.status" value="CANCELLED"/>cancelled 
     2062              </xsl:otherwise> 
     2063            </xsl:choose> 
     2064          </td> 
     2065        </tr> 
     2066        <!--  Transparency  --> 
     2067        <tr> 
     2068          <td class="fieldname"> 
     2069            Effects free/busy: 
     2070          </td> 
     2071          <td class="fieldval"> 
     2072            <xsl:choose> 
     2073              <xsl:when test="form/transparency = 'TRANSPARENT'"> 
     2074                <input type="radio" name="editEvent.transparency" value="OPAQUE"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    20732075                <input type="radio" name="editEvent.transparency" value="TRANSPARENT" checked="checked"/>no <span class="note">(transparent: event status does not affect your free/busy)</span> 
    2074                                                        </xsl:when> 
    2075                                                        <xsl:otherwise> 
    2076                                                                <input type="radio" name="editEvent.transparency" value="OPAQUE" checked="checked"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
     2076              </xsl:when> 
     2077              <xsl:otherwise> 
     2078                <input type="radio" name="editEvent.transparency" value="OPAQUE" checked="checked"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    20772079                <input type="radio" name="editEvent.transparency" value="TRANSPARENT"/>no <span class="note">(transparent: event status does not affect your free/busy)</span> 
    2078                                                        </xsl:otherwise> 
    2079                                                </xsl:choose> 
    2080                                        </td> 
    2081                                </tr> 
    2082                                <!--  Description  --> 
    2083                                <tr> 
    2084                                        <td class="fieldname">Description:</td> 
    2085                                        <td class="fieldval"> 
    2086                                                <textarea name="editEvent.description" cols="60" rows="4"> 
    2087                                                        <xsl:value-of select="/bedework/formElements/form/desc/textarea"/> 
    2088                                                </textarea> 
    2089                                        </td> 
    2090                                </tr> 
    2091                                <tr> 
    2092                                        <td class="fieldname">Location:</td> 
    2093                                        <td class="fieldval" align="left"> 
    2094                                                <span class="std-text">choose: </span> 
    2095                                                <span id="eventFormLocationList"> 
    2096                                                        <select name="eventLocationId"> 
    2097                                                                <option value="-1">select...</option> 
    2098                                                                <xsl:copy-of select="/bedework/formElements/form/location/locationmenu/select/*"/> 
    2099                                                        </select> 
    2100                                                </span> 
    2101                                                <span class="std-text"> or add new: </span> 
    2102                                                <input type="text" name="laddress" value="" /> 
    2103                                        </td> 
    2104                                </tr> 
    2105                                <tr> 
    2106                                        <td class="fieldname">Event Link:</td> 
    2107                                        <td class="fieldval"> 
    2108                                                <xsl:variable name="link" select="form/link/input/@value"/> 
    2109                                                <input type="text" name="editEvent.link" size="80" value="{$link}"/> 
    2110                                        </td> 
    2111                                </tr> 
    2112                                <tr> 
    2113                                        <td class="fieldname">&#160;</td> 
    2114                                        <td class="fieldval"> 
    2115                                                <input name="submit" type="submit" value="Submit Event"/>&#160; 
    2116                                                <input name="cancelled" type="submit" value="Cancel"/> 
    2117                                        </td> 
    2118                                </tr> 
    2119                        </table> 
    2120                </form> 
    2121  
    2122                <div id="sharingBox"> 
    2123                        <h3>Sharing</h3> 
    2124                        <table class="common"> 
    2125                                <tr> 
    2126                                        <th class="commonHeader" colspan="2">Current access:</th> 
    2127                                </tr> 
    2128                                <tr> 
    2129                                        <th>Owner:</th> 
    2130                                        <td class="fieldval"> 
    2131                                                <xsl:value-of select="name(/bedework/access/acl/ace[principal/property/owner]/grant/*)"/> 
    2132                                        </td> 
    2133                                </tr> 
    2134                                <xsl:if test="/bedework/access/acl/ace/principal/href"> 
    2135                                        <tr> 
    2136                                                <th>Users:</th> 
    2137                                                <td> 
    2138                                                        <xsl:for-each select="/bedework/access/acl/ace[principal/href]"> 
    2139                                                                <xsl:value-of select="principal/href"/> (<xsl:value-of select="name(grant/*)"/>)<br/> 
    2140                                                        </xsl:for-each> 
    2141                                                </td> 
    2142                                        </tr> 
    2143                                </xsl:if> 
    2144                        </table> 
    2145                        <form name="eventShareForm" action="{$event-setAccess}" id="shareForm"> 
    2146                                <input type="hidden" name="calPath" value="{$calPath}"/> 
    2147                                <input type="hidden" name="guid" value="{$guid}"/> 
    2148                                <input type="hidden" name="recurid" value="{$recurrenceId}"/> 
    2149                                <p> 
    2150                                        Share this event with:<br/> 
    2151                                        <input type="text" name="who" size="20"/> 
    2152                                        <input type="radio" value="user" name="whoType" checked="checked"/> user 
    2153                                        <input type="radio" value="group" name="whoType"/> group 
    2154                                </p> 
    2155                                <p> 
    2156                                        Access rights:<br/> 
    2157                                        <input type="radio" value="R" name="how" checked="checked"/> read<br/> 
    2158                                        <input type="radio" value="Rc" name="how"/> read/write content<br/> 
    2159                                        <input type="radio" value="f" name="how"/> read free/busy only<br/> 
    2160                                        <input type="radio" value="d" name="how"/> default (reset access) 
    2161                                </p> 
    2162                                <input type="submit" name="submit" value="Submit"/> 
    2163                        </form> 
    2164                </div> 
    2165        </xsl:template> 
    2166  
    2167        <xsl:template match="event" mode="addEventRef"> 
    2168        <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    2169                change it without modifying includes.js --> 
    2170                <form name="eventForm" method="post" action="{$event-addEventRefComplete}" id="standardForm"  enctype="multipart/form-data"> 
    2171                        <xsl:variable name="subscriptionId" select="subscription/id"/> 
    2172                        <xsl:variable name="calPath" select="calendar/path"/> 
    2173                        <xsl:variable name="guid" select="guid"/> 
    2174                        <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    2175                        <input type="hidden" name="subid" value="{$subscriptionId}"/> 
    2176                        <input type="hidden" name="calPath" value="{$calPath}"/> 
    2177                        <input type="hidden" name="guid" value="{$guid}"/> 
    2178                        <input type="hidden" name="recurrenceId" value="{$recurrenceId}"/> 
    2179                        <!-- newCalPath is the path to the calendar in which the reference 
    2180                                         should be placed.  If no value, then default calendar. --> 
    2181                        <input type="hidden" name="newCalPath" value=""/> 
    2182  
    2183                        <h2>Add Event Reference</h2> 
    2184                        <table class="common" cellspacing="0"> 
    2185                                <tr> 
    2186                                        <td class="fieldname"> 
    2187                                                Event: 
    2188                                        </td> 
    2189                                        <td> 
    2190                                                <xsl:value-of select="summary"/> 
    2191                                        </td> 
    2192                                </tr> 
    2193                                <tr> 
    2194                                        <td class="fieldname"> 
    2195                                                Into calendar: 
    2196                                        </td> 
    2197                                        <td align="left"> 
    2198                                                <span id="bwEventCalDisplay"> 
    2199                                                        <em>default calendar</em> 
    2200                                                </span> 
    2201                                                <a href="javascript:launchCalSelectWindow('{$event-selectCalForEvent}')" class="small">[change]</a> 
    2202                                        </td> 
    2203                                </tr> 
    2204                                <tr> 
    2205                                        <td class="fieldname"> 
    2206                                                Affects Free/busy: 
    2207                                        </td> 
    2208                                        <td align="left"> 
    2209                                                <input type="radio" value="OPAQUE" name="transparency"/> yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    2210                                                <input type="radio" value="TRANSPARENT" name="transparency" checked="checked"/> no <span class="note">(transparent: event status does not affect your free/busy)</span> 
    2211                                        </td> 
    2212                                </tr> 
    2213                        </table> 
    2214                        <table border="0" id="submitTable"> 
    2215                                <tr> 
    2216                                        <td> 
    2217                                                <input name="submit" type="submit" value="Continue"/> 
    2218                                                <input name="cancelled" type="submit" value="Cancel"/> 
    2219                                        </td> 
    2220                                </tr> 
    2221                        </table> 
    2222                </form> 
    2223        </xsl:template> 
    2224  
    2225        <!--+++++++++++++++ Free / Busy ++++++++++++++++++++--> 
    2226        <xsl:template match="freebusy"> 
    2227                <h2>Free / Busy</h2> 
    2228                <div id="freeBusyWho">for <xsl:value-of select="day/who"/></div> 
    2229                <table id="freeBusy"> 
    2230                        <tr> 
    2231                                <td>&#160;</td> 
    2232                                <xsl:for-each select="day[position()=1]/period"> 
    2233                                        <th> 
    2234                                                <xsl:choose> 
    2235                                                        <xsl:when test="number(start) mod 200 = 0"> 
    2236                                                                <xsl:apply-templates select="start" mode="timeDisplay"/> 
    2237                                                        </xsl:when> 
    2238                                                        <xsl:otherwise> 
    2239                                                                &#160; 
    2240                                                        </xsl:otherwise> 
    2241                                                </xsl:choose> 
    2242                                        </th> 
    2243                                </xsl:for-each> 
    2244                        </tr> 
    2245                        <xsl:for-each select="day"> 
    2246                                <tr> 
    2247                                        <th> 
    2248                                                <xsl:value-of select="substring(start,1,4)"/>-<xsl:value-of select="substring(start,5,2)"/>-<xsl:value-of select="substring(start,7,2)"/> 
    2249                                        </th> 
    2250                                        <xsl:for-each select="period"> 
    2251                                                <xsl:variable name="startTime"><xsl:apply-templates  select="start" mode="timeDisplay"/></xsl:variable> 
    2252                                                <!-- the start date for the add event link is a concat of the day's date plus the period's time (+ seconds)--> 
    2253                                                <xsl:variable name="startDate"><xsl:value-of select="substring(../start,1,8)"/>T<xsl:value-of select="start"/>00</xsl:variable> 
    2254                                                <xsl:variable name="minutes" select="length"/> 
    2255                                                <xsl:variable name="fbClass"> 
    2256                                                        <xsl:choose> 
    2257                                                                <xsl:when test="fbtype = '0'">busy</xsl:when> 
    2258                                                                <xsl:when test="fbtype = '3'">tentative</xsl:when> 
    2259                                                                <xsl:otherwise>free</xsl:otherwise> 
    2260                                                        </xsl:choose> 
    2261                                                </xsl:variable> 
    2262                                                <td class="{$fbClass}"> 
    2263                                                        <a href="{$initEvent}&amp;startdate={$startDate}&amp;minutes={$minutes}" title="{$startTime}">*</a> 
    2264                                                </td> 
    2265                                        </xsl:for-each> 
    2266                                </tr> 
    2267                        </xsl:for-each> 
    2268                </table> 
    2269  
    2270                <table id="freeBusyKey"> 
    2271                        <tr> 
    2272                                <td class="free">*</td> 
    2273                                <td>free</td> 
    2274                                <td>&#160;</td> 
    2275                                <td class="busy">*</td> 
    2276                                <td>busy</td> 
    2277                                <td>&#160;</td> 
    2278                                <td class="tentative">*</td> 
    2279                                <td>tentative</td> 
    2280                                <td>&#160;</td> 
    2281                                <td> 
    2282                                        <form name="calendarShareForm" action="{$freeBusy-fetch}"> 
    2283                                                View user's free/busy:<br/> 
    2284                                                <input type="text" name="userid" size="20"/> 
    2285                                                <input type="submit" name="submit" value="Submit"/> 
    2286                                        </form> 
    2287                                </td> 
    2288                        </tr> 
    2289                </table> 
    2290  
    2291                <div id="sharingBox"> 
    2292