Changeset 1592

Show
Ignore:
Timestamp:
10/25/07 18:08:15
Author:
johnsa
Message:

websubmit: getting stylesheets prepped

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.css

    r1580 r1592  
    7878} 
    7979/* Header IDs and classes */ 
    80 #bedework #logoTable { 
     80#bedework #headBar { 
     81  text-align: right; 
     82  vertical-align: bottom; 
     83  clear: right; 
     84  height: 80px; 
    8185  padding: 0em; 
    8286  margin: 0em; 
    8387} 
    84 #bedework #logoTable #logoCell { 
    85   white-space: nowrap; 
    86   font-weight: bold; 
    87   font-size: 2em; 
    88 
    89 #bedework #logoTable img { 
     88#bedework #logo { 
     89  float: left; 
    9090  padding: 0 0 2px 5px; 
    9191  margin: 0; 
    9292} 
    93 #bedework #logoTable #schoolLinksCell { 
    94   vertical-align: bottom; 
    95   text-align: right; 
    96   font-size: 0.8em; 
    97   white-space : nowrap; 
    98   padding: 0 2px 2px 0; 
    99 
    100 #bedework #logoTable #schoolLinksCell h2 { 
     93#bedework #headBar h2 { 
    10194  margin: 0 0 2px 0; 
    10295  padding: 0; 
  • trunk/deployment/websubmit/webapp/resources/demoskins/default/default/default.xsl

    r1584 r1592  
    6969  <!-- main --> 
    7070  <xsl:variable name="setup" select="/bedework/urlPrefixes/setup"/> 
    71   <xsl:variable name="setSelection" select="/bedework/urlPrefixes/main/setSelection"/> 
    72   <xsl:variable name="setViewPeriod" select="/bedework/urlPrefixes/main/setViewPeriod"/> 
    73   <!-- events --> 
    74   <xsl:variable name="eventView" select="/bedework/urlPrefixes/event/eventView"/> 
    7571  <xsl:variable name="initEvent" select="/bedework/urlPrefixes/event/initEvent"/> 
    7672  <xsl:variable name="addEvent" select="/bedework/urlPrefixes/event/addEvent"/> 
    77   <xsl:variable name="event-attendeesForEvent" select="/bedework/urlPrefixes/event/attendeesForEvent/a/@href"/> 
    78   <xsl:variable name="event-showAttendeesForEvent" select="/bedework/urlPrefixes/event/showAttendeesForEvent/a/@href"/> 
    79   <xsl:variable name="event-initMeeting" select="/bedework/urlPrefixes/event/initMeeting"/> 
    80   <xsl:variable name="event-addEventRefComplete" select="/bedework/urlPrefixes/event/addEventRefComplete/a/@href"/> 
    81   <xsl:variable name="event-showAccess" select="/bedework/urlPrefixes/event/showAccess/a/@href"/> 
    82   <xsl:variable name="event-setAccess" select="/bedework/urlPrefixes/event/setAccess/a/@href"/> 
    8373  <xsl:variable name="editEvent" select="/bedework/urlPrefixes/event/editEvent"/> 
    8474  <xsl:variable name="gotoEditEvent" select="/bedework/urlPrefixes/event/gotoEditEvent"/> 
    8575  <xsl:variable name="updateEvent" select="/bedework/urlPrefixes/event/updateEvent"/> 
    8676  <xsl:variable name="delEvent" select="/bedework/urlPrefixes/event/delEvent"/> 
    87   <xsl:variable name="delInboxEvent" select="/bedework/urlPrefixes/event/delInboxEvent"/> 
    88   <xsl:variable name="addEventRef" select="/bedework/urlPrefixes/event/addEventRef"/> 
    89   <!-- locations --> 
    90   <xsl:variable name="location-initAdd" select="/bedework/urlPrefixes/location/initAdd/a/@href"/> 
    91   <xsl:variable name="location-initUpdate" select="/bedework/urlPrefixes/location/initUpdate/a/@href"/> 
    92   <xsl:variable name="location-fetchForUpdate" select="/bedework/urlPrefixes/location/fetchForUpdate/a/@href"/> 
    93   <xsl:variable name="location-update" select="/bedework/urlPrefixes/location/update/a/@href"/> 
    94   <xsl:variable name="location-delete" select="/bedework/urlPrefixes/location/delete/a/@href"/> 
    95   <!-- categories --> 
    96   <xsl:variable name="category-initAdd" select="/bedework/urlPrefixes/category/initAdd/a/@href"/> 
    97   <xsl:variable name="category-initUpdate" select="/bedework/urlPrefixes/category/initUpdate/a/@href"/> 
    98   <xsl:variable name="category-fetchForUpdate" select="/bedework/urlPrefixes/category/fetchForUpdate/a/@href"/> 
    99   <xsl:variable name="category-update" select="/bedework/urlPrefixes/category/update/a/@href"/> 
    100   <xsl:variable name="category-delete" select="/bedework/urlPrefixes/category/delete/a/@href"/> 
    101   <!-- calendars --> 
    102   <xsl:variable name="fetchPublicCalendars" select="/bedework/urlPrefixes/calendar/fetchPublicCalendars"/> 
    103   <xsl:variable name="calendar-fetch" select="/bedework/urlPrefixes/calendar/fetch/a/@href"/> 
    104   <xsl:variable name="calendar-fetchDescriptions" select="/bedework/urlPrefixes/calendar/fetchDescriptions/a/@href"/> 
    105   <xsl:variable name="calendar-initAdd" select="/bedework/urlPrefixes/calendar/initAdd/a/@href"/> 
    106   <xsl:variable name="calendar-delete" select="/bedework/urlPrefixes/calendar/delete/a/@href"/> 
    107   <xsl:variable name="calendar-fetchForDisplay" select="/bedework/urlPrefixes/calendar/fetchForDisplay/a/@href"/> 
    108   <xsl:variable name="calendar-fetchForUpdate" select="/bedework/urlPrefixes/calendar/fetchForUpdate/a/@href"/> 
    109   <xsl:variable name="calendar-update" select="/bedework/urlPrefixes/calendar/update/a/@href"/> 
    110   <xsl:variable name="calendar-setAccess" select="/bedework/urlPrefixes/calendar/setAccess/a/@href"/> 
    111   <xsl:variable name="calendar-trash" select="/bedework/urlPrefixes/calendar/trash/a/@href"/> 
    112   <xsl:variable name="calendar-emptyTrash" select="/bedework/urlPrefixes/calendar/emptyTrash/a/@href"/> 
    113   <xsl:variable name="calendar-listForExport" select="/bedework/urlPrefixes/calendar/listForExport/a/@href"/> 
    114   <!-- subscriptions --> 
    115   <xsl:variable name="subscriptions-fetch" select="/bedework/urlPrefixes/subscriptions/fetch/a/@href"/> 
    116   <xsl:variable name="subscriptions-fetchForUpdate" select="/bedework/urlPrefixes/subscriptions/fetchForUpdate/a/@href"/> 
    117   <xsl:variable name="subscriptions-addSubByUri" select="/bedework/urlPrefixes/subscriptions/addSubByUri/a/@href"/> 
    118   <xsl:variable name="subscriptions-subscribeByUri" select="/bedework/urlPrefixes/subscriptions/subscribeByUri/a/@href"/> 
    119   <xsl:variable name="subscriptions-initAdd" select="/bedework/urlPrefixes/subscriptions/initAdd/a/@href"/> 
    120   <xsl:variable name="subscriptions-subscribe" select="/bedework/urlPrefixes/subscriptions/subscribe/a/@href"/> 
    121   <xsl:variable name="subscriptions-inaccessible" select="/bedework/urlPrefixes/subscriptions/inaccessible/a/@href"/> 
    122   <!-- preferences --> 
    123   <xsl:variable name="prefs-fetchForUpdate" select="/bedework/urlPrefixes/prefs/fetchForUpdate/a/@href"/> 
    124   <xsl:variable name="prefs-update" select="/bedework/urlPrefixes/prefs/update/a/@href"/> 
    125   <xsl:variable name="prefs-fetchSchedulingForUpdate" select="/bedework/urlPrefixes/prefs/fetchSchedulingForUpdate/a/@href"/> 
    126   <xsl:variable name="prefs-setAccess" select="/bedework/urlPrefixes/prefs/setAccess/a/@href"/> 
    127   <xsl:variable name="prefs-updateSchedulingPrefs" select="/bedework/urlPrefixes/prefs/updateSchedulingPrefs/a/@href"/> 
    128   <!-- scheduling --> 
    129   <xsl:variable name="showInbox" select="/bedework/urlPrefixes/schedule/showInbox/a/@href"/> 
    130   <xsl:variable name="showOutbox" select="/bedework/urlPrefixes/schedule/showOutbox/a/@href"/> 
    131   <xsl:variable name="schedule-initAttendeeRespond" select="/bedework/urlPrefixes/schedule/initAttendeeRespond/a/@href"/> 
    132   <xsl:variable name="schedule-attendeeRespond" select="/bedework/urlPrefixes/schedule/attendeeRespond/a/@href"/> 
    133   <xsl:variable name="schedule-initAttendeeReply" select="/bedework/urlPrefixes/schedule/initAttendeeReply/a/@href"/> 
    134   <xsl:variable name="schedule-initAttendeeUpdate" select="/bedework/urlPrefixes/schedule/initAttendeeUpdate/a/@href"/> 
    135   <xsl:variable name="schedule-processAttendeeReply" select="/bedework/urlPrefixes/schedule/processAttendeeReply/a/@href"/> 
    136   <xsl:variable name="schedule-processRefresh" select="/bedework/urlPrefixes/schedule/processRefresh/a/@href"/> 
    137   <xsl:variable name="schedule-refresh" select="/bedework/urlPrefixes/schedule/refresh/a/@href"/> 
    138   <!-- misc (mostly import and export) --> 
    139   <xsl:variable name="export" select="/bedework/urlPrefixes/misc/export"/> 
    140   <xsl:variable name="calendar-export" select="/bedework/urlPrefixes/calendar/export"/> 
    14177  <xsl:variable name="initUpload" select="/bedework/urlPrefixes/misc/initUpload/a/@href"/> 
    14278  <xsl:variable name="upload" select="/bedework/urlPrefixes/misc/upload/a/@href"/> 
    143   <!-- search --> 
    144   <xsl:variable name="search" select="/bedework/urlPrefixes/search/search"/> 
    145   <xsl:variable name="search-next" select="/bedework/urlPrefixes/search/next"/> 
    146   <!-- mail --> 
    147   <xsl:variable name="mailEvent" select="/bedework/urlPrefixes/mail/mailEvent"/> 
    148   <!-- alarm --> 
    149   <xsl:variable name="initEventAlarm" select="/bedework/urlPrefixes/alarm/initEventAlarm"/> 
    150   <xsl:variable name="setAlarm" select="/bedework/urlPrefixes/alarm/setAlarm"/> 
    151   <!-- free/busy --> 
    152   <xsl:variable name="freeBusy-fetch" select="/bedework/urlPrefixes/freeBusy/fetch/a/@href"/> 
    153   <xsl:variable name="freeBusy-setAccess" select="/bedework/urlPrefixes/freeBusy/setAccess/a/@href"/> 
    15479 
    15580  <!-- URL of the web application - includes web context --> 
     
    17499        <xsl:call-template name="headSection"/> 
    175100      </head> 
    176       <body> 
    177         <xsl:choose> 
    178           <xsl:when test="/bedework/page != 'inbox' and 
    179                           /bedework/page != 'outbox' and 
    180                           /bedework/page != 'attendeeRespond' and 
    181                           /bedework/page != 'attendeeReply'"> 
    182             <xsl:attribute name="onload">checkStatus(<xsl:value-of select="/bedework/inboxState/numActive"/>,<xsl:value-of select="/bedework/inboxState/changed"/>,'<xsl:value-of select="$showInbox"/>')</xsl:attribute> 
    183           </xsl:when> 
    184         </xsl:choose> 
    185         <xsl:choose> 
    186           <xsl:when test="/bedework/page = 'addEvent'"> 
    187             <xsl:attribute name="onload">focusElement('bwEventTitle');</xsl:attribute> 
    188           </xsl:when> 
    189           <xsl:when test="/bedework/page = 'attendees'"> 
    190             <xsl:attribute name="onload">focusElement('bwRaUri');</xsl:attribute> 
    191           </xsl:when> 
    192           <xsl:when test="/bedework/page = 'modLocation'"> 
    193             <xsl:attribute name="onload">focusElement('bwLocMainAddress');</xsl:attribute> 
    194           </xsl:when> 
    195         </xsl:choose> 
    196         <div id="bedework"><!-- main wrapper div to keep styles encapsulated within portals --> 
     101      <body onload="focusElement('bwEventTitle');"> 
     102        <div id="bedework"><!-- main wrapper div --> 
    197103          <xsl:call-template name="headBar"/> 
    198104          <xsl:call-template name="messagesAndErrors"/> 
    199           <table id="bodyBlock" cellspacing="0"> 
    200             <tr> 
     105            <div id="bodyContent"> 
    201106              <xsl:choose> 
    202                 <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
    203                   <td id="sideBarClosed"> 
    204                     <img src="{$resourcesRoot}/resources/spacer.gif" width="1" height="1" border="0" alt="*"/> 
    205                   </td> 
     107                <xsl:when test="/bedework/page='editEvent'"> 
     108                  <xsl:apply-templates select="/bedework/formElements" mode="editEvent"/> 
     109                </xsl:when> 
     110                <xsl:when test="/bedework/page='upload'"> 
     111                  <xsl:call-template name="upload" /> 
    206112                </xsl:when> 
    207113                <xsl:otherwise> 
    208                   <td id="sideBar"> 
    209                     <xsl:call-template name="sideBar"/> 
    210                   </td> 
     114                  <!-- add event --> 
     115                  <xsl:apply-templates select="/bedework/formElements" mode="addEvent"/> 
    211116                </xsl:otherwise> 
    212117              </xsl:choose> 
    213               <td id="bodyContent"> 
    214                 <xsl:call-template name="tabs"/> 
    215                 <xsl:call-template name="navigation"/> 
    216                 <xsl:call-template name="utilBar"/> 
    217                 <xsl:choose> 
    218                   <xsl:when test="/bedework/page='event'"> 
    219                     <!-- show an event --> 
    220                     <xsl:apply-templates select="/bedework/event"/> 
    221                   </xsl:when> 
    222                   <xsl:when test="/bedework/page='addEvent'"> 
    223                     <xsl:apply-templates select="/bedework/formElements" mode="addEvent"/> 
    224                   </xsl:when> 
    225                   <xsl:when test="/bedework/page='attendees'"> 
    226                     <xsl:call-template name="attendees"/> 
    227                   </xsl:when> 
    228                   <xsl:when test="/bedework/page='editEvent'"> 
    229                     <xsl:apply-templates select="/bedework/formElements" mode="editEvent"/> 
    230                   </xsl:when> 
    231                   <xsl:when test="/bedework/page='addEventRef'"> 
    232                     <xsl:apply-templates select="/bedework/event" mode="addEventRef"/> 
    233                   </xsl:when> 
    234                   <xsl:when test="/bedework/page='alarmOptions'"> 
    235                     <xsl:call-template name="alarmOptions" /> 
    236                   </xsl:when> 
    237                   <xsl:when test="/bedework/page='upload'"> 
    238                     <xsl:call-template name="upload" /> 
    239                   </xsl:when> 
    240                   <xsl:when test="/bedework/page='categoryList'"> 
    241                     <xsl:call-template name="categoryList"/> 
    242                   </xsl:when> 
    243                   <xsl:when test="/bedework/page='modCategory'"> 
    244                     <xsl:call-template name="modCategory"/> 
    245                   </xsl:when> 
    246                   <xsl:when test="/bedework/page='deleteCategoryConfirm'"> 
    247                     <xsl:call-template name="deleteCategoryConfirm"/> 
    248                   </xsl:when> 
    249                   <xsl:when test="/bedework/page='locationList'"> 
    250                     <xsl:call-template name="locationList" /> 
    251                   </xsl:when> 
    252                   <xsl:when test="/bedework/page='modLocation'"> 
    253                     <xsl:call-template name="modLocation"/> 
    254                   </xsl:when> 
    255                   <xsl:when test="/bedework/page='deleteLocationConfirm'"> 
    256                     <xsl:call-template name="deleteLocationConfirm"/> 
    257                   </xsl:when> 
    258                   <xsl:when test="/bedework/page='subscriptions' or 
    259                                   /bedework/page='modSubscription' or 
    260                                   /bedework/page='addSubByUri'"> 
    261                     <xsl:apply-templates select="/bedework/subscriptions"/> 
    262                   </xsl:when> 
    263                   <xsl:when test="/bedework/page='subInaccessible'"> 
    264                     <xsl:call-template name="subInaccessible"/> 
    265                   </xsl:when> 
    266                   <xsl:when test="/bedework/page='calendarList' or 
    267                                   /bedework/page='calendarDescriptions' or 
    268                                   /bedework/page='displayCalendar' or 
    269                                   /bedework/page='modCalendar' or 
    270                                   /bedework/page='deleteCalendarConfirm' or 
    271                                   /bedework/page='calendarReferenced'"> 
    272                     <xsl:apply-templates select="/bedework/calendars" mode="manageCalendars"/> 
    273                   </xsl:when> 
    274                    <xsl:when test="/bedework/page='calendarListForExport'"> 
    275                     <xsl:apply-templates select="/bedework/calendars" mode="exportCalendars"/> 
    276                   </xsl:when> 
    277                   <xsl:when test="/bedework/page='freeBusy'"> 
    278                     <xsl:apply-templates select="/bedework/freebusy" mode="freeBusyPage"/> 
    279                   </xsl:when> 
    280                   <xsl:when test="/bedework/page='modPrefs'"> 
    281                     <xsl:apply-templates select="/bedework/prefs"/> 
    282                   </xsl:when> 
    283                   <xsl:when test="/bedework/page='modSchedulingPrefs'"> 
    284                     <xsl:apply-templates select="/bedework/schPrefs"/> 
    285                   </xsl:when> 
    286                   <xsl:when test="/bedework/page='inbox'"> 
    287                     <xsl:apply-templates select="/bedework/inbox"/> 
    288                   </xsl:when> 
    289                   <xsl:when test="/bedework/page='outbox'"> 
    290                     <xsl:apply-templates select="/bedework/outbox"/> 
    291                   </xsl:when> 
    292                   <xsl:when test="/bedework/page='attendeeRespond'"> 
    293                     <xsl:apply-templates select="/bedework/formElements" mode="attendeeRespond"/> 
    294                   </xsl:when> 
    295                   <xsl:when test="/bedework/page='attendeeReply'"> 
    296                     <xsl:apply-templates select="/bedework/event" mode="attendeeReply"/> 
    297                   </xsl:when> 
    298                   <xsl:when test="/bedework/page='searchResult'"> 
    299                     <xsl:call-template name="searchResult"/> 
    300                   </xsl:when> 
    301                   <xsl:when test="/bedework/page='other'"> 
    302                     <!-- show an arbitrary page --> 
    303                     <xsl:call-template name="selectPage"/> 
    304                   </xsl:when> 
    305                   <xsl:otherwise> 
    306                     <!-- otherwise, show the eventsCalendar --> 
    307                     <!-- main eventCalendar content --> 
    308                     <xsl:choose> 
    309                       <xsl:when test="/bedework/periodname='Day'"> 
    310                         <xsl:call-template name="listView"/> 
    311                       </xsl:when> 
    312                       <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
    313                         <xsl:choose> 
    314                           <xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> 
    315                             <xsl:call-template name="listView"/> 
    316                           </xsl:when> 
    317                           <xsl:otherwise> 
    318                             <xsl:call-template name="weekView"/> 
    319                           </xsl:otherwise> 
    320                         </xsl:choose> 
    321                       </xsl:when> 
    322                       <xsl:when test="/bedework/periodname='Month'"> 
    323                         <xsl:choose> 
    324                           <xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> 
    325                             <xsl:call-template name="listView"/> 
    326                           </xsl:when> 
    327                           <xsl:otherwise> 
    328                             <xsl:call-template name="monthView"/> 
    329                           </xsl:otherwise> 
    330                         </xsl:choose> 
    331                       </xsl:when> 
    332                       <xsl:otherwise> 
    333                         <xsl:call-template name="yearView"/> 
    334                       </xsl:otherwise> 
    335                     </xsl:choose> 
    336                   </xsl:otherwise> 
    337                 </xsl:choose> 
    338               </td> 
    339             </tr> 
    340           </table> 
     118            </div> 
    341119          <!-- footer --> 
    342120          <xsl:call-template name="footer"/> 
     
    348126  <!--==== HEAD SECTION  ====--> 
    349127  <xsl:template name="headSection"> 
    350     <title>Bedework: Personal Calendar Client</title> 
     128    <title>Bedework: Public Event Submission</title> 
    351129    <meta name="robots" content="noindex,nofollow"/> 
    352130    <meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> 
    353131    <link rel="stylesheet" href="{$resourcesRoot}/default/default/default.css"/> 
    354     <link rel="stylesheet" href="{$resourcesRoot}/default/default/subColors.css"/> 
    355     <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> 
    356132    <link rel="icon" type="image/ico" href="{$resourcesRoot}/resources/bedework.ico" /> 
    357133    <!-- note: the non-breaking spaces in the script bodies below are to avoid 
    358134         losing the script closing tags (which avoids browser problems) --> 
    359135    <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js">&#160;</script> 
    360     <xsl:if test="/bedework/page='modSchedulingPrefs' or 
    361                   /bedework/page='modPrefs' or 
    362                   /bedework/page='attendeeRespond'"> 
    363       <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkPrefs.js">&#160;</script> 
    364     </xsl:if> 
    365     <xsl:if test="/bedework/page='modCalendar' or 
    366                   /bedework/page='eventAccess'"> 
    367       <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkAccess.js">&#160;</script> 
    368     </xsl:if> 
    369     <xsl:if test="/bedework/page='addEvent' or 
    370                   /bedework/page='editEvent' or 
    371                   /bedework/page='rdates' or 
    372                   /bedework/page='calendarListForExport'"> 
    373       <script type="text/javascript" src="{$resourcesRoot}/resources/bwClock.js">&#160;</script> 
    374       <link rel="stylesheet" href="{$resourcesRoot}/resources/bwClock.css"/> 
    375       <script type="text/javascript" src="/bedework-common/javascript/dojo/dojo.js">&#160;</script> 
    376       <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkEventForm.js">&#160;</script> 
    377       <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkAccess.js">&#160;</script> 
    378       <xsl:if test="$portalFriendly = 'true'"> 
    379         <script type="text/javascript" src="{$resourcesRoot}/resources/dynCalendarWidget.js">&#160;</script> 
    380         <link rel="stylesheet" href="{$resourcesRoot}/resources/dynCalendarWidget.css"/> 
    381       </xsl:if> 
    382     </xsl:if> 
    383     <xsl:if test="/bedework/editableAccess/access/acl/ace"> 
    384       <script type="text/javascript"> 
    385         <xsl:apply-templates select="/bedework/editableAccess/access/acl/ace" mode="initJS"/> 
    386       </script> 
     136    <script type="text/javascript" src="{$resourcesRoot}/resources/bwClock.js">&#160;</script> 
     137    <link rel="stylesheet" href="{$resourcesRoot}/resources/bwClock.css"/> 
     138    <script type="text/javascript" src="/bedework-common/javascript/dojo/dojo.js">&#160;</script> 
     139    <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkEventForm.js">&#160;</script> 
     140    <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkAccess.js">&#160;</script> 
     141    <xsl:if test="$portalFriendly = 'true'"> 
     142      <script type="text/javascript" src="{$resourcesRoot}/resources/dynCalendarWidget.js">&#160;</script> 
     143      <link rel="stylesheet" href="{$resourcesRoot}/resources/dynCalendarWidget.css"/> 
    387144    </xsl:if> 
    388145    <script type="text/javascript"> 
    389146      <xsl:comment> 
    390147      <![CDATA[ 
    391       function checkStatus(inboxCount,changed,url) { 
    392       // Check status of inbox and outbox and alert user appropriately. 
    393       // Just take care of inbox for now. 
    394         if (inboxCount && changed) { 
    395           var itemStr = "item"; 
    396           if (inboxCount > 1) { 
    397             itemStr = "items"; 
    398           } 
    399           if (confirm("You have " + inboxCount + " pending " + itemStr + " in your inbox.\nGo to inbox?")) { 
    400             window.location.replace(url); 
    401           } 
    402         } 
    403       } 
    404148      function focusElement(id) { 
    405149      // focuses element by id 
     
    431175 
    432176  <xsl:template name="headBar"> 
    433     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="logoTable"> 
    434       <tr> 
    435         <td colspan="3" id="logoCell"><a href="/bedework/"><img src="{$resourcesRoot}/resources/bedeworkLogo.gif" width="292" height="75" border="0" alt="Bedework"/></a></td> 
    436         <td colspan="2" id="schoolLinksCell"> 
    437           <h2>Personal Calendar</h2> 
    438           <a href="{$publicCal}">Public Calendar</a> | 
    439           <a href="http://www.yourschoolhere.edu">School Home</a> | 
    440           <a href="http://www.bedework.org/">Other Link</a> | 
    441           <a href="http://helpdesk.rpi.edu/update.do?catcenterkey=51"> 
    442             Example Calendar Help 
    443           </a> 
    444         </td> 
    445       </tr> 
    446     </table> 
    447     <table id="curDateRangeTable"  cellspacing="0"> 
    448       <tr> 
    449         <td class="sideBarOpenCloseIcon"> 
    450           <xsl:choose> 
    451             <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
    452               <a href="?setappvar=sidebar(opened)"> 
    453                 <img alt="open sidebar" src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/> 
    454               </a> 
    455             </xsl:when> 
    456             <xsl:otherwise> 
    457               <a href="?setappvar=sidebar(closed)"> 
    458                 <img alt="close sidebar" src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/> 
    459               </a> 
    460             </xsl:otherwise> 
    461           </xsl:choose> 
    462         </td> 
    463         <td class="date"> 
    464           <xsl:value-of select="/bedework/firstday/longdate"/> 
    465           <xsl:if test="/bedework/periodname!='Day'"> 
    466             - 
    467             <xsl:value-of select="/bedework/lastday/longdate"/> 
    468           </xsl:if> 
    469         </td> 
    470         <td class="rssPrint"> 
    471           <a href="javascript:window.print()" title="print this view"> 
    472             <img alt="print this view" src="{$resourcesRoot}/resources/std-print-icon.gif" width="20" height="14" border="0"/> print 
    473           </a> 
    474           <a class="rss" href="{$setup}&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a> 
    475         </td> 
    476       </tr> 
    477     </table> 
    478   </xsl:template> 
    479  
    480   <xsl:template name="sideBar"> 
    481     <h3> 
    482       <!--<img alt="manage views" src="{$resourcesRoot}/resources/glassFill-icon-menuButton.gif" width="12" height="11" border="0"/>--> 
    483       views 
    484     </h3> 
    485     <ul id="myViews"> 
    486       <xsl:choose> 
    487         <xsl:when test="/bedework/views/view"> 
    488           <xsl:for-each select="/bedework/views/view"> 
    489             <xsl:variable name="viewName" select="name"/> 
    490             <xsl:choose> 
    491               <xsl:when test="/bedework/selectionState/selectionType = 'view' 
    492                               and name=/bedework/selectionState/view/name"> 
    493                 <li class="selected"><a href="{$setSelection}&amp;viewName={$viewName}"><xsl:value-of select="name"/></a></li> 
    494               </xsl:when> 
    495               <xsl:otherwise> 
    496                 <li><a href="{$setSelection}&amp;viewName={$viewName}"><xsl:value-of select="name"/></a></li> 
    497               </xsl:otherwise> 
    498             </xsl:choose> 
    499           </xsl:for-each> 
    500         </xsl:when> 
    501         <xsl:otherwise> 
    502           <li class="none">no views</li> 
    503         </xsl:otherwise> 
    504       </xsl:choose> 
    505     </ul> 
    506  
    507     <h3> 
    508       <a href="{$calendar-fetch}" title="manage calendars"> 
    509         manage 
     177    <div id="headBar"> 
     178      <a href="/bedework/" id="logo"> 
     179        <img src="{$resourcesRoot}/resources/bedeworkLogo.gif" width="292" height="75" border="0" alt="Bedework"/> 
    510180      </a> 
    511       calendars 
    512     </h3> 
    513     <!-- normal calendars --> 
    514     <ul class="calendarTree"> 
    515       <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar/calendar[calType &lt; 2]" mode="myCalendars"/> 
    516     </ul> 
    517     <!-- special calendars: inbox, outbox, and trash --> 
    518     <ul class="calendarTree"> 
    519       <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar/calendar[calType = 5]" mode="mySpecialCalendars"/> <!-- inbox --> 
    520       <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar/calendar[calType = 6]" mode="mySpecialCalendars"/> <!-- outbox --> 
    521       <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar/calendar[calType = 2]" mode="mySpecialCalendars"/> <!-- trash --> 
    522       <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar/calendar[calType = 3]" mode="mySpecialCalendars"/> <!-- deleted --> 
    523     </ul> 
    524  
    525     <h3> 
    526       <a href="{$subscriptions-fetch}" title="manage subscriptions"> 
    527         manage 
    528       </a> 
    529       subscriptions 
    530     </h3> 
    531     <ul class="calendarTree"> 
    532       <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
    533       <xsl:choose> 
    534         <xsl:when test="/bedework/mySubscriptions/subscription[not(contains(uri,$userPath))]"> 
    535           <xsl:apply-templates select="/bedework/mySubscriptions/subscription[not(contains(uri,$userPath))]" mode="mySubscriptions"/> 
    536         </xsl:when> 
    537         <xsl:otherwise> 
    538           <li class="none">no subscriptions</li> 
    539         </xsl:otherwise> 
    540       </xsl:choose> 
    541     </ul> 
    542  
    543     <h3>options</h3> 
    544     <ul id="sideBarMenu"> 
    545       <li><a href="{$category-initUpdate}">Manage Categories</a></li> 
    546       <li><a href="{$location-initUpdate}">Manage Locations</a></li> 
    547       <li><a href="{$prefs-fetchForUpdate}">Preferences</a></li> 
    548       <li><a href="{$initUpload}" title="upload event">Upload iCAL</a></li> 
    549       <li><a href="{$calendar-listForExport}" title="upload event">Export Calendars</a></li> 
    550     </ul> 
    551   </xsl:template> 
    552  
    553   <xsl:template name="tabs"> 
    554     <xsl:variable name="navAction"> 
    555       <xsl:choose> 
    556         <xsl:when test="/bedework/page='attendees'"><xsl:value-of select="$event-attendeesForEvent"/></xsl:when> 
    557         <xsl:when test="/bedework/page='freeBusy'"><xsl:value-of select="$freeBusy-fetch"/></xsl:when> 
    558         <xsl:otherwise><xsl:value-of select="$setViewPeriod"/></xsl:otherwise> 
    559       </xsl:choose> 
    560     </xsl:variable> 
    561     <table cellspacing="0" id="tabsTable"> 
    562       <tr> 
    563         <td> 
    564           <xsl:choose> 
    565             <xsl:when test="/bedework/periodname='Day'"> 
    566               <a href="{$navAction}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-day-on.gif" width="90" height="20" border="0" alt="DAY"/></a> 
    567             </xsl:when> 
    568             <xsl:otherwise> 
    569               <a href="{$navAction}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-day-off.gif" width="90" height="20" border="0" alt="DAY"/></a> 
    570             </xsl:otherwise> 
    571           </xsl:choose> 
    572         </td> 
    573         <td> 
    574           <xsl:choose> 
    575             <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
    576               <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> 
    577              </xsl:when> 
    578             <xsl:otherwise> 
    579               <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> 
    580              </xsl:otherwise> 
    581           </xsl:choose> 
    582         </td> 
    583         <td> 
    584           <xsl:choose> 
    585             <xsl:when test="/bedework/periodname='Month'"> 
    586               <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> 
    587             </xsl:when> 
    588             <xsl:otherwise> 
    589               <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> 
    590             </xsl:otherwise> 
    591           </xsl:choose> 
    592         </td> 
    593         <td> 
    594           <xsl:choose> 
    595             <!-- don't allow switching to year for free busy view, so only use setViewPeriod action --> 
    596             <xsl:when test="/bedework/periodname='Year'"> 
    597               <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> 
    598             </xsl:when> 
    599             <xsl:otherwise> 
    600               <xsl:choose> 
    601                 <xsl:when test="/bedework/page='attendees' or /bedework/page='freeBusy'"> 
    602                   <img src="{$resourcesRoot}/resources/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/> 
    603                 </xsl:when> 
    604                 <xsl:otherwise> 
    605                   <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> 
    606                 </xsl:otherwise> 
    607               </xsl:choose> 
    608             </xsl:otherwise> 
    609           </xsl:choose> 
    610         </td> 
    611         <td class="rightCell"> 
    612           logged in as 
    613           <xsl:text> </xsl:text> 
    614           <strong><xsl:value-of select="/bedework/userid"/></strong> 
    615           <xsl:text> </xsl:text> 
    616           <span class="logout"><a href="{$setup}&amp;logout=true">logout</a></span> 
    617         </td> 
    618       </tr> 
    619     </table> 
    620   </xsl:template> 
    621  
    622   <xsl:template name="navigation"> 
    623     <xsl:variable name="navAction"> 
    624       <xsl:choose> 
    625         <xsl:when test="/bedework/page='attendees'"><xsl:value-of select="$event-attendeesForEvent"/></xsl:when> 
    626         <xsl:when test="/bedework/page='freeBusy'"><xsl:value-of select="$freeBusy-fetch"/></xsl:when> 
    627         <xsl:otherwise><xsl:value-of select="$setViewPeriod"/></xsl:otherwise> 
    628       </xsl:choose> 
    629     </xsl:variable> 
    630     <table border="0" cellpadding="0" cellspacing="0" id="navigationBarTable"> 
    631       <tr> 
    632         <td class="leftCell"> 
    633           <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> 
    634           <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> 
    635           <xsl:choose> 
    636             <xsl:when test="/bedework/periodname='Year'"> 
    637               <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
    638             </xsl:when> 
    639             <xsl:when test="/bedework/periodname='Month'"> 
    640               <xsl:value-of select="/bedework/firstday/monthname"/>, <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
    641             </xsl:when> 
    642             <xsl:when test="/bedework/periodname='Week'"> 
    643               Week of <xsl:value-of select="substring-after(/bedework/firstday/longdate,', ')"/> 
    644             </xsl:when> 
    645             <xsl:otherwise> 
    646               <xsl:value-of select="/bedework/firstday/longdate"/> 
    647             </xsl:otherwise> 
    648           </xsl:choose> 
    649         </td> 
    650         <td class="todayButton"> 
    651           <a href="{$navAction}&amp;viewType=todayView&amp;date={$curdate}"> 
    652             <img src="{$resourcesRoot}/resources/std-button-today-off.gif" width="54" height="22" border="0" alt="Go to Today" align="left"/> 
    653           </a> 
    654         </td> 
    655         <td align="right" class="gotoForm"> 
    656           <form name="calForm" method="post" action="{$navAction}"> 
    657              <table border="0" cellpadding="0" cellspacing="0"> 
    658               <tr> 
    659                 <xsl:if test="/bedework/periodname!='Year'"> 
    660                   <td> 
    661                     <select name="viewStartDate.month"> 
    662                       <xsl:for-each select="/bedework/monthvalues/val"> 
    663                         <xsl:variable name="temp" select="."/> 
    664                         <xsl:variable name="pos" select="position()"/> 
    665                         <xsl:choose> 
    666                           <xsl:when test="/bedework/monthvalues[start=$temp]"> 
    667                             <option value="{$temp}" selected="selected"> 
    668                               <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
    669                             </option> 
    670                           </xsl:when> 
    671                           <xsl:otherwise> 
    672                             <option value="{$temp}"> 
    673                               <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
    674                             </option> 
    675                           </xsl:otherwise> 
    676                         </xsl:choose> 
    677                       </xsl:for-each> 
    678                     </select> 
    679                   </td> 
    680                   <xsl:if test="/bedework/periodname!='Month'"> 
    681                     <td> 
    682                       <select name="viewStartDate.day"> 
    683                         <xsl:for-each select="/bedework/dayvalues/val"> 
    684                           <xsl:variable name="temp" select="."/> 
    685                           <xsl:variable name="pos" select="position()"/> 
    686                           <xsl:choose> 
    687                             <xsl:when test="/bedework/dayvalues[start=$temp]"> 
    688                               <option value="{$temp}" selected="selected"> 
    689                                 <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
    690                               </option> 
    691                             </xsl:when> 
    692                             <xsl:otherwise> 
    693                               <option value="{$temp}"> 
    694                                 <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
    695                               </option> 
    696                             </xsl:otherwise> 
    697                           </xsl:choose> 
    698                         </xsl:for-each> 
    699                       </select> 
    700                     </td> 
    701                   </xsl:if> 
    702                 </xsl:if> 
    703                 <td> 
    704                   <xsl:variable name="temp" select="/bedework/yearvalues/start"/> 
    705                   <input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/> 
    706                 </td> 
    707                 <td> 
    708                   <input name="submit" type="submit" value="go"/> 
    709                 </td> 
    710               </tr> 
    711             </table> 
    712           </form> 
    713         </td> 
    714       </tr> 
    715     </table> 
    716   </xsl:template> 
    717  
    718   <xsl:template name="utilBar"> 
    719     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="utilBarTable"> 
    720        <tr> 
    721          <td class="leftCell"> 
    722            <xsl:if test="/bedework/page != 'addEvent' or /bedework/page='editEvent'"> 
    723              <input type="button" value="add..." onclick="toggleActionIcons('bwActionIcons-0','bwActionIcons')"/> 
    724              <xsl:call-template name="actionIcons"> 
    725                <xsl:with-param name="actionIconsId">bwActionIcons-0</xsl:with-param> 
    726                <xsl:with-param name="startDate"> 
    727                  <xsl:choose> 
    728                    <xsl:when test="/bedework/periodname = 'day'"><xsl:value-of select="/bedework/firstday/date"/></xsl:when> 
    729                    <xsl:otherwise><xsl:value-of select="/bedework/now/date"/></xsl:otherwise> 
    730                  </xsl:choose> 
    731                </xsl:with-param> 
    732              </xsl:call-template> 
    733            </xsl:if> 
    734          </td> 
    735          <td class="rightCell"> 
    736  
    737            <!-- search --> 
    738            <xsl:if test="/bedework/page!='searchResult'"> 
    739              <form name="searchForm" method="post" action="{$search}"> 
    740                Search: 
    741                <input type="text" name="query" size="15"> 
    742                  <xsl:attribute name="value"><xsl:value-of select="/bedework/searchResults/query"/></xsl:attribute> 
    743                </input> 
    744                <input type="submit" name="submit" value="go"/> 
    745              </form> 
    746            </xsl:if> 
    747  
    748            <!-- show free / busy --> 
    749            <xsl:choose> 
    750              <xsl:when test="/bedework/periodname!='Year'"> 
    751                <xsl:choose> 
    752                  <xsl:when test="/bedework/page='freeBusy'"> 
    753                    <a href="{$setViewPeriod}&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-button-events.gif" width="70" height="21" border="0" alt="show events"/></a> 
    754                  </xsl:when> 
    755                  <xsl:otherwise> 
    756                    <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> 
    757                  </xsl:otherwise> 
    758                </xsl:choose> 
    759              </xsl:when> 
    760              <xsl:otherwise> 
    761                <img src="{$resourcesRoot}/resources/std-button-freebusy-off.gif" width="70" height="21" border="0" alt="show free/busy"/> 
    762              </xsl:otherwise> 
    763            </xsl:choose> 
    764  
    765            <!-- toggle list / calendar view --> 
    766            <xsl:choose> 
    767              <xsl:when test="/bedework/periodname='Day'"> 
    768                <img src="{$resourcesRoot}/resources/std-button-listview-off.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    769              </xsl:when> 
    770              <xsl:when test="/bedework/periodname='Year'"> 
    771                <img src="{$resourcesRoot}/resources/std-button-calview-off.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    772              </xsl:when> 
    773              <xsl:when test="/bedework/periodname='Month'"> 
    774                <xsl:choose> 
    775                  <xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> 
    776                    <a href="{$setup}&amp;setappvar=monthViewMode(cal)" title="toggle list/calendar view"> 
    777                      <img src="{$resourcesRoot}/resources/std-button-calview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    778                    </a> 
    779                  </xsl:when> 
    780                  <xsl:otherwise> 
    781                    <a href="{$setup}&amp;setappvar=monthViewMode(list)" title="toggle list/calendar view"> 
    782                      <img src="{$resourcesRoot}/resources/std-button-listview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    783                    </a> 
    784                  </xsl:otherwise> 
    785                </xsl:choose> 
    786              </xsl:when> 
    787              <xsl:otherwise> 
    788                <xsl:choose> 
    789                  <xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> 
    790                    <a href="{$setup}&amp;setappvar=weekViewMode(cal)" title="toggle list/calendar view"> 
    791                      <img src="{$resourcesRoot}/resources/std-button-calview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    792                    </a> 
    793                  </xsl:when> 
    794                  <xsl:otherwise> 
    795                    <a href="{$setup}&amp;setappvar=weekViewMode(list)" title="toggle list/calendar view"> 
    796                      <img src="{$resourcesRoot}/resources/std-button-listview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    797                    </a> 
    798                  </xsl:otherwise> 
    799                </xsl:choose> 
    800              </xsl:otherwise> 
    801            </xsl:choose> 
    802  
    803            <!-- summary / detailed mode toggle --> 
    804            <xsl:choose> 
    805              <xsl:when test="/bedework/periodname='Year' or 
    806                               (/bedework/periodname='Month' and 
    807                               (/bedework/appvar[key='monthViewMode']/value='cal' or 
    808                                not(/bedework/appvar[key='monthViewMode']))) or 
    809                               (/bedework/periodname='Week' and 
    810                               (/bedework/appvar[key='weekViewMode']/value='cal' or 
    811                                not(/bedework/appvar[key='weekViewMode'])))"> 
    812                <xsl:choose> 
    813                  <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    814                    <img src="{$resourcesRoot}/resources/std-button-summary-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
    815                  </xsl:when> 
    816                  <xsl:otherwise> 
    817                    <img src="{$resourcesRoot}/resources/std-button-details-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
    818                  </xsl:otherwise> 
    819                </xsl:choose> 
    820              </xsl:when> 
    821              <xsl:otherwise> 
    822                <xsl:choose> 
    823                  <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    824                    <a href="{$setup}&amp;setappvar=summaryMode(summary)" title="toggle summary/detailed view"> 
    825                      <img src="{$resourcesRoot}/resources/std-button-summary.gif" width="62" height="21" border="0" alt="toggle summary/detailed view"/> 
    826                    </a> 
    827                  </xsl:when> 
    828                  <xsl:otherwise> 
    829                    <a href="{$setup}&amp;setappvar=summaryMode(details)" title="toggle summary/detailed view"> 
    830                      <img src="{$resourcesRoot}/resources/std-button-details.gif" width="62" height="21" border="0" alt="toggle summary/detailed view"/> 
    831                    </a> 
    832                  </xsl:otherwise> 
    833                </xsl:choose> 
    834              </xsl:otherwise> 
    835            </xsl:choose> 
    836  
    837            <!-- refresh button --> 
    838            <a href="{$setup}"><img src="{$resourcesRoot}/resources/std-button-refresh.gif" width="70" height="21" border="0" alt="refresh view"/></a> 
    839          </td> 
    840        </tr> 
    841     </table> 
    842   </xsl:template> 
    843  
    844   <xsl:template name="actionIcons"> 
    845     <xsl:param name="startDate"/> 
    846     <xsl:param name="actionIconsId"/> 
    847     <br/> 
    848     <div id="{$actionIconsId}" class="invisible"> 
    849        <a href="{$initEvent}&amp;entityType=event&amp;startdate={$startDate}" title="add event" onclick="javascript:changeClass('{$actionIconsId}','invisible')"> 
    850           <img src="{$resourcesRoot}/resources/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="add event"/> 
    851           add event 
    852        </a> 
    853        <a href="{$event-initMeeting}&amp;entityType=event&amp;schedule=request&amp;startdate={$startDate}" title="schedule a meeting" onclick="javascript:changeClass('{$actionIconsId}','invisible')"> 
    854           <img src="{$resourcesRoot}/resources/std-icalMeeting-icon-small.gif" width="12" height="16" border="0" alt="schedule meeting"/> 
    855           schedule meeting 
    856        </a> 
    857        <a href="{$initEvent}&amp;entityType=task&amp;startdate={$startDate}" title="add task" onclick="javascript:changeClass('{$actionIconsId}','invisible')"> 
    858           <img src="{$resourcesRoot}/resources/std-icalTask-icon-small.gif" width="12" height="16" border="0" alt="add task"/> 
    859           add task 
    860        </a> 
    861        <a href="{$event-initMeeting}&amp;entityType=task&amp;schedule=request&amp;startdate={$startDate}" title="schedule a task" onclick="javascript:changeClass('{$actionIconsId}','invisible')"> 
    862           <img src="{$resourcesRoot}/resources/std-icalSchTask-icon-small.gif" width="12" height="16" border="0" alt="schedule task"/> 
    863           schedule task 
    864        </a> 
    865        <a href="{$initUpload}" title="upload event" onclick="javascript:changeClass('{$actionIconsId}','invisible')"> 
    866           <img src="{$resourcesRoot}/resources/std-icalUpload-icon-small.gif" width="12" height="16" border="0" alt="upload event"/> 
    867           upload 
    868        </a> 
    869      </div> 
    870   </xsl:template> 
    871  
    872   <!--==== LIST VIEW  (for day, week, and month) ====--> 
    873   <xsl:template name="listView"> 
    874     <table id="listTable" border="0" cellpadding="0" cellspacing="0"> 
    875       <xsl:choose> 
    876         <xsl:when test="not(/bedework/eventscalendar/year/month/week/day/event)"> 
    877           <tr> 
    878             <td class="noEventsCell"> 
    879               No events to display. 
    880             </td> 
    881           </tr> 
    882         </xsl:when> 
    883         <xsl:otherwise> 
    884           <xsl:for-each select="/bedework/eventscalendar/year/month/week/day[event]"> 
    885             <xsl:if test="/bedework/periodname='Week' or /bedework/periodname='Month' or /bedework/periodname=''"> 
    886               <tr> 
    887                 <td colspan="6" class="dateRow"> 
    888                    <xsl:variable name="date" select="date"/> 
    889                    <xsl:variable name="actionIconsId">bwActionIcons-<xsl:value-of select="value"/></xsl:variable> 
    890                    <div class="listAdd"> 
    891                      <a href="javascript:toggleActionIcons('{$actionIconsId}','bwActionIcons bwActionIconsInList')" title="add..."> 
    892                        add... 
    893                      </a> 
    894                      <xsl:call-template name="actionIcons"> 
    895                        <xsl:with-param name="actionIconsId"><xsl:value-of select="$actionIconsId"/></xsl:with-param> 
    896                        <xsl:with-param name="startDate"><xsl:value-of select="$date"/></xsl:with-param> 
    897                      </xsl:call-template> 
    898                    </div> 
    899                    <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$date}"> 
    900                      <xsl:value-of select="name"/>, <xsl:value-of select="longdate"/> 
    901                    </a> 
    902                  </td> 
    903               </tr> 
    904             </xsl:if> 
    905             <xsl:for-each select="event"> 
    906               <xsl:variable name="id" select="id"/> 
    907               <xsl:variable name="subscriptionId" select="subscription/id"/> 
    908               <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    909               <xsl:variable name="guid" select="guid"/> 
    910               <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    911               <tr> 
    912                 <xsl:variable name="dateRangeStyle"> 
    913                   <xsl:choose> 
    914                     <xsl:when test="start/shortdate = parent::day/shortdate"> 
    915                       <xsl:choose> 
    916                         <xsl:when test="start/allday = 'true'">dateRangeCrossDay</xsl:when> 
    917                         <xsl:when test="start/hour24 &lt; 6">dateRangeEarlyMorning</xsl:when> 
    918                         <xsl:when test="start/hour24 &lt; 12">dateRangeMorning</xsl:when> 
    919                         <xsl:when test="start/hour24 &lt; 18">dateRangeAfternoon</xsl:when> 
    920                         <xsl:otherwise>dateRangeEvening</xsl:otherwise> 
    921                       </xsl:choose> 
    922                     </xsl:when> 
    923                     <xsl:otherwise>dateRangeCrossDay</xsl:otherwise> 
    924                   </xsl:choose> 
    925                 </xsl:variable> 
    926                 <xsl:choose> 
    927                   <xsl:when test="start/allday = 'true' and 
    928                                   start/shortdate = end/shortdate"> 
    929                     <td class="{$dateRangeStyle} center" colspan="3"> 
    930                       all day 
    931                     </td> 
    932                   </xsl:when> 
    933                   <xsl:when test="start/shortdate = end/shortdate and 
    934                                   start/time = end/time"> 
    935                     <td class="{$dateRangeStyle} center" colspan="3"> 
    936                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    937                         <xsl:value-of select="start/time"/> 
    938                       </a> 
    939                     </td> 
    940                   </xsl:when> 
    941                   <xsl:otherwise> 
    942                     <td class="{$dateRangeStyle} right"> 
    943                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    944                       <xsl:choose> 
    945                         <xsl:when test="start/allday = 'true' and 
    946                                         parent::day/shortdate = start/shortdate"> 
    947                           today 
    948                         </xsl:when> 
    949                         <xsl:when test="parent::day/shortdate != start/shortdate"> 
    950                           <span class="littleArrow">&#171;</span>&#160; 
    951                           <xsl:value-of select="start/month"/>/<xsl:value-of select="start/day"/> 
    952                         </xsl:when> 
    953                         <xsl:otherwise> 
    954                           <xsl:value-of select="start/time"/> 
    955                         </xsl:otherwise> 
    956                       </xsl:choose> 
    957                       </a> 
    958                     </td> 
    959                     <td class="{$dateRangeStyle} center"> 
    960                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}">-</a> 
    961                     </td> 
    962                     <td class="{$dateRangeStyle} left"> 
    963                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    964                       <xsl:choose> 
    965                         <xsl:when test="end/allday = 'true' and 
    966                                         parent::day/shortdate = end/shortdate"> 
    967                           today 
    968                         </xsl:when> 
    969                         <xsl:when test="parent::day/shortdate != end/shortdate"> 
    970                           <xsl:value-of select="end/month"/>/<xsl:value-of select="end/day"/> 
    971                           &#160;<span class="littleArrow">&#187;</span> 
    972                         </xsl:when> 
    973                         <xsl:otherwise> 
    974                           <xsl:value-of select="end/time"/> 
    975                         </xsl:otherwise> 
    976                       </xsl:choose> 
    977                       </a> 
    978                     </td> 
    979                   </xsl:otherwise> 
    980                 </xsl:choose> 
    981                 <xsl:variable name="descriptionClass"> 
    982                   <xsl:choose> 
    983                     <xsl:when test="status='CANCELLED'">description bwStatusCancelled</xsl:when> 
    984                     <xsl:when test="status='TENTATIVE'">description bwStatusTentative</xsl:when> 
    985                     <xsl:otherwise>description</xsl:otherwise> 
    986                   </xsl:choose> 
    987                 </xsl:variable> 
    988                 <xsl:variable name="subStyle" select="subscription/subStyle"/> 
    989                 <td class="{$descriptionClass} {$subStyle}"> 
    990                   <xsl:if test="status='CANCELLED'"><strong>CANCELLED: </strong></xsl:if> 
    991                   <xsl:choose> 
    992                     <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    993                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    994                         <xsl:choose> 
    995                           <xsl:when test="summary = ''"> 
    996                             <em>no title</em> 
    997                           </xsl:when> 
    998                           <xsl:otherwise> 
    999                             <strong> 
    1000                               <xsl:value-of select="summary"/>: 
    1001                             </strong> 
    1002                           </xsl:otherwise> 
    1003                         </xsl:choose> 
    1004                         <xsl:value-of select="description"/>&#160; 
    1005                         <em> 
    1006                           <xsl:value-of select="location/address"/> 
    1007                           <xsl:if test="location/subaddress != ''"> 
    1008                             , <xsl:value-of select="location/subaddress"/> 
    1009                           </xsl:if>.&#160; 
    1010                           <xsl:if test="cost!=''"> 
    1011                             <xsl:value-of select="cost"/>.&#160; 
    1012                           </xsl:if> 
    1013                           <xsl:if test="sponsor/name!='none'"> 
    1014                             Contact: <xsl:value-of select="sponsor/name"/> 
    1015                           </xsl:if> 
    1016                         </em> 
    1017                       </a> 
    1018                       <xsl:if test="link != ''"> 
    1019                         <xsl:variable name="link" select="link"/> 
    1020                         <a href="{$link}" class="moreLink"><xsl:value-of select="link"/></a> 
    1021                       </xsl:if> 
    1022                     </xsl:when> 
    1023                     <xsl:otherwise> 
    1024                       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    1025                         <xsl:choose> 
    1026                           <xsl:when test="summary = ''"> 
    1027                             <em>no title</em> 
    1028                           </xsl:when> 
    1029                           <xsl:otherwise> 
    1030                             <xsl:value-of select="summary"/> 
    1031                           </xsl:otherwise> 
    1032                         </xsl:choose> 
    1033                         <xsl:if test="location/address != ''">, <xsl:value-of select="location/address"/></xsl:if> 
    1034                       </a> 
    1035                     </xsl:otherwise> 
    1036                   </xsl:choose> 
    1037                 </td> 
    1038                 <td class="eventLinks"> 
    1039                   <xsl:call-template name="eventLinks"/> 
    1040                 </td> 
    1041                 <td class="smallIcon"> 
    1042                   <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    1043                   <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
    1044                     <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"/> 
    1045                   </a> 
    1046                 </td> 
    1047               </tr> 
    1048             </xsl:for-each> 
    1049           </xsl:for-each> 
    1050         </xsl:otherwise> 
    1051       </xsl:choose> 
    1052     </table> 
    1053   </xsl:template> 
    1054  
    1055   <xsl:template name="eventLinks"> 
    1056     <xsl:variable name="subscriptionId" select="subscription/id"/> 
    1057     <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    1058     <xsl:variable name="guid" select="guid"/> 
    1059     <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    1060     <xsl:if test="currentAccess/current-user-privilege-set/privilege/write-content"> 
    1061       <xsl:choose> 
    1062         <xsl:when test="recurring='true' or recurrenceId != ''"> 
    1063           Edit: 
    1064           <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit master (recurring event)">master</a>, 
    1065           <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="edit instance (recurring event)">instance</a> 
    1066           <br/> 
    1067         </xsl:when> 
    1068         <xsl:otherwise> 
    1069           <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit event"> 
    1070             Edit 
    1071           </a> 
    1072           | 
    1073         </xsl:otherwise> 
    1074       </xsl:choose> 
    1075     </xsl:if> 
    1076     <xsl:if test="not(currentAccess/current-user-privilege-set/privilege/write-content) and not(recurring='true' or recurrenceId != '')"> 
    1077       <!-- temporarily hide from Recurring events --> 
    1078       <xsl:choose> 
    1079         <xsl:when test="recurring='true' or recurrenceId != ''"> 
    1080           Link: 
    1081           <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add master event reference to a calendar">master</a>, 
    1082           <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="add event reference to a calendar">instance</a> 
    1083           <br/> 
    1084         </xsl:when> 
    1085         <xsl:otherwise> 
    1086           <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add event reference to a calendar"> 
    1087             Link 
    1088           </a> 
    1089           | 
    1090         </xsl:otherwise> 
    1091       </xsl:choose> 
    1092     </xsl:if> 
    1093     <xsl:if test="owner != /bedework/userid and public='true'"> 
    1094             <!-- provide this link for public subscriptions; subscriptions to user calendars are 
    1095                  currently too confusing since the current user may be able to add events to the 
    1096                  other calendar, making the ownership test a bad test --> 
    1097       <xsl:variable name="subname" select="subscription/name"/> 
    1098       <a href="{$subscriptions-fetchForUpdate}&amp;subname={$subname}" title="manage/view subscription"> 
    1099         Subscription 
    1100       </a> 
    1101     </xsl:if> 
    1102     <xsl:if test="subscription/unremoveable != 'true'"> 
    1103       | 
    1104       <xsl:choose> 
    1105         <xsl:when test="recurring='true' or recurrenceId != ''"> 
    1106           Delete: 
    1107           <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="delete master (recurring event)">all</a>, 
    1108           <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete instance (recurring event)">instance</a> 
    1109         </xsl:when> 
    1110         <xsl:otherwise> 
    1111           <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete event"> 
    1112             Delete 
    1113           </a> 
    1114         </xsl:otherwise> 
    1115       </xsl:choose> 
    1116     </xsl:if> 
    1117   </xsl:template> 
    1118  
    1119   <!--==== WEEK CALENDAR VIEW ====--> 
    1120   <xsl:template name="weekView"> 
    1121     <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
    1122       <tr> 
    1123         <xsl:for-each select="/bedework/daynames/val"> 
    1124           <th class="dayHeading"><xsl:value-of select="."/></th> 
    1125         </xsl:for-each> 
    1126       </tr> 
    1127       <tr> 
    1128         <xsl:for-each select="/bedework/eventscalendar/year/month/week/day"> 
    1129           <xsl:variable name="dayPos" select="position()"/> 
    1130           <xsl:if test="filler='false'"> 
    1131             <td> 
    1132               <xsl:if test="/bedework/now/date = date"> 
    1133                 <xsl:attribute name="class">today</xsl:attribute> 
    1134               </xsl:if> 
    1135               <xsl:variable name="dayDate" select="date"/> 
    1136               <xsl:variable name="actionIconsId">bwActionIcons-<xsl:value-of select="value"/></xsl:variable> 
    1137               <div class="gridAdd"> 
    1138                 <a href="javascript:toggleActionIcons('{$actionIconsId}','bwActionIcons bwActionIconsInGrid')" title="add..."> 
    1139                   <img src="{$resourcesRoot}/resources/addEvent-forGrid-icon.gif" width="10" height="10" border="0" alt="add..."/> 
    1140                 </a> 
    1141                 <xsl:call-template name="actionIcons"> 
    1142                   <xsl:with-param name="actionIconsId"><xsl:value-of select="$actionIconsId"/></xsl:with-param> 
    1143                   <xsl:with-param name="startDate"><xsl:value-of select="$dayDate"/></xsl:with-param> 
    1144                 </xsl:call-template> 
    1145               </div> 
    1146               <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}" class="dayLink" title="go to day"> 
    1147                 <xsl:value-of select="value"/> 
    1148               </a> 
    1149               <xsl:if test="event"> 
    1150                 <ul> 
    1151                   <xsl:apply-templates select="event" mode="calendarLayout"> 
    1152                     <xsl:with-param name="dayPos" select="$dayPos"/> 
    1153                   </xsl:apply-templates> 
    1154                 </ul> 
    1155               </xsl:if> 
    1156             </td> 
    1157           </xsl:if> 
    1158         </xsl:for-each> 
    1159       </tr> 
    1160     </table> 
    1161   </xsl:template> 
    1162  
    1163   <!--==== MONTH CALENDAR VIEW ====--> 
    1164   <xsl:template name="monthView"> 
    1165     <table id="monthCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
    1166       <tr> 
    1167         <xsl:for-each select="/bedework/daynames/val"> 
    1168           <th class="dayHeading"><xsl:value-of select="."/></th> 
    1169         </xsl:for-each> 
    1170       </tr> 
    1171       <xsl:for-each select="/bedework/eventscalendar/year/month/week"> 
    1172         <tr> 
    1173           <xsl:for-each select="day"> 
    1174             <xsl:variable name="dayPos" select="position()"/> 
    1175             <xsl:choose> 
    1176               <xsl:when test="filler='true'"> 
    1177                 <td class="filler">&#160;</td> 
    1178               </xsl:when> 
    1179               <xsl:otherwise> 
    1180                 <td> 
    1181                   <xsl:if test="/bedework/now/date = date"> 
    1182                     <xsl:attribute name="class">today</xsl:attribute> 
    1183                   </xsl:if> 
    1184                   <xsl:variable name="dayDate" select="date"/> 
    1185                   <xsl:variable name="actionIconsId">bwActionIcons-<xsl:value-of select="value"/></xsl:variable> 
    1186                   <div class="gridAdd"> 
    1187                     <a href="javascript:toggleActionIcons('{$actionIconsId}','bwActionIcons bwActionIconsInGrid')" title="add..."> 
    1188                       <img src="{$resourcesRoot}/resources/addEvent-forGrid-icon.gif" width="10" height="10" border="0" alt="add..."/> 
    1189                     </a> 
    1190                    <xsl:call-template name="actionIcons"> 
    1191                      <xsl:with-param name="actionIconsId"><xsl:value-of select="$actionIconsId"/></xsl:with-param> 
    1192                      <xsl:with-param name="startDate"><xsl:value-of select="$dayDate"/></xsl:with-param> 
    1193                    </xsl:call-template> 
    1194                   </div> 
    1195                   <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}" class="dayLink" title="go to day"> 
    1196                     <xsl:value-of select="value"/> 
    1197                   </a> 
    1198                   <xsl:if test="event"> 
    1199                     <ul> 
    1200                       <xsl:apply-templates select="event" mode="calendarLayout"> 
    1201                         <xsl:with-param name="dayPos" select="$dayPos"/> 
    1202                       </xsl:apply-templates> 
    1203                     </ul> 
    1204                   </xsl:if> 
    1205                 </td> 
    1206               </xsl:otherwise> 
    1207             </xsl:choose> 
    1208           </xsl:for-each> 
    1209         </tr> 
    1210       </xsl:for-each> 
    1211     </table> 
    1212   </xsl:template> 
    1213  
    1214   <!--== EVENTS IN THE CALENDAR GRID ==--> 
    1215   <xsl:template match="event" mode="calendarLayout"> 
    1216     <xsl:param name="dayPos"/> 
    1217     <xsl:variable name="subscriptionId" select="subscription/id"/> 
    1218     <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    1219     <xsl:variable name="guid" select="guid"/> 
    1220     <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    1221     <xsl:variable name="eventRootClass"> 
    1222       <xsl:choose> 
    1223         <!-- Otherwise: Alternating colors for all standard events --> 
    1224         <xsl:when test="position() = 1">event firstEvent</xsl:when> 
    1225         <xsl:otherwise>event</xsl:otherwise> 
    1226       </xsl:choose> 
    1227     </xsl:variable> 
    1228     <xsl:variable name="eventClass"> 
    1229       <xsl:choose> 
    1230         <!-- Special styles for the month grid --> 
    1231         <xsl:when test="status='CANCELLED'">eventCancelled</xsl:when> 
    1232         <xsl:when test="status='TENTATIVE'">eventTentative</xsl:when> 
    1233         <!-- Otherwise: Alternating colors for all standard events --> 
    1234         <xsl:when test="position() mod 2 = 1">eventLinkA</xsl:when> 
    1235         <xsl:otherwise>eventLinkB</xsl:otherwise> 
    1236       </xsl:choose> 
    1237     </xsl:variable> 
    1238     <!-- User defined subscription styles. 
    1239          These are set in the add/modify subscription forms which 
    1240          rely (in this stylesheet) on subColors.css; if present, these 
    1241          override the background-color set by eventClass. User styles should 
    1242          not be used for cancelled events (tentative is ok). --> 
    1243     <xsl:variable name="subscriptionClass"> 
    1244       <xsl:if test="status != 'CANCELLED' and 
    1245                     subscription/subStyle != '' and 
    1246                     subscription/subStyle != 'default'"><xsl:value-of select="subscription/subStyle"/></xsl:if> 
    1247     </xsl:variable> 
    1248     <li> 
    1249       <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" 
    1250         class="{$eventRootClass} {$eventClass} {$subscriptionClass}"> 
    1251         <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
    1252         <xsl:choose> 
    1253           <xsl:when test="start/shortdate != ../shortdate"> 
    1254             (cont) 
    1255           </xsl:when> 
    1256           <xsl:when test="start/allday = 'false'"> 
    1257             <xsl:value-of select="start/time"/>: 
    1258           </xsl:when> 
    1259           <xsl:otherwise> 
    1260             all day: 
    1261           </xsl:otherwise> 
    1262         </xsl:choose> 
    1263         <xsl:choose> 
    1264           <xsl:when test="summary = ''"> 
    1265             <em>no title</em> 
    1266           </xsl:when> 
    1267           <xsl:otherwise> 
    1268             <xsl:value-of select="summary"/> 
    1269           </xsl:otherwise> 
    1270         </xsl:choose> 
    1271         <xsl:variable name="eventTipClass"> 
    1272           <xsl:choose> 
    1273             <xsl:when test="$dayPos &gt; 5">eventTipReverse</xsl:when> 
    1274             <xsl:otherwise>eventTip</xsl:otherwise> 
    1275           </xsl:choose> 
    1276         </xsl:variable> 
    1277         <span class="{$eventTipClass}"> 
    1278           <xsl:if test="status='CANCELLED'"><span class="eventTipStatusCancelled">CANCELLED</span></xsl:if> 
    1279           <xsl:if test="status='TENTATIVE'"><span class="eventTipStatusTentative">TENTATIVE</span></xsl:if> 
    1280           <xsl:choose> 
    1281             <xsl:when test="summary = ''"> 
    1282               <em>no title</em> 
    1283             </xsl:when> 
    1284             <xsl:otherwise> 
    1285               <strong><xsl:value-of select="summary"/></strong><br/> 
    1286             </xsl:otherwise> 
    1287           </xsl:choose> 
    1288           Time: 
    1289           <xsl:choose> 
    1290             <xsl:when test="start/allday = 'false'"> 
    1291               <xsl:value-of select="start/time"/> 
    1292               <xsl:if test="start/time != end/time"> 
    1293                 - <xsl:value-of select="end/time"/> 
    1294               </xsl:if> 
    1295             </xsl:when> 
    1296             <xsl:otherwise> 
    1297               all day 
    1298             </xsl:otherwise> 
    1299           </xsl:choose><br/> 
    1300           <xsl:if test="location/address"> 
    1301             Location: <xsl:value-of select="location/address"/><br/> 
    1302           </xsl:if> 
    1303           Calendar: 
    1304           <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
    1305           <xsl:choose> 
    1306             <xsl:when test="contains(calendar/path,$userPath)"> 
    1307               <xsl:value-of select="substring-after(calendar/path,$userPath)"/> 
    1308             </xsl:when> 
    1309             <xsl:otherwise> 
    1310               <xsl:value-of select="calendar/path"/> 
    1311             </xsl:otherwise> 
    1312           </xsl:choose><br/> 
    1313           Type: 
    1314           <xsl:variable name="entityType"> 
    1315             <xsl:choose> 
    1316               <xsl:when test="entityType = '2'">task</xsl:when> 
    1317               <xsl:when test="scheduleMethod = '2'">meeting</xsl:when> 
    1318               <xsl:otherwise>event</xsl:otherwise> 
    1319             </xsl:choose> 
    1320           </xsl:variable> 
    1321           <xsl:if test="recurring='true' or recurrenceId != ''"> 
    1322             recurring 
    1323           </xsl:if> 
    1324           <xsl:choose> 
    1325             <xsl:when test="owner = /bedework/userid"> 
    1326               personal <xsl:value-of select="$entityType"/> 
    1327             </xsl:when> 
    1328             <xsl:when test="public = 'true'"> 
    1329               public <xsl:value-of select="$entityType"/> 
    1330             </xsl:when> 
    1331             <xsl:otherwise> 
    1332               <xsl:value-of select="$entityType"/> (<xsl:value-of select="calendar/owner"/>) 
    1333             </xsl:otherwise> 
    1334           </xsl:choose> 
    1335         </span> 
    1336       </a> 
    1337     </li> 
    1338   </xsl:template> 
    1339  
    1340   <!--==== YEAR VIEW ====--> 
    1341   <xsl:template name="yearView"> 
    1342     <table id="yearCalendarTable" border="0" cellpadding="0" cellspacing="0"> 
    1343       <tr> 
    1344         <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &lt;= 3]"/> 
    1345       </tr> 
    1346       <tr> 
    1347         <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 3) and (position() &lt;= 6)]"/> 
    1348       </tr> 
    1349       <tr> 
    1350         <xsl:apply-templates select="/bedework/eventscalendar/year/month[(position() &gt; 6) and (position() &lt;= 9)]"/> 
    1351       </tr> 
    1352       <tr> 
    1353         <xsl:apply-templates select="/bedework/eventscalendar/year/month[position() &gt; 9]"/> 
    1354       </tr> 
    1355     </table> 
    1356   </xsl:template> 
    1357  
    1358   <!-- year view month tables --> 
    1359   <xsl:template match="month"> 
    1360     <td> 
    1361       <table class="yearViewMonthTable" border="0" cellpadding="0" cellspacing="0"> 
    1362         <tr> 
    1363           <td colspan="8" class="monthName"> 
    1364             <xsl:variable name="firstDayOfMonth" select="week/day/date"/> 
    1365             <a href="{$setViewPeriod}&amp;viewType=monthView&amp;date={$firstDayOfMonth}"> 
    1366               <xsl:value-of select="longname"/> 
    1367             </a> 
    1368           </td> 
    1369         </tr> 
    1370         <tr> 
    1371           <th>&#160;</th> 
    1372           <xsl:for-each select="/bedework/shortdaynames/val"> 
    1373             <th><xsl:value-of select="."/></th> 
    1374           </xsl:for-each> 
    1375         </tr> 
    1376         <xsl:for-each select="week"> 
    1377           <tr> 
    1378             <td class="weekCell"> 
    1379               <xsl:variable name="firstDayOfWeek" select="day/date"/> 
    1380               <a href="{$setViewPeriod}&amp;viewType=weekView&amp;date={$firstDayOfWeek}"> 
    1381                 <xsl:value-of select="value"/> 
    1382               </a> 
    1383             </td> 
    1384             <xsl:for-each select="day"> 
    1385               <xsl:choose> 
    1386                 <xsl:when test="filler='true'"> 
    1387                   <td class="filler">&#160;</td> 
    1388                 </xsl:when> 
    1389                 <xsl:otherwise> 
    1390                   <td> 
    1391                     <xsl:if test="/bedework/now/date = date"> 
    1392                       <xsl:attribute name="class">today</xsl:attribute> 
    1393                     </xsl:if> 
    1394                     <xsl:variable name="dayDate" select="date"/> 
    1395                     <a href="{$setViewPeriod}&amp;viewType=dayView&amp;date={$dayDate}"> 
    1396                       <xsl:value-of select="value"/> 
    1397                     </a> 
    1398                   </td> 
    1399                 </xsl:otherwise> 
    1400               </xsl:choose> 
    1401             </xsl:for-each> 
    1402           </tr> 
    1403         </xsl:for-each> 
    1404       </table> 
    1405     </td> 
    1406   </xsl:template> 
    1407  
    1408   <!--==== SINGLE EVENT ====--> 
    1409   <xsl:template match="event"> 
    1410     <xsl:variable name="subscriptionId" select="subscription/id"/> 
    1411     <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    1412     <xsl:variable name="guid" select="guid"/> 
    1413     <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    1414     <xsl:variable name="statusClass"> 
    1415       <xsl:choose> 
    1416         <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> 
    1417         <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> 
    1418         <xsl:otherwise>bwStatusConfirmed</xsl:otherwise> 
    1419       </xsl:choose> 
    1420     </xsl:variable> 
    1421     <h2 class="{$statusClass}"> 
    1422       <xsl:if test="status='CANCELLED'">CANCELLED: </xsl:if> 
    1423       <xsl:choose> 
    1424         <xsl:when test="link != ''"> 
    1425           <xsl:variable name="link" select="link"/> 
    1426           <a href="{$link}"> 
    1427             <xsl:value-of select="summary"/> 
    1428           </a> 
    1429         </xsl:when> 
    1430         <xsl:when test="summary = ''"> 
    1431           Event <em>(no title)</em> 
    1432         </xsl:when> 
    1433         <xsl:otherwise> 
    1434           <xsl:value-of select="summary"/> 
    1435         </xsl:otherwise> 
    1436       </xsl:choose> 
    1437     </h2> 
    1438     <table class="common" cellspacing="0"> 
    1439       <tr> 
    1440         <th colspan="2" class="commonHeader"> 
    1441           <div id="eventActions"> 
    1442             <!-- download --> 
    1443             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    1444             <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
    1445               <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"/> 
    1446               Download 
    1447             </a> 
    1448             <xsl:if test="currentAccess/current-user-privilege-set/privilege/write-content"> 
    1449               | 
    1450               <xsl:choose> 
    1451                 <xsl:when test="recurring='true' or recurrenceId != ''"> 
    1452                   <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit master"/> 
    1453                   Edit: 
    1454                   <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit master (recurring event)">master</a>,<a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="edit instance (recurring event)">instance</a> 
    1455                 </xsl:when> 
    1456                 <xsl:otherwise> 
    1457                   <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit event"> 
    1458                     <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit"/> 
    1459                     Edit 
    1460                   </a> 
    1461                 </xsl:otherwise> 
    1462               </xsl:choose> 
    1463             </xsl:if> 
    1464             | 
    1465             <xsl:choose> 
    1466               <xsl:when test="recurring='true' or recurrenceId != ''"> 
    1467                 <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit master"/> 
    1468                 Copy: 
    1469                 <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;copy=true" title="copy master (recurring event)">master</a>,<a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;copy=true" title="copy instance (recurring event)">instance</a> 
    1470               </xsl:when> 
    1471               <xsl:otherwise> 
    1472                 <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;copy=true" title="copy event"> 
    1473                   <img src="{$resourcesRoot}/resources/std-ical_iconEditDkGray.gif" width="12" height="16" border="0" alt="edit"/> 
    1474                   Copy 
    1475                 </a> 
    1476               </xsl:otherwise> 
    1477             </xsl:choose> 
    1478             <xsl:if test="not(currentAccess/current-user-privilege-set/privilege/write-content) and not(recurring='true' or recurrenceId != '')"> 
    1479               <!-- temporarily hide from Recurring events --> 
    1480               | 
    1481               <xsl:choose> 
    1482                 <xsl:when test="recurring='true' or recurrenceId != ''"> 
    1483                   <img src="{$resourcesRoot}/resources/std-ical_iconLinkDkGray.gif" width="12" height="16" border="0" alt="add event reference"/> 
    1484                   Link: 
    1485                   <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add master event reference to a calendar">master</a>,<a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="add event reference to a calendar">instance</a> 
    1486                 </xsl:when> 
    1487                 <xsl:otherwise> 
    1488                   <a href="{$addEventRef}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="add event reference to a calendar"> 
    1489                     <img src="{$resourcesRoot}/resources/std-ical_iconLinkDkGray.gif" width="12" height="16" border="0" alt="add event reference"/> 
    1490                     Link 
    1491                   </a> 
    1492                 </xsl:otherwise> 
    1493               </xsl:choose> 
    1494             </xsl:if> 
    1495             <xsl:if test="owner != /bedework/userid and public='true'"> 
    1496             <!-- provide this link for public subscriptions; subscriptions to user calendars are 
    1497                  currently too confusing since the current user may be able to add events to the 
    1498                  other calendar, making the ownership test a bad test --> 
    1499               | 
    1500               <xsl:variable name="subname" select="subscription/name"/> 
    1501               <a href="{$subscriptions-fetchForUpdate}&amp;subname={$subname}" title="manage/view subscription"> 
    1502                 <img src="{$resourcesRoot}/resources/std-ical_iconSubsDkGray.gif" width="12" height="16" border="0" alt="manage/view subscription"/> 
    1503                 Subscription 
    1504               </a> 
    1505             </xsl:if> 
    1506             <xsl:if test="subscription/removeable != 'true'"> 
    1507               | 
    1508               <xsl:choose> 
    1509                 <xsl:when test="recurring='true' or recurrenceId != ''"> 
    1510                   <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    1511                   Delete: 
    1512                   <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="delete master (recurring event)">all</a>,<a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete instance (recurring event)">instance</a> 
    1513                 </xsl:when> 
    1514                 <xsl:otherwise> 
    1515                   <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete event"> 
    1516                     <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    1517                     Delete 
    1518                   </a> 
    1519                 </xsl:otherwise> 
    1520               </xsl:choose> 
    1521             </xsl:if> 
    1522           </div> 
    1523           <!-- Display type of event --> 
    1524           <xsl:variable name="entityType"> 
    1525             <xsl:choose> 
    1526               <xsl:when test="entityType = '2'">Task</xsl:when> 
    1527               <xsl:when test="scheduleMethod = '2'">Meeting</xsl:when> 
    1528               <xsl:otherwise>Event</xsl:otherwise> 
    1529             </xsl:choose> 
    1530           </xsl:variable> 
    1531           <xsl:if test="recurring='true' or recurrenceId != ''"> 
    1532             Recurring 
    1533           </xsl:if> 
    1534           <xsl:choose> 
    1535             <xsl:when test="public = 'true'"> 
    1536               Public <xsl:value-of select="$entityType"/> 
    1537             </xsl:when> 
    1538             <xsl:when test="owner = /bedework/userid"> 
    1539               Personal <xsl:value-of select="$entityType"/> 
    1540             </xsl:when> 
    1541             <xsl:otherwise> 
    1542               <xsl:value-of select="$entityType"/> (<xsl:value-of select="calendar/owner"/>) 
    1543             </xsl:otherwise> 
    1544           </xsl:choose> 
    1545           <xsl:if test="recurring='true' and recurrenceId = ''"> 
    1546             <xsl:text> </xsl:text> 
    1547             <em>(recurrence master)</em> 
    1548           </xsl:if> 
    1549           <xsl:if test="scheduleMethod = '2'"> 
    1550             <!-- this is a scheduled event (meeting or task) - allow a direct refresh --> 
    1551             <a href="{$schedule-refresh}&amp;method=REFRESH" id="refreshEventAction"> 
    1552               <img src="{$resourcesRoot}/resources/std-icalRefresh-icon-small.gif" width="12" height="16" border="0" alt="send a request to refresh this scheduled event"/> 
    1553               Request refresh 
    1554             </a> 
    1555           </xsl:if> 
    1556         </th> 
    1557       </tr> 
    1558       <tr> 
    1559         <td class="fieldname">When:</td> 
    1560         <td class="fieldval"> 
    1561           <!-- always display local time --> 
    1562           <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 
    1563           <xsl:if test="start/allday = 'false'"> 
    1564             <span class="time"><xsl:value-of select="start/time"/></span> 
    1565           </xsl:if> 
    1566           <xsl:if test="(end/longdate != start/longdate) or 
    1567                         ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 
    1568           <xsl:if test="end/longdate != start/longdate"> 
    1569             <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 
    1570           </xsl:if> 
    1571           <xsl:choose> 
    1572             <xsl:when test="start/allday = 'true'"> 
    1573               <span class="time"><em>(all day)</em></span> 
    1574             </xsl:when> 
    1575             <xsl:when test="end/longdate != start/longdate"> 
    1576               <span class="time"><xsl:value-of select="end/time"/></span> 
    1577             </xsl:when> 
    1578             <xsl:when test="end/time != start/time"> 
    1579               <span class="time"><xsl:value-of select="end/time"/></span> 
    1580             </xsl:when> 
    1581           </xsl:choose> 
    1582           <!-- if timezones are not local, or if floating add labels: --> 
    1583           <xsl:if test="start/timezone/islocal = 'false' or end/timezone/islocal = 'false'"> 
    1584             <xsl:text> </xsl:text> 
    1585             -- 
    1586             <strong> 
    1587               <xsl:choose> 
    1588                 <xsl:when test="start/floating = 'true'"> 
    1589                   Floating time 
    1590                 </xsl:when> 
    1591                 <xsl:otherwise> 
    1592                   Local time 
    1593                 </xsl:otherwise> 
    1594               </xsl:choose> 
    1595             </strong> 
    1596             <br/> 
    1597           </xsl:if> 
    1598           <!-- display in timezone if not local or floating time) --> 
    1599           <xsl:if test="(start/timezone/islocal = 'false' or end/timezone/islocal = 'false') and start/floating = 'false'"> 
    1600             <xsl:choose> 
    1601               <xsl:when test="start/timezone/id != end/timezone/id"> 
    1602                 <!-- need to display both timezones if they differ from start to end --> 
    1603                 <table border="0" cellspacing="0" id="tztable"> 
    1604                   <tr> 
    1605                     <td> 
    1606                       <strong>Start:</strong> 
    1607                     </td> 
    1608                     <td> 
    1609                       <xsl:choose> 
    1610                         <xsl:when test="start/timezone/islocal='true'"> 
    1611                           <xsl:value-of select="start/dayname"/>, 
    1612                           <xsl:value-of select="start/longdate"/> 
    1613                           <xsl:text> </xsl:text> 
    1614                           <span class="time"><xsl:value-of select="start/time"/></span> 
    1615                         </xsl:when> 
    1616                         <xsl:otherwise> 
    1617                           <xsl:value-of select="start/timezone/dayname"/>, 
    1618                           <xsl:value-of select="start/timezone/longdate"/> 
    1619                           <xsl:text> </xsl:text> 
    1620                           <span class="time"><xsl:value-of select="start/timezone/time"/></span> 
    1621                         </xsl:otherwise> 
    1622                       </xsl:choose> 
    1623                     </td> 
    1624                     <td> 
    1625                       -- 
    1626                       <strong><xsl:value-of select="start/timezone/id"/></strong> 
    1627                     </td> 
    1628                   </tr> 
    1629                   <tr> 
    1630                     <td> 
    1631                       <strong>End:</strong> 
    1632                     </td> 
    1633                     <td> 
    1634                       <xsl:choose> 
    1635                         <xsl:when test="end/timezone/islocal='true'"> 
    1636                           <xsl:value-of select="end/dayname"/>, 
    1637                           <xsl:value-of select="end/longdate"/> 
    1638                           <xsl:text> </xsl:text> 
    1639                           <span class="time"><xsl:value-of select="end/time"/></span> 
    1640                         </xsl:when> 
    1641                         <xsl:otherwise> 
    1642                           <xsl:value-of select="end/timezone/dayname"/>, 
    1643                           <xsl:value-of select="end/timezone/longdate"/> 
    1644                           <xsl:text> </xsl:text> 
    1645                           <span class="time"><xsl:value-of select="end/timezone/time"/></span> 
    1646                         </xsl:otherwise> 
    1647                       </xsl:choose> 
    1648                     </td> 
    1649                     <td> 
    1650                       -- 
    1651                       <strong><xsl:value-of select="end/timezone/id"/></strong> 
    1652                     </td> 
    1653                   </tr> 
    1654                 </table> 
    1655               </xsl:when> 
    1656               <xsl:otherwise> 
    1657                 <!-- otherwise, timezones are the same: display as a single line  --> 
    1658                 <xsl:value-of select="start/timezone/dayname"/>, <xsl:value-of select="start/timezone/longdate"/><xsl:text> </xsl:text> 
    1659                 <xsl:if test="start/allday = 'false'"> 
    1660                   <span class="time"><xsl:value-of select="start/timezone/time"/></span> 
    1661                 </xsl:if> 
    1662                 <xsl:if test="(end/timezone/longdate != start/timezone/longdate) or 
    1663                               ((end/timezone/longdate = start/timezone/longdate) and (end/timezone/time != start/timezone/time))"> - </xsl:if> 
    1664                 <xsl:if test="end/timezone/longdate != start/timezone/longdate"> 
    1665                   <xsl:value-of select="substring(end/timezone/dayname,1,3)"/>, <xsl:value-of select="end/timezone/longdate"/><xsl:text> </xsl:text> 
    1666                 </xsl:if> 
    1667                 <xsl:choose> 
    1668                   <xsl:when test="start/allday = 'true'"> 
    1669                     <span class="time"><em>(all day)</em></span> 
    1670                   </xsl:when> 
    1671                   <xsl:when test="end/timezone/longdate != start/timezone/longdate"> 
    1672                     <span class="time"><xsl:value-of select="end/timezone/time"/></span> 
    1673                   </xsl:when> 
    1674                   <xsl:when test="end/timezone/time != start/timezone/time"> 
    1675                     <span class="time"><xsl:value-of select="end/timezone/time"/></span> 
    1676                   </xsl:when> 
    1677                 </xsl:choose> 
    1678                 <xsl:text> </xsl:text> 
    1679                 -- 
    1680                 <strong><xsl:value-of select="start/timezone/id"/></strong> 
    1681               </xsl:otherwise> 
    1682             </xsl:choose> 
    1683           </xsl:if> 
    1684         </td> 
    1685         <!--<th class="icon" rowspan="2"> 
    1686           <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    1687           <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
    1688             <img src="{$resourcesRoot}/resources/std-ical-icon.gif" width="20" height="26" border="0" align="left" alt="Download this event"/> 
    1689           </a> 
    1690         </th>--> 
    1691       </tr> 
    1692       <xsl:if test="location/address != ''"> 
    1693         <tr> 
    1694           <td class="fieldname">Where:</td> 
    1695           <td class="fieldval"> 
    1696             <xsl:choose> 
    1697               <xsl:when test="location/link=''"> 
    1698                 <xsl:value-of select="location/address"/> 
    1699               </xsl:when> 
    1700               <xsl:otherwise> 
    1701                 <xsl:variable name="locationLink" select="location/link"/> 
    1702                 <a href="{$locationLink}"> 
    1703                   <xsl:value-of select="location/address"/> 
    1704                 </a> 
    1705               </xsl:otherwise> 
    1706             </xsl:choose> 
    1707             <xsl:if test="location/subaddress!=''"> 
    1708               <br/><xsl:value-of select="location/subaddress"/> 
    1709             </xsl:if> 
    1710           </td> 
    1711         </tr> 
    1712       </xsl:if> 
    1713       <!--  Percent Complete (only for Tasks)  --> 
    1714       <xsl:if test="percentComplete != ''"> 
    1715         <tr> 
    1716           <td class="fieldname"> 
    1717             % Complete: 
    1718           </td> 
    1719           <td class="fieldval"> 
    1720             <xsl:value-of select="percentComplete"/>% 
    1721           </td> 
    1722         </tr> 
    1723       </xsl:if> 
    1724       <tr> 
    1725         <td class="fieldname">Description:</td> 
    1726         <td class="fieldval"> 
    1727           <xsl:call-template name="replace"> 
    1728             <xsl:with-param name="string" select="description"/> 
    1729             <xsl:with-param name="pattern" select="'&#xA;'"/> 
    1730             <xsl:with-param name="replacement"><br/></xsl:with-param> 
    1731           </xsl:call-template> 
    1732         </td> 
    1733       </tr> 
    1734       <xsl:if test="status !='' and status != 'CONFIRMED'"> 
    1735         <tr> 
    1736           <td class="fieldname">Status:</td> 
    1737           <td class="fieldval"> 
    1738             <xsl:value-of select="status"/> 
    1739           </td> 
    1740         </tr> 
    1741       </xsl:if> 
    1742       <xsl:if test="organizer"> 
    1743         <tr> 
    1744           <td class="fieldname">Organizer:</td> 
    1745           <xsl:variable name="organizerUri" select="organizer/organizerUri"/> 
    1746           <td class="fieldval"> 
    1747             <xsl:choose> 
    1748               <xsl:when test="organizer/cn != ''"> 
    1749                 <xsl:value-of select="organizer/cn"/> 
    1750               </xsl:when> 
    1751               <xsl:otherwise> 
    1752                 <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> 
    1753               </xsl:otherwise> 
    1754             </xsl:choose> 
    1755             <xsl:if test="organizer/organizerUri != ''"> 
    1756               <a href="{$organizerUri}" class="emailIcon" title="email"> 
    1757                 <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    1758               </a> 
    1759             </xsl:if> 
    1760           </td> 
    1761         </tr> 
    1762       </xsl:if> 
    1763       <xsl:if test="attendees/attendee"> 
    1764         <tr> 
    1765           <td class="fieldname">Attendees:</td> 
    1766           <td class="fieldval"> 
    1767             <table id="attendees" cellspacing="0"> 
    1768               <tr> 
    1769                 <th>attendee</th> 
    1770                 <th>role</th> 
    1771                 <th>status</th> 
    1772               </tr> 
    1773               <xsl:for-each select="attendees/attendee"> 
    1774                 <xsl:sort select="cn" order="ascending" case-order="upper-first"/> 
    1775                 <xsl:sort select="attendeeUri" order="ascending" case-order="upper-first"/> 
    1776                 <tr> 
    1777                   <td> 
    1778                     <xsl:variable name="attendeeUri" select="attendeeUri"/> 
    1779                     <a href="{$attendeeUri}" class="emailIcon" title="email"> 
    1780                       <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    1781                     </a> 
    1782                     <xsl:choose> 
    1783                       <xsl:when test="cn != ''"> 
    1784                         <xsl:value-of select="cn"/> 
    1785                       </xsl:when> 
    1786                       <xsl:otherwise> 
    1787                         <xsl:value-of select="substring-after(attendeeUri,'mailto:')"/> 
    1788                       </xsl:otherwise> 
    1789                     </xsl:choose> 
    1790                   </td> 
    1791                   <td class="role"> 
    1792                     <xsl:value-of select="role"/> 
    1793                   </td> 
    1794                   <td class="status"> 
    1795                     <xsl:value-of select="partstat"/> 
    1796                   </td> 
    1797                 </tr> 
    1798               </xsl:for-each> 
    1799             </table> 
    1800             <p> 
    1801               <em> 
    1802                 <a href="{$schedule-initAttendeeUpdate}&amp;initUpdate=yes"> 
    1803                   change my status 
    1804                 </a> 
    1805               </em> 
    1806             </p> 
    1807           </td> 
    1808         </tr> 
    1809       </xsl:if> 
    1810       <xsl:if test="recipient"> 
    1811         <tr> 
    1812           <td class="fieldname">Recipients:</td> 
    1813           <td class="fieldval"> 
    1814             <table id="attendees" cellspacing="0"> 
    1815               <tr> 
    1816                 <th>recipient</th> 
    1817               </tr> 
    1818               <xsl:for-each select="recipient"> 
    1819                 <tr> 
    1820                   <td> 
    1821                     <xsl:choose> 
    1822                       <xsl:when test="contains(.,'mailto:')"> 
    1823                         <xsl:value-of select="substring-after(.,'mailto:')"/> 
    1824                       </xsl:when> 
    1825                       <xsl:otherwise> 
    1826                         <xsl:value-of select="."/> 
    1827                       </xsl:otherwise> 
    1828                     </xsl:choose> 
    1829                     <xsl:variable name="recipientUri" select="."/> 
    1830                     <a href="{$recipientUri}" class="emailIcon" title="email"> 
    1831                       <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    1832                     </a> 
    1833                   </td> 
    1834                 </tr> 
    1835               </xsl:for-each> 
    1836             </table> 
    1837           </td> 
    1838         </tr> 
    1839       </xsl:if> 
    1840       <xsl:if test="cost!=''"> 
    1841         <tr> 
    1842           <td class="fieldname">Cost:</td> 
    1843           <td class="fieldval"><xsl:value-of select="cost"/></td> 
    1844         </tr> 
    1845       </xsl:if> 
    1846       <xsl:if test="link != ''"> 
    1847         <tr> 
    1848           <td class="fieldname">See:</td> 
    1849           <td class="fieldval"> 
    1850             <xsl:variable name="link" select="link"/> 
    1851             <a href="{$link}"><xsl:value-of select="link"/></a> 
    1852           </td> 
    1853         </tr> 
    1854       </xsl:if> 
    1855       <xsl:if test="contact/name!='none'"> 
    1856         <tr> 
    1857           <td class="fieldname">Contact:</td> 
    1858           <td class="fieldval"> 
    1859             <xsl:choose> 
    1860               <xsl:when test="contact/link=''"> 
    1861                 <xsl:value-of select="contact/name"/> 
    1862               </xsl:when> 
    1863               <xsl:otherwise> 
    1864                 <xsl:variable name="sponsorLink" select="contact/link"/> 
    1865                 <a href="{$sponsorLink}"> 
    1866                   <xsl:value-of select="contact/name"/> 
    1867                 </a> 
    1868               </xsl:otherwise> 
    1869             </xsl:choose> 
    1870             <xsl:if test="contact/phone!=''"> 
    1871               <br /><xsl:value-of select="contact/phone"/> 
    1872             </xsl:if> 
    1873             <xsl:if test="contact/email!=''"> 
    1874               <br /> 
    1875               <xsl:variable name="email" select="contact/email"/> 
    1876               <xsl:variable name="subject" select="summary"/> 
    1877               <a href="mailto:{$email}&amp;subject={$subject}"> 
    1878                 <xsl:value-of select="contact/email"/> 
    1879               </a> 
    1880             </xsl:if> 
    1881           </td> 
    1882         </tr> 
    1883       </xsl:if> 
    1884       <xsl:if test="calendar/path!=''"> 
    1885         <tr> 
    1886           <td class="fieldname">Calendar:</td> 
    1887           <td class="fieldval"> 
    1888             <xsl:variable name="calUrl" select="calendar/encodedPath"/> 
    1889             <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
    1890             <a href="{$setSelection}&amp;calUrl={$calUrl}"> 
    1891               <xsl:choose> 
    1892                 <xsl:when test="contains(calendar/path,$userPath)"> 
    1893                   <xsl:value-of select="substring-after(calendar/path,$userPath)"/> 
    1894                 </xsl:when> 
    1895                 <xsl:otherwise> 
    1896                   <xsl:value-of select="calendar/path"/> 
    1897                 </xsl:otherwise> 
    1898               </xsl:choose> 
    1899             </a> 
    1900           </td> 
    1901         </tr> 
    1902       </xsl:if> 
    1903       <xsl:if test="categories/category"> 
    1904         <tr> 
    1905           <td class="fieldname">Categories:</td> 
    1906           <td class="fieldval"> 
    1907             <xsl:for-each select="categories/category"> 
    1908               <xsl:value-of select="word"/><xsl:if test="position() != last()">, </xsl:if> 
    1909             </xsl:for-each> 
    1910           </td> 
    1911         </tr> 
    1912       </xsl:if> 
    1913       <xsl:if test="comments/comment"> 
    1914         <tr> 
    1915           <td class="fieldname">Comments:</td> 
    1916           <td class="fieldval comments"> 
    1917             <xsl:for-each select="comments/comment"> 
    1918               <p><xsl:value-of select="value"/></p> 
    1919             </xsl:for-each> 
    1920           </td> 
    1921         </tr> 
    1922       </xsl:if> 
    1923       <tr> 
    1924         <td class="fieldname filler">&#160;</td> 
    1925         <td class="fieldval">&#160;</td> 
    1926       </tr> 
    1927     </table> 
     181      <h2>Submit an Event</h2> 
     182    </div> 
    1928183  </xsl:template> 
    1929184 
     
    1984239            <th colspan="2" class="commonHeader"> 
    1985240              <div id="eventActions"> 
    1986                 <xsl:if test="not(form/recurringEntity = 'true' and recurrenceId = '')"> 
    1987                   <!-- don't display if a master recurring event (because the master can't be viewed) --> 
    1988                   <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    1989                     <img src="{$resourcesRoot}/resources/glassFill-icon-viewGray.gif" width="13" height="13" border="0" alt="view"/> 
    1990                     View 
    1991                   </a> 
    1992                     | 
    1993                 </xsl:if> 
    1994241                <xsl:choose> 
    1995242                  <xsl:when test="recurrenceId != ''"> 
     
    2133380                       span element which is improperly rendered in the browser --> 
    2134381                </span> 
    2135  
    2136                 <xsl:call-template name="selectCalForEvent"/> 
    2137382 
    2138383              </xsl:otherwise> 
     
    2499744              <xsl:when test="not(form/categories/all/category)"> 
    2500745                no categories defined 
    2501                 <span class="note">(<a href="{$category-initAdd}">add category</a>)</span> 
    2502746              </xsl:when> 
    2503747              <xsl:otherwise> 
     
    2531775    </div> 
    2532776 
    2533  
    2534777    <!-- Details tab --> 
    2535778    <!-- ============== --> 
     
    2542785            <span class="std-text">choose: </span> 
    2543786            <span id="eventFormLocationList"> 
    2544               <!-- 
    2545               <xsl:choose> 
    2546                 <xsl:when test="/bedework/creating = 'true'"> 
    2547                   <select name="locationUid"> 
    2548                     <option value="-1">select...</option> 
    2549                     <xsl:copy-of select="form/location/locationmenu/select/*"/> 
    2550                   </select> 
    2551                 </xsl:when> 
    2552                 <xsl:otherwise> 
    2553                   <select name="eventLocationUid"> 
    2554                     <option value="-1">select...</option> 
    2555                     <xsl:copy-of select="form/location/locationmenu/select/*"/> 
    2556                   </select> 
    2557                 </xsl:otherwise> 
    2558               </xsl:choose> 
    2559               --> 
    2560787              <select name="locationUid"> 
    2561788                <option value="">select...</option> 
     
    2595822          </td> 
    2596823        </tr> 
    2597         <!--<tr> 
    2598           <td class="fieldname"> 
    2599             Type: 
    2600           </td> 
    2601           <td class="fieldval"> 
    2602             <input type="radio" name="schedule" size="80" value="none" checked="checked"> 
    2603               <xsl:if test="form/scheduleMethod = '0'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2604               my event 
    2605             </input> 
    2606             <input type="radio" name="schedule" size="80" value="request"> 
    2607               <xsl:if test="form/scheduleMethod = '2'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2608               meeting request 
    2609             </input> 
    2610             <input type="radio" name="schedule" size="80" value="publish"> 
    2611               <xsl:if test="form/scheduleMethod = '1'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2612               published event 
    2613             </input> 
    2614             <xsl:if test="/bedework/creating = 'false' and form/scheduleMethod = '2'"> 
    2615               <br/><input type="checkbox" name="schedule" value="reconfirm "/> ask attendees to reconfirm 
    2616             </xsl:if> 
    2617           </td> 
    2618         </tr>--> 
    2619         <!--  Recipients and Attendees  --> 
    2620         <!-- 
    2621         <tr> 
    2622           <td class="fieldname"> 
    2623             Recipients &amp;<br/> Attendees: 
    2624           </td> 
    2625           <td class="fieldval posrelative"> 
    2626             <input type="button" value="Manage recipients and attendees" onclick="launchSizedWindow('{$event-showAttendeesForEvent}','500','400')" class="small"/> 
    2627           </td> 
    2628         </tr>--> 
    2629824        <!--  Status  --> 
    2630825        <tr> 
     
    32371432    </div> 
    32381433 
    3239     <!-- Access tab --> 
    3240     <!-- ========== --> 
    3241     <div id="bwEventTab-Access" class="invisible"> 
    3242       <div id="sharingBox"> 
    3243         <xsl:choose> 
    3244           <xsl:when test="/bedework/editableAccess/access/acl"> 
    3245             <xsl:apply-templates select="/bedework/editableAccess/access/acl" mode="currentAccess"> 
    3246               <xsl:with-param name="action" select="$event-setAccess"/> 
    3247               <xsl:with-param name="calPathEncoded" select="$calPathEncoded"/> 
    3248               <xsl:with-param name="guid" select="$guid"/> 
    3249               <xsl:with-param name="recurrenceId" select="$recurrenceId"/> 
    3250               <xsl:with-param name="method">2</xsl:with-param> 
    3251             </xsl:apply-templates> 
    3252           </xsl:when> 
    3253           <xsl:otherwise> 
    3254             <h3>Current Access:</h3> 
    3255             <table class="common scheduling" id="bwCurrentAccess"> 
    3256               <thead> 
    3257                 <tr> 
    3258                   <th>Entry</th> 
    3259                   <th>Access</th> 
    3260                   <th>Inherited from</th> 
    3261                   <td></td> 
    3262                 </tr> 
    3263               </thead> 
    3264               <tbody> 
    3265                 <tr id="bwEventNoAcl"> 
    3266                   <td colspan="4">no access defined</td> 
    3267                 </tr> 
    3268               </tbody> 
    3269             </table> 
    3270           </xsl:otherwise> 
    3271         </xsl:choose> 
    3272         <xsl:call-template name="entityAccessForm"> 
    3273           <xsl:with-param name="method">2</xsl:with-param> 
    3274         </xsl:call-template> 
    3275       </div> 
    3276     </div> 
    3277  
    3278     <!-- Scheduling tab --> 
    3279     <!-- ============== --> 
    3280     <div id="bwEventTab-Scheduling" class="invisible"> 
    3281       <div id="scheduling"> 
    3282         <xsl:if test="form/attendees/attendee"> 
    3283           <xsl:apply-templates select="form/attendees"> 
    3284             <xsl:with-param name="trash">no</xsl:with-param> 
    3285           </xsl:apply-templates> 
    3286         </xsl:if> 
    3287  
    3288         <xsl:if test="form/recipients/recipient"> 
    3289           <xsl:apply-templates select="form/recipients"> 
    3290             <xsl:with-param name="trash">no</xsl:with-param> 
    3291           </xsl:apply-templates> 
    3292         </xsl:if> 
    3293         <p class="editAttendees"> 
    3294           <xsl:choose> 
    3295             <xsl:when test="form/scheduleMethod = '2'"> 
    3296               <input name="editEventAttendees" type="submit" value="edit attendees and recipients"/> 
    3297             </xsl:when> 
    3298             <xsl:otherwise> 
    3299               <xsl:choose> 
    3300                 <xsl:when test="form/entityType = '2'"> 
    3301                   <input name="makeEventIntoMeeting" type="submit" value="schedule this task with other users"/> 
    3302                 </xsl:when> 
    3303                 <xsl:otherwise> 
    3304                   <input name="makeEventIntoMeeting" type="submit" value="make into meeting - invite attendees and recipients"/> 
    3305                 </xsl:otherwise> 
    3306               </xsl:choose> 
    3307             </xsl:otherwise> 
    3308           </xsl:choose> 
    3309         </p> 
    3310       </div> 
    3311     </div> 
    3312  
    33131434    <div class="eventSubmitButtons"> 
    33141435      <xsl:choose> 
     
    34971618  </xsl:template> 
    34981619 
    3499   <xsl:template name="attendees"> 
    3500     <h2> 
    3501       <span class="formButtons"><input type="button" value="continue" onclick="window.location='{$gotoEditEvent}'"/></span> 
    3502         Schedule Meeting or Task 
    3503     </h2> 
    3504  
    3505     <div id="recipientsAndAttendees"> 
    3506       <h4> Add attendees and recipients</h4> 
    3507       <form name="raForm" id="recipientsAndAttendeesForm" action="{$event-attendeesForEvent}" method="post"> 
    3508         <div id="raContent"> 
    3509           <div id="raFields"> 
    3510             <input name="uri" width="40" id="bwRaUri"/> 
    3511             <input type="submit" value="add" /> 
    3512             &#160; 
    3513             <input type="checkbox" name="recipient" value="true" checked="checked"/> recipient 
    3514             <input type="checkbox" name="attendee" value="true" checked="checked"/> attendee 
    3515             &#160; 
    3516             Role: 
    3517             <select name="role"> 
    3518               <option value="REQ-PARTICIPANT">required participant</option> 
    3519               <option value="OPT-PARTICIPANT">optional participant</option> 
    3520               <option value="CHAIR">chair</option> 
    3521               <option value="NON-PARTICIPANT">non-participant</option> 
    3522             </select> 
    3523             &#160; 
    3524             Status: 
    3525             <select name="partstat"> 
    3526               <option value="NEEDS-ACTION">needs action</option> 
    3527               <option value="ACCEPTED">accepted</option> 
    3528               <option value="DECLINED">declined</option> 
    3529               <option value="TENTATIVE">tentative</option> 
    3530               <option value="DELEGATED">delegated</option> 
    3531             </select> 
    3532           </div> 
    3533  
    3534           <xsl:if test="/bedework/attendees/attendee"> 
    3535             <xsl:apply-templates select="/bedework/attendees"/> 
    3536           </xsl:if> 
    3537  
    3538           <xsl:if test="/bedework/recipients/recipient"> 
    3539             <xsl:apply-templates select="/bedework/recipients"/> 
    3540           </xsl:if> 
    3541  
    3542           <xsl:apply-templates select="/bedework/freebusy" mode="freeBusyGrid"> 
    3543             <xsl:with-param name="aggregation">true</xsl:with-param> 
    3544             <xsl:with-param name="type">meeting</xsl:with-param> 
    3545           </xsl:apply-templates> 
    3546  
    3547           <div class="eventSubmitButtons"> 
    3548             <input type="button" value="continue" onclick="window.location='{$gotoEditEvent}'"/> 
    3549           </div> 
    3550         </div> 
    3551       </form> 
    3552     </div> 
    3553   </xsl:template> 
    3554  
    3555   <xsl:template match="freebusy" mode="freeBusyGrid"> 
    3556     <xsl:param name="aggregation">false</xsl:param> 
    3557     <xsl:param name="type">normal</xsl:param> 
    3558       <table id="freeBusy"> 
    3559         <tr> 
    3560           <td></td> 
    3561           <th colspan="24" class="left"> 
    3562             Freebusy for 
    3563             <span class="who"> 
    3564               <xsl:choose> 
    3565                 <xsl:when test="$aggregation = 'true'"> 
    3566                   all attendees 
    3567                 </xsl:when> 
    3568                 <xsl:when test="starts-with(fbattendee/recipient,'mailto:')"> 
    3569                   <xsl:value-of select="substring-after(fbattendee/recipient,'mailto:')"/> 
    3570                 </xsl:when> 
    3571                 <xsl:otherwise> 
    3572                   <xsl:value-of select="fbattendee/recipient"/> 
    3573                 </xsl:otherwise> 
    3574               </xsl:choose> 
    3575             </span> 
    3576           </th> 
    3577           <!-- at some point allow switching of timezones: 
    3578           <th colspan="32" class="right"> 
    3579             <xsl:variable name="currentTimezone">America/Los_Angeles</xsl:variable> 
    3580             <xsl:value-of select="$formattedStartDate"/> to <xsl:value-of select="$formattedEndDate"/> 
    3581             <select name="timezone" id="timezonesDropDown" onchange="submit()"> 
    3582               <xsl:for-each select="/bedework-fbaggregator/timezones/tzid"> 
    3583                 <option> 
    3584                   <xsl:attribute name="value"><xsl:value-of select="."/></xsl:attribute> 
    3585                   <xsl:if test="node() = $currentTimezone"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    3586                   <xsl:value-of select="."/> 
    3587                 </option> 
    3588               </xsl:for-each> 
    3589             </select> 
    3590           </th>--> 
    3591         </tr> 
    3592         <tr> 
    3593           <td>&#160;</td> 
    3594           <td colspan="12" class="morning">AM</td> 
    3595           <td colspan="12" class="evening">PM</td> 
    3596         </tr> 
    3597         <tr> 
    3598           <td>&#160;</td> 
    3599           <xsl:for-each select="day[position()=1]/period"> 
    3600             <td class="timeLabels"> 
    3601               <xsl:choose> 
    3602                 <xsl:when test="number(start) mod 200 = 0"> 
    3603                   <xsl:call-template name="timeFormatter"> 
    3604                     <xsl:with-param name="timeString" select="start"/> 
    3605                     <xsl:with-param name="showMinutes">no</xsl:with-param> 
    3606                     <xsl:with-param name="showAmPm">no</xsl:with-param> 
    3607                   </xsl:call-template> 
    3608                 </xsl:when> 
    3609                 <xsl:otherwise> 
    3610                   &#160; 
    3611                 </xsl:otherwise> 
    3612               </xsl:choose> 
    3613             </td> 
    3614           </xsl:for-each> 
    3615         </tr> 
    3616         <xsl:for-each select="day"> 
    3617           <tr> 
    3618             <td class="dayDate"><xsl:value-of select="number(substring(dateString,5,2))"/>-<xsl:value-of select="number(substring(dateString,7,2))"/></td> 
    3619             <xsl:for-each select="period"> 
    3620               <xsl:variable name="startTime" select="start"/> 
    3621               <!-- the start date for the add event link is a concat of the day's date plus the period's time (+ seconds)--> 
    3622               <xsl:variable name="startDate"><xsl:value-of select="../dateString"/>T<xsl:value-of select="start"/>00</xsl:variable> 
    3623               <xsl:variable name="meetingDuration" select="length"/> 
    3624               <td> 
    3625                 <xsl:attribute name="class"> 
    3626                   <xsl:choose> 
    3627                     <xsl:when test="fbtype = '0'">busy</xsl:when> 
    3628                     <xsl:when test="fbtype = '3'">tentative</xsl:when> 
    3629                     <xsl:otherwise>free</xsl:otherwise> 
    3630                   </xsl:choose> 
    3631                 </xsl:attribute> 
    3632                 <xsl:variable name="action"> 
    3633                   <xsl:choose> 
    3634                     <xsl:when test="$aggregation = 'true'"><xsl:value-of select="$updateEvent"/></xsl:when> 
    3635                     <xsl:otherwise><xsl:value-of select="$initEvent"/></xsl:otherwise> 
    3636                   </xsl:choose> 
    3637                 </xsl:variable> 
    3638                 <xsl:variable name="urlString"> 
    3639                   <xsl:choose> 
    3640                    <xsl:when test="$type='meeting'"><xsl:value-of select="$action"/>&amp;meetingStartdt=<xsl:value-of select="$startDate"/>&amp;meetingDuration=<xsl:value-of select="$meetingDuration"/>&amp;initDates=yes</xsl:when> 
    3641                    <xsl:otherwise><xsl:value-of select="$action"/>&amp;startdate=<xsl:value-of select="$startDate"/>&amp;minutes=<xsl:value-of select="$meetingDuration"/></xsl:otherwise> 
    3642                  </xsl:choose> 
    3643                 </xsl:variable> 
    3644                 <a href="{$urlString}"> 
    3645                   <xsl:choose> 
    3646                     <xsl:when test="((numBusy &gt; 0) and (numBusy &lt; 9)) or ((numTentative &gt; 0) and (numTentative &lt; 9)) and (number(numBusy) + number(numTentative) &lt; 9)"> 
    3647                       <xsl:value-of select="number(numBusy) + number(numTentative)"/> 
    3648                     </xsl:when> 
    3649                     <xsl:otherwise><img src="{$resourcesRoot}/resources/spacer.gif" width="10" height="20" border="0" alt="f"/></xsl:otherwise> 
    3650                   </xsl:choose> 
    3651                   <span class="eventTip"> 
    3652                     <xsl:value-of select="substring(../dateString,1,4)"/>-<xsl:value-of select="number(substring(../dateString,5,2))"/>-<xsl:value-of select="number(substring(../dateString,7,2))"/> 
    3653                     <br/> 
    3654                     <strong> 
    3655                       <xsl:call-template name="timeFormatter"> 
    3656                         <xsl:with-param name="timeString" select="$startTime"/> 
    3657                       </xsl:call-template> 
    3658                     </strong> 
    3659                     <xsl:if test="numBusy &gt; 0"> 
    3660                       <br/><xsl:value-of select="numBusy"/> busy 
    3661                     </xsl:if> 
    3662                     <xsl:if test="numTentative &gt; 0"> 
    3663                       <br/><xsl:value-of select="numTentative"/> tentative 
    3664                     </xsl:if> 
    3665                     <xsl:if test="numBusy = 0 and numTentative = 0"> 
    3666                       <br/><em>all free</em> 
    3667                     </xsl:if> 
    3668                   </span> 
    3669                 </a> 
    3670               </td> 
    3671             </xsl:for-each> 
    3672           </tr> 
    3673         </xsl:for-each> 
    3674       </table> 
    3675  
    3676       <table id="freeBusyKey"> 
    3677         <tr> 
    3678           <td class="free">*</td> 
    3679           <td>free</td> 
    3680           <td>&#160;</td> 
    3681           <td class="busy">*</td> 
    3682           <td>busy</td> 
    3683           <td>&#160;</td> 
    3684           <td class="tentative">*</td> 
    3685           <td>tentative</td> 
    3686         </tr> 
    3687       </table> 
    3688   </xsl:template> 
    3689  
    3690   <xsl:template match="attendees"> 
    3691     <xsl:param name="trash">yes</xsl:param> 
    3692     <table id="attendees" class="widget" cellspacing="0"> 
    3693       <tr> 
    3694         <th colspan="4">Attendees</th> 
    3695       </tr> 
    3696       <tr class="subHead"> 
    3697         <xsl:if test="$trash = 'yes'"><td></td></xsl:if> 
    3698         <td>attendee</td> 
    3699         <td>role</td> 
    3700         <td>status</td> 
    3701       </tr> 
    3702       <xsl:for-each select="attendee"> 
    3703         <xsl:sort select="cn" order="ascending" case-order="upper-first"/> 
    3704         <xsl:sort select="attendeeUri" order="ascending" case-order="upper-first"/> 
    3705         <xsl:variable name="attendeeUri" select="attendeeUri"/> 
    3706         <tr> 
    3707           <xsl:if test="$trash = 'yes'"> 
    3708             <td class="trash"> 
    3709               <a href="{$event-attendeesForEvent}&amp;uri={$attendeeUri}&amp;attendee=true&amp;delete=true" title="remove"> 
    3710                 <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="remove"/> 
    3711               </a> 
    3712             </td> 
    3713           </xsl:if> 
    3714           <td> 
    3715             <a href="{$attendeeUri}"> 
    3716               <xsl:choose> 
    3717                 <xsl:when test="cn != ''"> 
    3718                   <xsl:value-of select="cn"/> 
    3719                 </xsl:when> 
    3720                 <xsl:otherwise> 
    3721                   <xsl:value-of select="attendeeUri"/> 
    3722                 </xsl:otherwise> 
    3723               </xsl:choose> 
    3724             </a> 
    3725           </td> 
    3726           <td class="role"> 
    3727             <xsl:value-of select="role"/> 
    3728           </td> 
    3729           <td class="status"> 
    3730             <xsl:value-of select="partstat"/> 
    3731           </td> 
    3732         </tr> 
    3733       </xsl:for-each> 
    3734     </table> 
    3735   </xsl:template> 
    3736  
    3737   <xsl:template match="recipients"> 
    3738     <xsl:param name="trash">yes</xsl:param> 
    3739     <table id="recipients" class="widget" cellspacing="0"> 
    3740       <tr> 
    3741         <th colspan="2">Recipients</th> 
    3742       </tr> 
    3743       <tr class="subHead"> 
    3744         <xsl:if test="$trash = 'yes'"><td></td></xsl:if> 
    3745         <td>recipient</td> 
    3746       </tr> 
    3747       <xsl:for-each select="recipient"> 
    3748         <xsl:variable name="recipientUri" select="."/> 
    3749         <tr> 
    3750           <xsl:if test="$trash = 'yes'"> 
    3751             <td class="trash"> 
    3752               <a href="{$event-attendeesForEvent}&amp;uri={$recipientUri}&amp;recipient=true&amp;delete=true" title="remove"> 
    3753                 <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="remove"/> 
    3754               </a> 
    3755             </td> 
    3756           </xsl:if> 
    3757           <td> 
    3758             <a href="{$recipientUri}"> 
    3759               <xsl:value-of select="."/> 
    3760             </a> 
    3761           </td> 
    3762         </tr> 
    3763       </xsl:for-each> 
    3764     </table> 
    3765   </xsl:template> 
    3766  
    3767   <xsl:template match="event" mode="addEventRef"> 
    3768   <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    3769     change it without modifying bedework.js --> 
    3770     <form name="eventForm" method="post" action="{$event-addEventRefComplete}" id="standardForm"  enctype="multipart/form-data"> 
    3771       <xsl:variable name="subscriptionId" select="subscription/id"/> 
    3772       <xsl:variable name="calPath" select="calendar/path"/> 
    3773       <xsl:variable name="guid" select="guid"/> 
    3774       <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    3775       <input type="hidden" name="subid" value="{$subscriptionId}"/> 
    3776       <input type="hidden" name="calPath" value="{$calPath}"/> 
    3777       <input type="hidden" name="guid" value="{$guid}"/> 
    3778       <input type="hidden" name="recurrenceId" value="{$recurrenceId}"/> 
    3779       <!-- newCalPath is the path to the calendar in which the reference 
    3780            should be placed.  If no value, then default calendar. --> 
    3781       <input type="hidden" name="newCalPath" value="" id="bwNewCalPathField"/> 
    3782  
    3783       <h2>Add Event Reference</h2> 
    3784       <table class="common" cellspacing="0"> 
    3785         <tr> 
    3786           <td class="fieldname"> 
    3787             Event: 
    3788           </td> 
    3789           <td> 
    3790             <xsl:choose> 
    3791               <xsl:when test="summary = ''"> 
    3792                 <em>no title</em> 
    3793               </xsl:when> 
    3794               <xsl:otherwise> 
    3795                 <xsl:value-of select="summary"/> 
    3796               </xsl:otherwise> 
    3797             </xsl:choose> 
    3798           </td> 
    3799         </tr> 
    3800         <tr> 
    3801           <td class="fieldname"> 
    3802             Into calendar: 
    3803           </td> 
    3804           <td align="left"> 
    3805             <span id="bwEventCalDisplay"> 
    3806               <em>default calendar</em> 
    3807             </span> 
    3808             <xsl:call-template name="selectCalForEvent"/> 
    3809           </td> 
    3810         </tr> 
    3811         <tr> 
    3812           <td class="fieldname"> 
    3813             Affects Free/busy: 
    3814           </td> 
    3815           <td align="left"> 
    3816             <input type="radio" value="OPAQUE" name="transparency"/> yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    3817             <input type="radio" value="TRANSPARENT" name="transparency" checked="checked"/> no <span class="note">(transparent: event status does not affect your free/busy)</span> 
    3818           </td> 
    3819         </tr> 
    3820       </table> 
    3821       <table border="0" id="submitTable"> 
    3822         <tr> 
    3823           <td> 
    3824             <input name="submit" type="submit" value="Continue"/> 
    3825             <input name="cancelled" type="submit" value="cancel"/> 
    3826           </td> 
    3827         </tr> 
    3828       </table> 
    3829     </form> 
    3830   </xsl:template> 
    3831  
    3832   <!--+++++++++++++++ Free / Busy ++++++++++++++++++++--> 
    3833   <xsl:template match="freebusy" mode="freeBusyPage"> 
    3834     <span id="freeBusyShareLink"> 
    3835       <a href="{$calendar-fetch}">share my free-busy</a> 
    3836       <!--<div dojoType="FloatingPane" id="bwHelpWidget-shareFreeBusy" 
    3837                title="Bedework Help" toggle="plain" 
    3838                windowState="minimized" hasShadow="true" 
    3839                displayMinimizeAction="true" resizable="false" 
    3840                constrainToContainer="true"> 
    3841         You may share your free busy with a user or group 
    3842         by <a href="{$calendar-fetch}">setting 
    3843         access to "read freebusy" on calendars</a> you wish to share. 
    3844         To share all your free busy, grant 
    3845         "read freebusy" access on your root folder. 
    3846       </div> 
    3847       <span class="contextHelp"> 
    3848         <a href="javascript:launchHelpWidget('bwHelpWidget-shareFreeBusy')"> 
    3849           <img src="{$resourcesRoot}/resources/std-button-help.gif" width="13" height="13" border="0" alt="help"/> 
    3850         </a> 
    3851       </span>--> 
    3852       <span class="contextHelp"> 
    3853         <img src="{$resourcesRoot}/resources/std-button-help.gif" width="13" height="13" alt="help" onmouseover="changeClass('helpShareFreeBusy','visible helpBox');" onmouseout="changeClass('helpShareFreeBusy','invisible');"/> 
    3854       </span> 
    3855       <div id="helpShareFreeBusy" class="helpBox invisible"> 
    3856           You may share your free busy with a user or group 
    3857           by setting access to "read freebusy" on calendars you wish to share. 
    3858           To share all your free busy, grant 
    3859           "read freebusy" access on your root folder. 
    3860       </div> 
    3861     </span> 
    3862     <h2> 
    3863       Free / Busy 
    3864     </h2> 
    3865  
    3866     <div id="freeBusyPage"> 
    3867       <form name="viewFreeBusyForm" id="viewFreeBusyForm" method="post" action="{$freeBusy-fetch}"> 
    3868         View user's free/busy: 
    3869         <input type="text" name="userid" size="20"/> 
    3870         <input type="submit" name="submit" value="Submit"/> 
    3871       </form> 
    3872       <xsl:apply-templates select="." mode="freeBusyGrid"> 
    3873         <xsl:with-param name="type">normal</xsl:with-param> 
    3874       </xsl:apply-templates> 
    3875     </div> 
    3876   </xsl:template> 
    3877  
    3878   <!--+++++++++++++++ Categories ++++++++++++++++++++--> 
    3879   <xsl:template name="categoryList"> 
    3880     <h2> 
    3881       Manage Categories 
    3882       <input type="button" name="return" value="Add new category" onclick="javascript:location.replace('{$category-initAdd}')" class="titleButton"/> 
    3883     </h2> 
    3884     <table class="common" id="manage" cellspacing="0"> 
    3885       <tr> 
    3886         <th class="commonHeader" colspan="2">Edit/Delete Categories</th> 
    3887       </tr> 
    3888       <xsl:choose> 
    3889         <xsl:when test="/bedework/categories/category"> 
    3890           <xsl:for-each select="/bedework/categories/category"> 
    3891             <xsl:variable name="categoryKey" select="normalize-space(keyword)"/> 
    3892             <tr> 
    3893               <td> 
    3894                 <a href="{$category-fetchForUpdate}&amp;categoryKey={$categoryKey}"> 
    3895                   <xsl:value-of select="keyword"/> 
    3896                 </a> 
    3897               </td> 
    3898               <td> 
    3899                 <xsl:value-of select="desc"/> 
    3900               </td> 
    3901             </tr> 
    3902           </xsl:for-each> 
    3903         </xsl:when> 
    3904         <xsl:otherwise> 
    3905           <tr> 
    3906             <td colspan="2"> 
    3907               No categories defined 
    3908             </td> 
    3909           </tr> 
    3910         </xsl:otherwise> 
    3911       </xsl:choose> 
    3912     </table> 
    3913   </xsl:template> 
    3914  
    3915   <xsl:template name="modCategory"> 
    3916     <xsl:choose> 
    3917       <xsl:when test="/bedework/creating='true'"> 
    3918         <h2>Manage Categories</h2> 
    3919         <form action="{$category-update}" method="post"> 
    3920           <table class="common" cellspacing="0"> 
    3921             <tr> 
    3922               <th class="commonHeader" colspan="2">Add Category</th> 
    3923             </tr> 
    3924             <tr> 
    3925               <td class="fieldname"> 
    3926                 Keyword: 
    3927               </td> 
    3928               <td> 
    3929                 <input type="text" name="categoryWord.value" value="" size="40"/> 
    3930               </td> 
    3931             </tr> 
    3932             <tr> 
    3933               <td class="fieldname optional"> 
    3934                 Description: 
    3935               </td> 
    3936               <td> 
    3937                 <textarea name="categoryDesc.value" rows="3" cols="60"> 
    3938                   <xsl:text> </xsl:text> 
    3939                 </textarea> 
    3940               </td> 
    3941             </tr> 
    3942           </table> 
    3943           <table border="0" id="submitTable"> 
    3944             <tr> 
    3945               <td> 
    3946                 <input type="submit" name="addCategory" value="Add Category"/> 
    3947                 <input type="submit" name="cancelled" value="cancel"/> 
    3948                 <input type="reset" value="Clear"/> 
    3949               </td> 
    3950             </tr> 
    3951           </table> 
    3952         </form> 
    3953       </xsl:when> 
    3954       <xsl:otherwise> 
    3955         <h2>Manage Categories</h2> 
    3956         <form action="{$category-update}" method="post"> 
    3957           <table class="common" cellspacing="0"> 
    3958             <tr> 
    3959               <th class="commonHeader" colspan="2">Update Category</th> 
    3960             </tr> 
    3961             <tr> 
    3962               <td class="fieldname"> 
    3963             Keyword: 
    3964             </td> 
    3965               <td> 
    3966                 <xsl:variable name="keyword" select="normalize-space(/bedework/currentCategory/category/keyword)"/> 
    3967                 <input type="text" name="categoryWord.value" value="{$keyword}" size="40"/> 
    3968               </td> 
    3969             </tr> 
    3970             <tr> 
    3971               <td class="fieldname optional"> 
    3972             Description: 
    3973             </td> 
    3974               <td> 
    3975                 <textarea name="categoryDesc.value" rows="3" cols="60"> 
    3976                   <xsl:value-of select="normalize-space(/bedework/currentCategory/category/desc)"/> 
    3977                   <xsl:if test="normalize-space(/bedework/currentCategory/category/desc/textarea) = ''"> 
    3978                     <xsl:text> </xsl:text> 
    3979                     <!-- keep this space to avoid browser 
    3980                     rendering errors when the text area is empty --> 
    3981                   </xsl:if> 
    3982                 </textarea> 
    3983               </td> 
    3984             </tr> 
    3985           </table> 
    3986  
    3987           <table border="0" id="submitTable"> 
    3988             <tr> 
    3989               <td> 
    3990                 <input type="submit" name="updateCategory" value="Update Category"/> 
    3991                 <input type="submit" name="cancelled" value="cancel"/> 
    3992                 <input type="reset" value="Reset"/> 
    3993               </td> 
    3994               <td align="right"> 
    3995                 <input type="submit" name="delete" value="Delete Category"/> 
    3996               </td> 
    3997             </tr> 
    3998           </table> 
    3999         </form> 
    4000       </xsl:otherwise> 
    4001     </xsl:choose> 
    4002   </xsl:template> 
    4003  
    4004   <xsl:template name="deleteCategoryConfirm"> 
    4005     <h2>Ok to delete this category?</h2> 
    4006  
    4007     <table class="common" cellspacing="0"> 
    4008       <tr> 
    4009         <th class="commonHeader" colspan="2">Delete Category</th> 
    4010       </tr> 
    4011       <tr> 
    4012         <td class="fieldname"> 
    4013           Keyword: 
    4014         </td> 
    4015         <td> 
    4016           <xsl:value-of select="/bedework/currentCategory/category/keyword"/> 
    4017         </td> 
    4018       </tr> 
    4019       <tr> 
    4020         <td class="fieldname optional"> 
    4021           Description: 
    4022         </td> 
    4023         <td> 
    4024           <xsl:value-of select="/bedework/currentCategory/category/desc"/> 
    4025         </td> 
    4026       </tr> 
    4027     </table> 
    4028  
    4029     <form action="{$category-delete}" method="post"> 
    4030       <input type="submit" name="deleteCategory" value="Yes: Delete Category"/> 
    4031       <input type="submit" name="cancelled" value="No: Cancel"/> 
    4032     </form> 
    4033   </xsl:template> 
    4034  
    4035   <!--+++++++++++++++ Calendars ++++++++++++++++++++--> 
    4036   <xsl:template match="calendars" mode="manageCalendars"> 
    4037     <h2>Manage Calendars</h2> 
    4038     <table id="calendarTable"> 
    4039       <tr> 
    4040         <td class="cals"> 
    4041           <h3>Calendars</h3> 
    4042           <ul class="calendarTree"> 
    4043             <xsl:choose> 
    4044               <xsl:when test="/bedework/page='calendarDescriptions' or 
    4045                               /bedework/page='displayCalendar'"> 
    4046                 <xsl:apply-templates select="calendar[calType &lt; 2]" mode="listForDisplay"/> 
    4047               </xsl:when> 
    4048               <xsl:otherwise> 
    4049                 <xsl:apply-templates select="calendar[calType &lt; 2]" mode="listForUpdate"/> 
    4050               </xsl:otherwise> 
    4051             </xsl:choose> 
    4052           </ul> 
    4053         </td> 
    4054         <td class="calendarContent"> 
    4055           <xsl:choose> 
    4056             <xsl:when test="/bedework/page='calendarList' or 
    4057                             /bedework/page='calendarReferenced'"> 
    4058               <xsl:call-template name="calendarList"/> 
    4059             </xsl:when> 
    4060             <xsl:when test="/bedework/page='calendarDescriptions'"> 
    4061               <xsl:call-template name="calendarDescriptions"/> 
    4062             </xsl:when> 
    4063             <xsl:when test="/bedework/page='displayCalendar'"> 
    4064               <xsl:apply-templates select="/bedework/currentCalendar" mode="displayCalendar"/> 
    4065             </xsl:when> 
    4066             <xsl:when test="/bedework/page='deleteCalendarConfirm'"> 
    4067               <xsl:apply-templates select="/bedework/currentCalendar" mode="deleteCalendarConfirm"/> 
    4068             </xsl:when> 
    4069             <xsl:when test="/bedework/creating='true'"> 
    4070               <xsl:apply-templates select="/bedework/currentCalendar" mode="addCalendar"/> 
    4071             </xsl:when> 
    4072             <xsl:otherwise> 
    4073               <xsl:apply-templates select="/bedework/currentCalendar" mode="modCalendar"/> 
    4074             </xsl:otherwise> 
    4075           </xsl:choose> 
    4076         </td> 
    4077       </tr> 
    4078     </table> 
    4079   </xsl:template> 
    4080  
    4081   <xsl:template match="calendar" mode="myCalendars"> 
    4082     <xsl:variable name="id" select="id"/> 
    4083     <li> 
    4084       <xsl:attribute name="class"> 
    4085         <xsl:choose> 
    4086           <xsl:when test="/bedework/selectionState/selectionType = 'calendar' 
    4087                           and path = /bedework/selectionState/subscriptions/subscription/calendar/path">selected</xsl:when> 
    4088           <xsl:when test="name='Trash'">trash</xsl:when> 
    4089           <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    4090           <xsl:otherwise>calendar</xsl:otherwise> 
    4091         </xsl:choose> 
    4092       </xsl:attribute> 
    4093       <xsl:variable name="calPath" select="path"/> 
    4094       <a href="{$setSelection}&amp;calUrl={$calPath}"> 
    4095         <xsl:value-of select="name"/> 
    4096       </a> 
    4097       <xsl:if test="calendar"> 
    4098         <ul> 
    4099           <xsl:apply-templates select="calendar" mode="myCalendars"/> 
    4100         </ul> 
    4101       </xsl:if> 
    4102       <xsl:if test="calendarCollection='true'"> 
    4103         <!-- set the start date for adding an event to the first day of the 
    4104              given period, the hour of "now", and give a duration of 60 minutes --> 
    4105         <xsl:variable name="startDate"><xsl:value-of select="/bedework/firstday/date"/>T<xsl:value-of select="substring(/bedework/now/time,1,2)"/>0000</xsl:variable> 
    4106         <!-- skip setting duration for now; this should be set in the user's prefs--> 
    4107         <!-- <a href="{$initEvent}&amp;startdate={$startDate}&amp;newCalPath={$calPath}&amp;minutes=60" class="calendarAdd" title="add event"> --> 
    4108         <a href="{$initEvent}&amp;startdate={$startDate}&amp;newCalPath={$calPath}" class="calendarAdd" title="add event"> 
    4109           <img src="{$resourcesRoot}/resources/addEvent-forCals-icon.gif" width="9" height="12" border="0" alt="add event"/> 
    4110         </a> 
    4111       </xsl:if> 
    4112     </li> 
    4113   </xsl:template> 
    4114  
    4115   <xsl:template match="calendar" mode="mySpecialCalendars"> 
    4116     <!-- calTypes: Trash = 2, Deleted = 3, Busy = 4, Inbox = 5, Outbox = 6  --> 
    4117     <xsl:variable name="id" select="id"/> 
    4118     <li> 
    4119       <xsl:attribute name="class"> 
    4120         <xsl:choose> 
    4121           <xsl:when test="/bedework/selectionState/selectionType = 'calendar' 
    4122                           and path = /bedework/selectionState/subscriptions/subscription/calendar/path">selected</xsl:when> 
    4123           <xsl:when test="calType='2' or calType='3'">trash</xsl:when> 
    4124           <xsl:when test="calType='5'">inbox</xsl:when> 
    4125           <xsl:when test="calType='6'">outbox</xsl:when> 
    4126           <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    4127           <xsl:otherwise>calendar</xsl:otherwise> 
    4128         </xsl:choose> 
    4129       </xsl:attribute> 
    4130       <xsl:variable name="calPath" select="path"/> 
    4131         <xsl:choose> 
    4132           <xsl:when test="calType='5'"> 
    4133             <a href="{$showInbox}" title="incoming scheduling requests"> 
    4134               <xsl:value-of select="name"/> 
    4135             </a> 
    4136             <xsl:text> </xsl:text> 
    4137             <xsl:if test="/bedework/inboxState/numActive != '0'"> 
    4138               <span class="inoutboxActive">(<xsl:value-of select="/bedework/inboxState/numActive"/>)</span> 
    4139             </xsl:if> 
    4140           </xsl:when> 
    4141           <xsl:when test="calType='6'"> 
    4142             <a href="{$showOutbox}" title="outgoing scheduling requests"> 
    4143               <xsl:value-of select="name"/> 
    4144             </a> 
    4145             <xsl:text> </xsl:text> 
    4146             <xsl:if test="/bedework/outboxState/numActive != '0'"> 
    4147               <span class="inoutboxActive">(<xsl:value-of select="/bedework/outboxState/numActive"/>)</span> 
    4148             </xsl:if> 
    4149           </xsl:when> 
    4150           <xsl:otherwise> 
    4151             <a href="{$setSelection}&amp;calUrl={$calPath}"> 
    4152               <xsl:attribute name="title"> 
    4153                 <xsl:choose> 
    4154                   <xsl:when test="calType = 2">Contains items you have access to delete.</xsl:when> 
    4155                   <xsl:when test="calType = 3">Used to mask items you do not have access to truly delete, such as many subscribed events.</xsl:when> 
    4156                 </xsl:choose> 
    4157               </xsl:attribute> 
    4158               <xsl:value-of select="name"/> 
    4159             </a> 
    4160           </xsl:otherwise> 
    4161         </xsl:choose> 
    4162       <xsl:if test="calendar"> 
    4163         <ul> 
    4164           <xsl:apply-templates select="calendar" mode="myCalendars"/> 
    4165         </ul> 
    4166       </xsl:if> 
    4167     </li> 
    4168   </xsl:template> 
    4169  
    4170   <xsl:template match="calendar" mode="listForUpdate"> 
    4171     <xsl:variable name="calPath" select="encodedPath"/> 
    4172     <li> 
    4173       <xsl:attribute name="class"> 
    4174         <xsl:choose> 
    4175           <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    4176           <xsl:otherwise>calendar</xsl:otherwise> 
    4177         </xsl:choose> 
    4178       </xsl:attribute> 
    4179       <a href="{$calendar-fetchForUpdate}&amp;calPath={$calPath}" title="update"> 
    4180         <xsl:value-of select="name"/> 
    4181       </a> 
    4182       <xsl:if test="calendarCollection='false'"> 
    4183         <xsl:text> </xsl:text> 
    4184         <a href="{$calendar-initAdd}&amp;calPath={$calPath}" title="add a calendar or folder"> 
    4185           <img src="{$resourcesRoot}/resources/calAddIcon.gif" width="13" height="13" alt="add a calendar or folder" border="0"/> 
    4186         </a> 
    4187       </xsl:if> 
    4188       <xsl:if test="calendar"> 
    4189         <ul> 
    4190           <xsl:apply-templates select="calendar" mode="listForUpdate"> 
    4191             <!--<xsl:sort select="title" order="ascending" case-order="upper-first"/>--> 
    4192           </xsl:apply-templates> 
    4193         </ul> 
    4194       </xsl:if> 
    4195     </li> 
    4196   </xsl:template> 
    4197  
    4198   <xsl:template match="calendar" mode="listForDisplay"> 
    4199     <xsl:variable name="calPath" select="encodedPath"/> 
    4200     <li> 
    4201       <xsl:attribute name="class"> 
    4202         <xsl:choose> 
    4203           <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    4204           <xsl:otherwise>calendar</xsl:otherwise> 
    4205         </xsl:choose> 
    4206       </xsl:attribute> 
    4207       <a href="{$calendar-fetchForDisplay}&amp;calPath={$calPath}" title="display"> 
    4208         <xsl:value-of select="name"/> 
    4209       </a> 
    4210       <xsl:if test="calendar"> 
    4211         <ul> 
    4212           <xsl:apply-templates select="calendar" mode="listForDisplay"> 
    4213             <!--<xsl:sort select="title" order="ascending" case-order="upper-first"/>--> 
    4214           </xsl:apply-templates> 
    4215         </ul> 
    4216       </xsl:if> 
    4217     </li> 
    4218   </xsl:template> 
    4219  
    4220   <xsl:template name="selectCalForEvent"> 
    4221   <!-- selectCalForEvent creates a calendar tree in a pop-up window. 
    4222       Used when selecting a calendar while adding or editing an event. 
    4223  
    4224       This template will be called when 
    4225       a) we add an event by date with no specific calendar selected 
    4226       b) we import an event 
    4227       c) we add an event ref 
    4228       d) we edit an event and change it's calendar (or change it while adding) 
    4229  
    4230       The intention is to load the calendar listing in a "pop-up" widget as a 
    4231       tree of myCalendars and writable calendars associated with subscriptions. 
    4232       The xml for the tree is already in header.jsp in myCalendars and 
    4233       mySubscriptions. 
    4234        --> 
    4235     <input type="button" onclick="javascript:changeClass('calSelectWidget','visible')" value="select calendar" class="small"/> 
    4236     <div id="calSelectWidget" class="invisible"> 
    4237       <h2>select a calendar</h2> 
    4238       <a href="javascript:changeClass('calSelectWidget','invisible')" id="calSelectWidgetCloser" title="close">x</a> 
    4239       <h4>My Calendars</h4> 
    4240       <ul class="calendarTree"> 
    4241         <xsl:choose> 
    4242           <xsl:when test="/bedework/myCalendars/calendars/calendar[currentAccess/current-user-privilege-set/privilege/write-content]"> 
    4243             <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar[currentAccess/current-user-privilege-set/privilege/write-content]" mode="selectCalForEventCalTree"/> 
    4244           </xsl:when> 
    4245           <xsl:otherwise> 
    4246             <em>no writable calendars</em> 
    4247           </xsl:otherwise> 
    4248         </xsl:choose> 
    4249       </ul> 
    4250       <h4>Subscribed Calendars</h4> 
    4251       <ul class="calendarTree"> 
    4252         <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
    4253         <xsl:choose> 
    4254           <xsl:when test="/bedework/mySubscriptions/subscription[not(contains(uri,$userPath))]/calendars/calendar[currentAccess/current-user-privilege-set/privilege/write-content]"> 
    4255             <xsl:apply-templates select="/bedework/mySubscriptions/subscription[not(contains(uri,$userPath))]/calendars/calendar[currentAccess/current-user-privilege-set/privilege/write-content]" mode="selectCalForEventCalTree"/> 
    4256           </xsl:when> 
    4257           <xsl:otherwise> 
    4258             <em>no writable calendars</em> 
    4259           </xsl:otherwise> 
    4260         </xsl:choose> 
    4261       </ul> 
    4262     </div> 
    4263   </xsl:template> 
    4264  
    4265   <xsl:template match="calendar" mode="selectCalForEventCalTree"> 
    4266     <xsl:variable name="id" select="id"/> 
    4267     <li> 
    4268       <xsl:attribute name="class"> 
    4269         <xsl:choose> 
    4270           <xsl:when test="/bedework/selectionState/selectionType = 'calendar' 
    4271                           and name = /bedework/selectionState/subscriptions/subscription/calendar/name">selected</xsl:when> 
    4272           <xsl:when test="name='Trash'">trash</xsl:when> 
    4273           <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    4274           <xsl:otherwise>calendar</xsl:otherwise> 
    4275         </xsl:choose> 
    4276       </xsl:attribute> 
    4277       <xsl:variable name="calPath" select="path"/> 
    4278       <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
    4279       <xsl:variable name="calDisplay"> 
    4280         <xsl:choose> 
    4281           <xsl:when test="contains(path,$userPath)"> 
    4282             <xsl:value-of select="substring-after(path,$userPath)"/> 
    4283           </xsl:when> 
    4284           <xsl:otherwise> 
    4285             <xsl:value-of select="path"/> 
    4286           </xsl:otherwise> 
    4287         </xsl:choose> 
    4288       </xsl:variable> 
    4289       <xsl:choose> 
    4290         <xsl:when test="currentAccess/current-user-privilege-set/privilege/write-content and (calendarCollection = 'true')"> 
    4291           <a href="javascript:updateEventFormCalendar('{$calPath}','{$calDisplay}')"> 
    4292             <strong><xsl:value-of select="name"/></strong> 
    4293           </a> 
    4294           <xsl:if test="name != $calDisplay"> 
    4295             <span class="small">(<xsl:value-of select="$calDisplay"/>)</span> 
    4296           </xsl:if> 
    4297         </xsl:when> 
    4298         <xsl:otherwise> 
    4299           <xsl:value-of select="name"/> 
    4300         </xsl:otherwise> 
    4301       </xsl:choose> 
    4302       <xsl:if test="calendar"> 
    4303         <ul> 
    4304           <xsl:apply-templates select="calendar[calType &lt; 2]" mode="selectCalForEventCalTree"/> 
    4305         </ul> 
    4306       </xsl:if> 
    4307     </li> 
    4308   </xsl:template> 
    4309  
    4310   <xsl:template match="currentCalendar" mode="addCalendar"> 
    4311     <h3>Add Calendar / Folder</h3> 
    4312     <form name="addCalForm" method="post" action="{$calendar-update}"> 
    4313       <table class="common"> 
    4314         <tr> 
    4315           <th>Name:</th> 
    4316           <td> 
    4317             <xsl:variable name="curCalName" select="name"/> 
    4318             <input name="calendar.name" value="{$curCalName}" size="40"/> 
    4319           </td> 
    4320         </tr> 
    4321         <tr> 
    4322           <th>Summary:</th> 
    4323           <td> 
    4324             <xsl:variable name="curCalSummary" select="summary"/> 
    4325             <input type="text" name="calendar.summary" value="{$curCalSummary}" size="40"/> 
    4326           </td> 
    4327         </tr> 
    4328         <tr> 
    4329           <th>Description:</th> 
    4330           <td> 
    4331             <textarea name="calendar.description" cols="40" rows="4"> 
    4332               <xsl:value-of select="desc"/> 
    4333               <xsl:if test="normalize-space(desc) = ''"> 
    4334                 <xsl:text> </xsl:text> 
    4335                 <!-- keep this non-breaking space to avoid browser 
    4336                 rendering errors when the text area is empty --> 
    4337               </xsl:if> 
    4338             </textarea> 
    4339           </td> 
    4340         </tr> 
    4341         <tr> 
    4342           <th>Calendar/Folder:</th> 
    4343           <td> 
    4344             <input type="radio" value="true" name="calendarCollection" checked="checked"/> Calendar 
    4345             <input type="radio" value="false" name="calendarCollection"/> Folder 
    4346           </td> 
    4347         </tr> 
    4348       </table> 
    4349  
    4350       <table border="0" id="submitTable"> 
    4351         <tr> 
    4352           <td> 
    4353             <input type="submit" name="addCalendar" value="Add Calendar/Folder"/> 
    4354             <input type="submit" name="cancelled" value="cancel"/> 
    4355             <input type="reset" value="Clear"/> 
    4356           </td> 
    4357         </tr> 
    4358       </table> 
    4359     </form> 
    4360  
    4361     <div id="sharingBox"> 
    4362       <h3>Current Access:</h3> 
    4363       Sharing may be added to a calendar once created. 
    4364     </div> 
    4365  
    4366   </xsl:template> 
    4367  
    4368   <xsl:template match="currentCalendar" mode="modCalendar"> 
    4369     <xsl:variable name="calPath" select="path"/> 
    4370     <xsl:variable name="calPathEncoded" select="encodedPath"/> 
    4371     <xsl:choose> 
    4372       <xsl:when test="calendarCollection='true'"> 
    4373         <h3>Modify Calendar</h3> 
    4374       </xsl:when> 
    4375       <xsl:otherwise> 
    4376         <h3>Modify Folder</h3> 
    4377       </xsl:otherwise> 
    4378     </xsl:choose> 
    4379     <form name="modCalForm" method="post" action="{$calendar-update}"> 
    4380       <table class="common"> 
    4381         <tr> 
    4382           <th class="commonHeader" colspan="2"> 
    4383             <xsl:value-of select="path"/> 
    4384           </th> 
    4385         </tr> 
    4386         <tr> 
    4387           <th>Name:</th> 
    4388           <td> 
    4389             <xsl:value-of select="name"/> 
    4390           </td> 
    4391         </tr> 
    4392         <tr> 
    4393           <th>Mailing List ID:</th> 
    4394           <td> 
    4395             <xsl:value-of select="mailListId"/> 
    4396           </td> 
    4397         </tr> 
    4398         <tr> 
    4399           <th>Summary:</th> 
    4400           <td> 
    4401             <xsl:variable name="curCalSummary" select="summary"/> 
    4402             <input type="text" name="calendar.summary" value="{$curCalSummary}" size="40"/> 
    4403           </td> 
    4404         </tr> 
    4405         <tr> 
    4406           <th>Description:</th> 
    4407           <td> 
    4408             <textarea name="calendar.description" cols="40" rows="4"> 
    4409               <xsl:value-of select="desc"/> 
    4410               <xsl:if test="normalize-space(desc) = ''"> 
    4411                 <xsl:text> </xsl:text> 
    4412                 <!-- keep this non-breaking space to avoid browser 
    4413                 rendering errors when the text area is empty --> 
    4414               </xsl:if> 
    4415             </textarea> 
    4416           </td> 
    4417         </tr> 
    4418         <tr> 
    4419           <th>Calendar/Folder:</th> 
    4420           <td> 
    4421             <xsl:choose> 
    4422               <xsl:when test="calendarCollection='true'"> 
    4423                 <input type="radio" value="true" name="calendarCollection" checked="checked"/> Calendar 
    4424                 <input type="radio" value="false" name="calendarCollection"/> Folder 
    4425               </xsl:when> 
    4426               <xsl:otherwise> 
    4427                 <input type="radio" value="true" name="calendarCollection"/> Calendar 
    4428                 <input type="radio" value="false" name="calendarCollection" checked="checked"/> Folder 
    4429               </xsl:otherwise> 
    4430             </xsl:choose> 
    4431           </td> 
    4432         </tr> 
    4433       </table> 
    4434  
    4435       <table border="0" id="submitTable"> 
    4436         <tr> 
    4437           <td> 
    4438             <xsl:choose> 
    4439               <xsl:when test="calendarCollection='true'"> 
    4440                 <input type="submit" name="updateCalendar" value="Update Calendar"/> 
    4441               </xsl:when> 
    4442               <xsl:otherwise> 
    4443                 <input type="submit" name="updateCalendar" value="Update Folder"/> 
    4444               </xsl:otherwise> 
    4445             </xsl:choose> 
    4446             <input type="submit" name="cancelled" value="cancel"/> 
    4447             <input type="reset" value="Reset"/> 
    4448           </td> 
    4449           <td align="right"> 
    4450             <xsl:choose> 
    4451               <xsl:when test="calendarCollection='true'"> 
    4452                 <input type="submit" name="delete" value="Delete Calendar"/> 
    4453               </xsl:when> 
    4454               <xsl:otherwise> 
    4455                 <input type="submit" name="delete" value="Delete Folder"/> 
    4456               </xsl:otherwise> 
    4457             </xsl:choose> 
    4458           </td> 
    4459         </tr> 
    4460       </table> 
    4461     </form> 
    4462     <div id="sharingBox"> 
    4463       <xsl:apply-templates select="acl" mode="currentAccess"> 
    4464         <xsl:with-param name="action" select="$calendar-setAccess"/> 
    4465         <xsl:with-param name="calPathEncoded" select="$calPathEncoded"/> 
    4466       </xsl:apply-templates> 
    4467       <form name="calendarShareForm" method="post" action="{$calendar-setAccess}" id="shareForm" onsubmit="setAccessHow(this)"> 
    4468         <input type="hidden" name="calPath" value="{$calPath}"/> 
    4469         <xsl:call-template name="entityAccessForm"> 
    4470           <xsl:with-param name="type"> 
    4471             <xsl:choose> 
    4472               <xsl:when test="calType = '5'">inbox</xsl:when> 
    4473               <xsl:when test="calType = '6'">outbox</xsl:when> 
    4474               <xsl:otherwise>normal</xsl:otherwise> 
    4475             </xsl:choose> 
    4476           </xsl:with-param> 
    4477         </xsl:call-template> 
    4478       </form> 
    4479     </div> 
    4480   </xsl:template> 
    4481  
    4482   <xsl:template name="calendarList"> 
    4483     <h3>Managing Calendars</h3> 
    4484     <ul> 
    4485       <li>Select an item from the calendar list on the left to modify 
    4486       a calendar or folder.</li> 
    4487       <li>Select the 
    4488       <img src="{$resourcesRoot}/resources/calAddIcon.gif" width="13" height="13" alt="true" border="0"/> 
    4489       icon to add a new calendar or folder to the tree. 
    4490         <ul> 
    4491           <li>Folders may only contain calendars and subfolders.</li> 
    4492           <li>Calendars may only contain events (and other calendar items).</li> 
    4493           <li> 
    4494             If a calendar is empty, it may be converted to a folder and vice 
    4495             versa.  If a calendar or folder are not empty, it may not be 
    4496             converted. 
    4497           </li> 
    4498         </ul> 
    4499       </li> 
    4500     </ul> 
    4501   </xsl:template> 
    4502  
    4503   <xsl:template name="calendarDescriptions"> 
    4504     <h2>Calendar Information</h2> 
    4505     <ul> 
    4506       <li>Select an item from the calendar tree on the left to view all information 
    4507       about that calendar or folder.  The tree on the left represents the calendar 
    4508       heirarchy.</li> 
    4509     </ul> 
    4510  
    4511     <p><strong>All Calendar Descriptions:</strong></p> 
    4512     <table id="flatCalendarDescriptions" cellspacing="0"> 
    4513       <tr> 
    4514         <th>Name</th> 
    4515         <th>Description</th> 
    4516       </tr> 
    4517       <xsl:for-each select="//calendar[calType &lt; 2]"> 
    4518         <xsl:variable name="descClass"> 
    4519           <xsl:choose> 
    4520             <xsl:when test="position() mod 2 = 0">even</xsl:when> 
    4521             <xsl:otherwise>odd</xsl:otherwise> 
    4522           </xsl:choose> 
    4523         </xsl:variable> 
    4524         <tr class="{$descClass}"> 
    4525           <td> 
    4526             <xsl:value-of select="name"/> 
    4527           </td> 
    4528           <td> 
    4529             <xsl:value-of select="desc"/> 
    4530           </td> 
    4531         </tr> 
    4532       </xsl:for-each> 
    4533     </table> 
    4534   </xsl:template> 
    4535  
    4536   <xsl:template match="currentCalendar" mode="displayCalendar"> 
    4537     <h2>Calendar Information</h2> 
    4538     <table class="common"> 
    4539       <tr> 
    4540         <th>Name:</th> 
    4541         <td> 
    4542           <xsl:value-of select="name"/> 
    4543         </td> 
    4544       </tr> 
    4545       <tr> 
    4546         <th>Path:</th> 
    4547         <td> 
    4548           <xsl:value-of select="path"/> 
    4549         </td> 
    4550       </tr> 
    4551       <tr> 
    4552         <th>Summary:</th> 
    4553         <td> 
    4554           <xsl:value-of select="summary"/> 
    4555         </td> 
    4556       </tr> 
    4557       <tr> 
    4558         <th>Description:</th> 
    4559         <td> 
    4560           <xsl:value-of select="desc"/> 
    4561         </td> 
    4562       </tr> 
    4563     </table> 
    4564   </xsl:template> 
    4565  
    4566   <xsl:template match="currentCalendar" mode="deleteCalendarConfirm"> 
    4567     <xsl:choose> 
    4568       <xsl:when test="calendarCollection='true'"> 
    4569         <h3>Delete Calendar</h3> 
    4570         <p> 
    4571           The following calendar will be deleted.  Continue? 
    4572         </p> 
    4573       </xsl:when> 
    4574       <xsl:otherwise> 
    4575         <h3>Delete Folder</h3> 
    4576         <p> 
    4577           The following folder <em>and all its contents</em> will be deleted. 
    4578           Continue? 
    4579         </p> 
    4580       </xsl:otherwise> 
    4581     </xsl:choose> 
    4582  
    4583     <form name="delCalForm" method="post" action="{$calendar-delete}"> 
    4584       <table class="common"> 
    4585         <tr> 
    4586           <th>Path:</th> 
    4587           <td> 
    4588             <xsl:value-of select="path"/> 
    4589           </td> 
    4590         </tr> 
    4591         <tr> 
    4592           <th>Name:</th> 
    4593           <td> 
    4594             <xsl:value-of select="name"/> 
    4595           </td> 
    4596         </tr> 
    4597         <tr> 
    4598           <th>Summary:</th> 
    4599           <td> 
    4600             <xsl:value-of select="summary"/> 
    4601           </td> 
    4602         </tr> 
    4603         <tr> 
    4604           <th>Description:</th> 
    4605           <td> 
    4606             <xsl:value-of select="desc"/> 
    4607           </td> 
    4608         </tr> 
    4609       </table> 
    4610  
    4611       <table border="0" id="submitTable"> 
    4612         <tr> 
    4613           <td> 
    4614             <input type="submit" name="cancelled" value="cancel"/> 
    4615           </td> 
    4616           <td align="right"> 
    4617             <xsl:choose> 
    4618               <xsl:when test="calendarCollection='true'"> 
    4619                 <input type="submit" name="delete" value="Yes: Delete Calendar!"/> 
    4620               </xsl:when> 
    4621               <xsl:otherwise> 
    4622                 <input type="submit" name="delete" value="Yes: Delete Folder!"/> 
    4623               </xsl:otherwise> 
    4624             </xsl:choose> 
    4625           </td> 
    4626         </tr> 
    4627       </table> 
    4628     </form> 
    4629  
    4630   </xsl:template> 
    4631  
    4632   <xsl:template match="calendars" mode="exportCalendars"> 
    4633     <h2>Export Calendars as iCal</h2> 
    4634     <form name="eventForm" id="exportCalendarForm" action="{$export}" method="post"> 
    4635       <input type="hidden" name="calPath" value=""/> 
    4636       <input type="hidden" name="nocache" value="no"/> 
    4637       <input type="hidden" name="contentName" value="calendar.ics"/> 
    4638  
    4639       <table class="common" cellspacing="0"> 
    4640         <tr> 
    4641           <th class="commonHeader" colspan="3"> 
    4642               Event date limits: 
    4643               <input type="radio" name="dateLimits" value="active" checked="checked" onclick="changeClass('exportDateRange','invisible')"/> today forward 
    4644               <input type="radio" name="dateLimits" value="none" onclick="changeClass('exportDateRange','invisible')"/> all dates 
    4645               <input type="radio" name="dateLimits" value="limited" onclick="changeClass('exportDateRange','visible')"/> date range 
    4646           </th> 
    4647         </tr> 
    4648         <tr id="exportDateRange" class="invisible"> 
    4649           <td colspan="3" class="dates"> 
    4650             <strong>Start:</strong> 
    4651             <div class="dateFields"> 
    4652               <xsl:copy-of select="/bedework/formElements/form/start/month/*"/> 
    4653               <xsl:copy-of select="/bedework/formElements/form/start/day/*"/> 
    4654               <xsl:copy-of select="/bedework/formElements/form/start/yearText/*"/> 
    4655             </div> 
    4656             &#160;&#160; 
    4657             <strong>End:</strong> 
    4658             <div class="dateFields"> 
    4659               <xsl:copy-of select="/bedework/formElements/form/end/month/*"/> 
    4660               <xsl:copy-of select="/bedework/formElements/form/end/day/*"/> 
    4661               <xsl:copy-of select="/bedework/formElements/form/end/yearText/*"/> 
    4662             </div> 
    4663           </td> 
    4664         </tr> 
    4665         <tr> 
    4666           <th class="borderRight"> 
    4667             My Calendars 
    4668           </th> 
    4669           <th class="borderRight"> 
    4670             Subscriptions (underlying calendars) 
    4671           </th> 
    4672           <th> 
    4673             Public Calendars 
    4674           </th> 
    4675         </tr> 
    4676         <tr> 
    4677           <td class="borderRight"> 
    4678             <!-- My Calendars --> 
    4679             <ul class="calendarTree"> 
    4680               <!-- list normal calendars first --> 
    4681               <xsl:for-each select="/bedework/myCalendars/calendars/calendar//calendar[calendarCollection='true' and calType &lt; 2]"> 
    4682                 <li class="calendar"> 
    4683                   <xsl:variable name="calPath" select="path"/> 
    4684                   <xsl:variable name="name" select="name"/> 
    4685                   <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> 
    4686                     <xsl:value-of select="name"/> 
    4687                   </a> 
    4688                 </li> 
    4689               </xsl:for-each> 
    4690             </ul> 
    4691             <ul class="calendarTree"> 
    4692               <!-- list special calendars next --> 
    4693               <xsl:for-each select="/bedework/myCalendars/calendars/calendar//calendar[calendarCollection='true' and calType &gt; 1]"> 
    4694                 <li class="calendar"> 
    4695                   <xsl:variable name="calPath" select="path"/> 
    4696                   <xsl:variable name="name" select="name"/> 
    4697                   <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> 
    4698                     <xsl:value-of select="name"/> 
    4699                   </a> 
    4700                 </li> 
    4701               </xsl:for-each> 
    4702             </ul> 
    4703           </td> 
    4704           <td class="borderRight"> 
    4705             <!-- My Subscriptions (underlying calendars) --> 
    4706             <ul class="calendarTree"> 
    4707               <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
    4708               <xsl:for-each select="/bedework/mySubscriptions/subscription[not(contains(uri,$userPath))]"> 
    4709                 <xsl:choose> 
    4710                   <xsl:when test="calendarDeleted='true'"> 
    4711                     <li class="deleted"> 
    4712                       <xsl:value-of select="name"/><br/> 
    4713                       <em>calendar not available</em> 
    4714                     </li> 
    4715                   </xsl:when> 
    4716                   <xsl:when test="count(calendars//calendar[calendarCollection='true']) = 1"> 
    4717                     <xsl:for-each select="calendars//calendar[calendarCollection='true']"> 
    4718                       <li class="calendar"> 
    4719                         <xsl:variable name="calPath" select="path"/> 
    4720                         <xsl:variable name="name" select="name"/> 
    4721                         <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> 
    4722                           <xsl:value-of select="name"/> 
    4723                         </a> 
    4724                       </li> 
    4725                     </xsl:for-each> 
    4726                   </xsl:when> 
    4727                   <xsl:otherwise> 
    4728                     <li class="folder"> 
    4729                       <xsl:value-of select="name"/>: 
    4730                       <xsl:if test="calendars//calendar[calendarCollection='true']"> 
    4731                         <ul> 
    4732                           <xsl:for-each select="calendars//calendar[calendarCollection='true']"> 
    4733                             <li class="calendar"> 
    4734                               <xsl:variable name="calPath" select="path"/> 
    4735                               <xsl:variable name="name" select="name"/> 
    4736                               <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> 
    4737                                 <xsl:value-of select="name"/> 
    4738                               </a> 
    4739                             </li> 
    4740                           </xsl:for-each> 
    4741                         </ul> 
    4742                       </xsl:if> 
    4743                     </li> 
    4744                   </xsl:otherwise> 
    4745                 </xsl:choose> 
    4746               </xsl:for-each> 
    4747             </ul> 
    4748           </td> 
    4749           <td> 
    4750             <ul class="calendarTree"> 
    4751               <xsl:for-each select=".//calendar[calendarCollection='true']"> 
    4752                 <li class="calendar"> 
    4753                   <xsl:variable name="calPath" select="path"/> 
    4754                   <xsl:variable name="name" select="name"/> 
    4755                   <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> 
    4756                     <xsl:value-of select="name"/> 
    4757                   </a> 
    4758                 </li> 
    4759               </xsl:for-each> 
    4760             </ul> 
    4761           </td> 
    4762         </tr> 
    4763       </table> 
    4764     </form> 
    4765   </xsl:template> 
    4766  
    4767   <!--+++++++++++++++ Subscriptions ++++++++++++++++++++--> 
    4768   <xsl:template match="subscriptions"> 
    4769     <h2>Manage Subscriptions</h2> 
    4770     <table id="subsTable"> 
    4771       <tr> 
    4772         <td class="cals"> 
    4773           <p class="smaller"> 
    4774             Select a calendar below to add a <em><strong>new</strong></em> 
    4775             internal subscription. <!-- or 
    4776             <a href="{$subscriptions-initAdd}&amp;calUri=please enter a calendar uri"> 
    4777             subscribe to an external calendar</a>.--> 
    4778           </p> 
    4779           <h3>My calendars</h3> 
    4780           <ul class="calendarTree"> 
    4781             <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar[calType &lt; 2]" mode="subscribe"/> 
    4782           </ul> 
    4783           <h3>Public calendars</h3> 
    4784           <ul class="calendarTree"> 
    4785             <xsl:apply-templates select="/bedework/subscriptions/subscribe/calendars/calendar[calType &lt; 2]" mode="subscribe"/> 
    4786           </ul> 
    4787         </td> 
    4788         <td class="subs"> 
    4789           <xsl:choose> 
    4790             <xsl:when test="/bedework/page='subscriptions'"> 
    4791               <xsl:call-template name="subscriptionList"/> 
    4792             </xsl:when> 
    4793             <xsl:when test="/bedework/page='addSubByUri'"> 
    4794               <xsl:call-template name="addSubByUri"/> 
    4795             </xsl:when> 
    4796             <xsl:when test="/bedework/creating='true'"> 
    4797               <xsl:apply-templates select="subscription" mode="addSystemSubscription"/> 
    4798             </xsl:when> 
    4799             <xsl:otherwise> 
    4800               <xsl:apply-templates select="subscription" mode="modSubscription"/> 
    4801             </xsl:otherwise> 
    4802           </xsl:choose> 
    4803         </td> 
    4804       </tr> 
    4805     </table> 
    4806   </xsl:template> 
    4807  
    4808   <xsl:template match="calendar" mode="subscribe"> 
    4809     <xsl:variable name="calPath" select="encodedPath"/> 
    4810     <xsl:variable name="itemClass"> 
    4811       <xsl:choose> 
    4812         <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    4813         <xsl:otherwise>calendar</xsl:otherwise> 
    4814       </xsl:choose> 
    4815     </xsl:variable> 
    4816     <li class="{$itemClass}"> 
    4817       <a href="{$subscriptions-initAdd}&amp;calPath={$calPath}"> 
    4818         <xsl:value-of select="name"/> 
    4819       </a> 
    4820       <xsl:if test="calendar"> 
    4821         <ul> 
    4822           <xsl:apply-templates select="calendar" mode="subscribe"> 
    4823             <!--<xsl:sort select="title" order="ascending" case-order="upper-first"/>--> 
    4824           </xsl:apply-templates> 
    4825         </ul> 
    4826       </xsl:if> 
    4827     </li> 
    4828   </xsl:template> 
    4829  
    4830   <!-- add a subscription to a user calendar by user and path; this is actually 
    4831        a subscription to an arbitrary URI (which we can expose later) --> 
    4832   <xsl:template name="addSubByUri"> 
    4833     <h3>Add Subscription to User Calendar</h3> 
    4834     <p class="note">*the subsciption name must be unique</p> 
    4835     <form name="subscribeForm" action="{$subscriptions-initAdd}" onsubmit="return setSubscriptionUri(this,'bwcal:///user/')" method="post"> 
    4836       <table class="common" cellspacing="0"> 
    4837         <tr> 
    4838           <td class="fieldname">Name:</td> 
    4839           <td> 
    4840             <input type="text" value="" name="name" size="60"/> 
    4841           </td> 
    4842         </tr> 
    4843         <!-- the following would be for an arbitrary URI.  We'll add this later. 
    4844         <tr> 
    4845           <td class="fieldname">Uri:</td> 
    4846           <td> 
    4847             <input type="text" value="" name="calUri" size="60"/> 
    4848           </td> 
    4849         </tr>--> 
    4850         <tr> 
    4851           <td class="fieldname">User ID:</td> 
    4852           <td> 
    4853             <input type="hidden" value="" name="calUri"/> 
    4854             <input type="text" value="" name="userId" size="20"/> 
    4855             <span class="note">ex: janedoe</span> 
    4856           </td> 
    4857         </tr> 
    4858         <tr> 
    4859           <td class="fieldname">Calendar path:</td> 
    4860           <td> 
    4861             <input type="text" value="" name="userPath" size="20"/> 
    4862             <span class="note"> 
    4863               (optional) ex: calendar<br/> 
    4864               to subscribe to bwcal:///user/janedoe/someFolder/someCalendar, enter "someFolder/someCalendar" 
    4865             </span> 
    4866           </td> 
    4867         </tr> 
    4868         <!--<tr> 
    4869           <td class="fieldname">Display:</td> 
    4870           <td> 
    4871             <input type="radio" value="true" name="display" checked="checked"/> yes 
    4872             <input type="radio" value="false" name="display"/> no 
    4873           </td> 
    4874         </tr>--> 
    4875         <tr> 
    4876           <td class="fieldname">Affects Free/Busy:</td> 
    4877           <td> 
    4878             <input type="radio" value="true" name="affectsFreeBusy"/> yes 
    4879             <input type="radio" value="false" name="affectsFreeBusy" checked="checked"/> no 
    4880           </td> 
    4881         </tr> 
    4882         <tr> 
    4883           <td class="fieldname">Style:</td> 
    4884           <td> 
    4885             <select name="style"> 
    4886               <option value="default">default</option> 
    4887               <xsl:for-each select="document('subColors.xml')/subscriptionColors/color"> 
    4888                 <xsl:variable name="subColor" select="."/> 
    4889                 <option value="{$subColor}" class="{$subColor}"> 
    4890                   <xsl:value-of select="@name"/> 
    4891                 </option> 
    4892               </xsl:for-each> 
    4893             </select> 
    4894           </td> 
    4895         </tr> 
    4896         <!--<tr> 
    4897           <td class="fieldname">Unremovable:</td> 
    4898           <td> 
    4899             <input type="radio" value="true" name="unremoveable" size="60"/> true 
    4900             <input type="radio" value="false" name="unremoveable" size="60" checked="checked"/> false 
    4901           </td> 
    4902         </tr>--> 
    4903       </table> 
    4904       <table border="0" id="submitTable"> 
    4905         <tr> 
    4906           <td> 
    4907             <input type="submit" name="addSubscription" value="Add Subscription"/> 
    4908             <input type="submit" name="cancelled" value="cancel"/> 
    4909             <input type="reset" value="Clear"/> 
    4910           </td> 
    4911         </tr> 
    4912       </table> 
    4913     </form> 
    4914   </xsl:template> 
    4915  
    4916   <!-- add a subscription to a public calendar within the system --> 
    4917   <xsl:template match="subscription" mode="addSystemSubscription"> 
    4918     <h3>Add New Subscription</h3> 
    4919     <p class="note">*the subsciption name must be unique</p> 
    4920     <form name="subscribeForm" action="{$subscriptions-subscribe}" method="post"> 
    4921       <table class="common" cellspacing="0"> 
    4922         <tr> 
    4923           <td class="fieldname">Name:</td> 
    4924           <td> 
    4925             <xsl:variable name="subName" select="name"/> 
    4926             <input type="text" value="{$subName}" name="subscription.name" size="60"/> 
    4927           </td> 
    4928         </tr> 
    4929         <xsl:if test="internal='false'"> 
    4930           <tr> 
    4931             <td class="fieldname">Uri:</td> 
    4932             <td> 
    4933               <xsl:variable name="calPath" select="uri"/> 
    4934               <input type="text" value="{$calPath}" name="calPath" size="60"/> 
    4935             </td> 
    4936           </tr> 
    4937         </xsl:if> 
    4938         <!--<tr> 
    4939           <td class="fieldname">Display:</td> 
    4940           <td> 
    4941             <input type="radio" value="true" name="subscription.display" checked="checked"/> yes 
    4942             <input type="radio" value="false" name="subscription.display"/> no 
    4943           </td> 
    4944         </tr>--> 
    4945         <tr> 
    4946           <td class="fieldname">Affects Free/Busy:</td> 
    4947           <td> 
    4948             <input type="radio" value="true" name="subscription.affectsFreeBusy"/> yes 
    4949             <input type="radio" value="false" name="subscription.affectsFreeBusy" checked="checked"/> no 
    4950           </td> 
    4951         </tr> 
    4952         <tr> 
    4953           <td class="fieldname">Style:</td> 
    4954           <td> 
    4955             <select name="subscription.style"> 
    4956               <option value="default">default</option> 
    4957               <xsl:for-each select="document('subColors.xml')/subscriptionColors/color"> 
    4958                 <xsl:variable name="subColor" select="."/> 
    4959                 <option value="{$subColor}" class="{$subColor}"> 
    4960                   <xsl:value-of select="@name"/> 
    4961                 </option> 
    4962               </xsl:for-each> 
    4963             </select> 
    4964           </td> 
    4965         </tr> 
    4966         <!--<tr> 
    4967           <td class="fieldname">Unremovable:</td> 
    4968           <td> 
    4969             <input type="radio" value="true" name="subscription.unremoveable" size="60"/> true 
    4970             <input type="radio" value="false" name="subscription.unremoveable" size="60" checked="checked"/> false 
    4971           </td> 
    4972         </tr>--> 
    4973       </table> 
    4974       <table border="0" id="submitTable"> 
    4975         <tr> 
    4976           <td> 
    4977             <input type="submit" name="addSubscription" value="Add Subscription"/> 
    4978             <input type="submit" name="cancelled" value="cancel"/> 
    4979             <input type="reset" value="Clear"/> 
    4980           </td> 
    4981         </tr> 
    4982       </table> 
    4983     </form> 
    4984   </xsl:template> 
    4985  
    4986   <xsl:template match="subscription" mode="modSubscription"> 
    4987     <h3>Modify Subscription</h3> 
    4988     <form name="subscribeForm" action="{$subscriptions-subscribe}" method="post"> 
    4989       <table class="common" cellspacing="0"> 
    4990         <tr> 
    4991           <td class="fieldname">Name:</td> 
    4992           <td> 
    4993             <xsl:value-of select="name"/> 
    4994             <xsl:variable name="subName" select="name"/> 
    4995             <input type="hidden" value="{$subName}" name="name"/> 
    4996           </td> 
    4997         </tr> 
    4998         <xsl:choose> 
    4999           <xsl:when test="internal='false'"> 
    5000             <tr> 
    5001               <td class="fieldname">Uri:</td> 
    5002               <td> 
    5003                 <xsl:variable name="subUri" select="uri"/> 
    5004                 <input type="text" value="{$subUri}" name="subscription.uri" size="60"/> 
    5005               </td> 
    5006             </tr> 
    5007           </xsl:when> 
    5008           <xsl:otherwise> 
    5009             <tr> 
    5010               <td class="fieldname">Uri:</td> 
    5011               <td> 
    5012                 <xsl:value-of select="uri"/> 
    5013               </td> 
    5014             </tr> 
    5015           </xsl:otherwise> 
    5016         </xsl:choose> 
    5017         <!-- <tr> 
    5018           <td class="fieldname">Display:</td> 
    5019           <td> 
    5020             <xsl:choose> 
    5021               <xsl:when test="display='true'"> 
    5022                 <input type="radio" value="true" name="subscription.display" checked="checked"/> yes 
    5023                 <input type="radio" value="false" name="subscription.display"/> no 
    5024               </xsl:when> 
    5025               <xsl:otherwise> 
    5026                 <input type="radio" value="true" name="subscription.display"/> yes 
    5027                 <input type="radio" value="false" name="subscription.display" checked="checked"/> no 
    5028               </xsl:otherwise> 
    5029             </xsl:choose> 
    5030           </td> 
    5031         </tr> --> 
    5032         <tr> 
    5033           <td class="fieldname">Affects Free/Busy:</td> 
    5034           <td> 
    5035             <xsl:choose> 
    5036               <xsl:when test="affectsFreeBusy='true'"> 
    5037                 <input type="radio" value="true" name="subscription.affectsFreeBusy" checked="checked"/> yes 
    5038                 <input type="radio" value="false" name="subscription.affectsFreeBusy"/> no 
    5039               </xsl:when> 
    5040               <xsl:otherwise> 
    5041                 <input type="radio" value="true" name="subscription.affectsFreeBusy"/> yes 
    5042                 <input type="radio" value="false" name="subscription.affectsFreeBusy" checked="checked"/> no 
    5043               </xsl:otherwise> 
    5044             </xsl:choose> 
    5045           </td> 
    5046         </tr> 
    5047         <tr> 
    5048           <td class="fieldname">Style:</td> 
    5049           <td> 
    5050             <xsl:variable name="subStyle" select="style"/> 
    5051             <select name="subscription.style"> 
    5052               <option value="default">default</option> 
    5053               <xsl:for-each select="document('subColors.xml')/subscriptionColors/color"> 
    5054                 <xsl:variable name="subColor" select="."/> 
    5055                 <xsl:choose> 
    5056                   <xsl:when test="$subStyle = $subColor"> 
    5057                     <option value="{$subColor}" class="{$subColor}" selected="selected"> 
    5058                       <xsl:value-of select="@name"/> 
    5059                     </option> 
    5060                   </xsl:when> 
    5061                   <xsl:otherwise> 
    5062                     <option value="{$subColor}" class="{$subColor}"> 
    5063                       <xsl:value-of select="@name"/> 
    5064                     </option> 
    5065                   </xsl:otherwise> 
    5066                 </xsl:choose> 
    5067               </xsl:for-each> 
    5068             </select> 
    5069           </td> 
    5070         </tr> 
    5071         <!--<tr> 
    5072           <td class="fieldname">Unremovable:</td> 
    5073           <td> 
    5074             <xsl:choose> 
    5075               <xsl:when test="unremoveable='true'"> 
    5076                 <input type="radio" value="true" name="unremoveable" size="60" checked="checked"/> true 
    5077                 <input type="radio" value="false" name="unremoveable" size="60"/> false 
    5078               </xsl:when> 
    5079               <xsl:otherwise> 
    5080                 <input type="radio" value="true" name="unremoveable" size="60"/> true 
    5081                 <input type="radio" value="false" name="unremoveable" size="60" checked="checked"/> false 
    5082               </xsl:otherwise> 
    5083             </xsl:choose> 
    5084           </td> 
    5085         </tr>--> 
    5086       </table> 
    5087       <table border="0" id="submitTable"> 
    5088         <tr> 
    5089           <td> 
    5090             <input type="submit" name="updateSubscription" value="Update Subscription"/> 
    5091             <input type="submit" name="cancelled" value="cancel"/> 
    5092             <input type="reset" value="Reset"/> 
    5093           </td> 
    5094           <td align="right"> 
    5095             <xsl:choose> 
    5096               <xsl:when test="unremoveable='true'"> 
    5097                 Subscription unremoveable 
    5098               </xsl:when> 
    5099               <xsl:otherwise> 
    5100                 <input type="submit" name="delete" value="Delete Subscription"/> 
    5101               </xsl:otherwise> 
    5102             </xsl:choose> 
    5103           </td> 
    5104         </tr> 
    5105       </table> 
    5106     </form> 
    5107   </xsl:template> 
    5108  
    5109   <xsl:template name="subscriptionList"> 
    5110     <h3>Current subscriptions</h3> 
    5111     <table class="common" cellspacing="0"> 
    5112       <tr> 
    5113         <th>Name</th> 
    5114         <th>URI</th> 
    5115         <th>Style</th> 
    5116         <!--<th>Display</th>--> 
    5117         <th>Free/Busy</th> 
    5118         <!--<th>Unremovable</th> 
    5119         <th>External</th> 
    5120         <th>Deleted?</th>--> 
    5121       </tr> 
    5122       <xsl:for-each select="subscription"> 
    5123         <xsl:variable name="style" select="style"/> 
    5124         <tr> 
    5125           <td> 
    5126             <xsl:variable name="subname" select="name"/> 
    5127             <a href="{$subscriptions-fetchForUpdate}&amp;subname={$subname}"> 
    5128               <xsl:value-of select="name"/> 
    5129             </a> 
    5130           </td> 
    5131           <td> 
    5132             <xsl:value-of select="uri"/> 
    5133           </td> 
    5134           <td class="{$style}" style="border: none;"> 
    5135             &#160; <!-- just make room and let the style show --> 
    5136           </td> 
    5137           <!-- <td class="center"> 
    5138             <xsl:if test="display='true'"> 
    5139               <img src="{$resourcesRoot}/resources/greenCheckIcon.gif" width="13" height="13" alt="true" border="0"/> 
    5140             </xsl:if> 
    5141           </td> --> 
    5142           <td class="center"> 
    5143             <xsl:if test="affectsFreeBusy='true'"> 
    5144               <img src="{$resourcesRoot}/resources/greenCheckIcon.gif" width="13" height="13" alt="true" border="0"/> 
    5145             </xsl:if> 
    5146           </td> 
    5147           <!--<td class="center"> 
    5148             <xsl:if test="unremoveable='true'"> 
    5149               <img src="{$resourcesRoot}/resources/redCheckIcon.gif" width="13" height="13" alt="true" border="0"/> 
    5150             </xsl:if> 
    5151           </td> 
    5152           <td class="center"> 
    5153             <xsl:if test="internal='false'"> 
    5154               <img src="{$resourcesRoot}/resources/greenCheckIcon.gif" width="13" height="13" alt="true" border="0"/> 
    5155             </xsl:if> 
    5156           </td> 
    5157           <td class="center"> 
    5158             <xsl:if test="calendarDeleted='true'"> 
    5159               <img src="{$resourcesRoot}/resources/redCheckIcon.gif" width="13" height="13" alt="true" border="0"/> 
    5160             </xsl:if> 
    5161           </td>--> 
    5162         </tr> 
    5163       </xsl:for-each> 
    5164     </table> 
    5165     <h4><a href="{$subscriptions-addSubByUri}">Subscribe to another user's calendar</a></h4> 
    5166   </xsl:template> 
    5167  
    5168   <xsl:template match="subscription" mode="mySubscriptions"> 
    5169     <li> 
    5170       <xsl:attribute name="class"> 
    5171         <xsl:choose> 
    5172           <xsl:when test="/bedework/selectionState/selectionType = 'subscription' 
    5173                           and /bedework/selectionState/subscriptions/subscription/name = name">selected</xsl:when> 
    5174           <xsl:when test="calendarDeleted = 'true'">deleted</xsl:when> 
    5175           <xsl:otherwise>calendar</xsl:otherwise> 
    5176         </xsl:choose> 
    5177       </xsl:attribute> 
    5178       <xsl:variable name="subName" select="name"/> 
    5179       <xsl:if test="style != '' and style != 'default'"> 
    5180         <!-- the spacer gif approach allows us to avoid some IE misbehavior --> 
    5181         <xsl:variable name="subStyle" select="style"/> 
    5182         <img src="{$resourcesRoot}/resources/spacer.gif" width="6" height="6" alt="subscription style" class="subStyle {$subStyle}"/> 
    5183       </xsl:if> 
    5184       <xsl:choose> 
    5185         <xsl:when test="calendarDeleted = 'true'"> 
    5186           <a href="{$subscriptions-inaccessible}" title="underlying calendar is inaccessible"> 
    5187             <xsl:value-of select="name"/> 
    5188           </a> 
    5189         </xsl:when> 
    5190         <xsl:otherwise> 
    5191           <a href="{$setSelection}&amp;subname={$subName}"> 
    5192             <xsl:value-of select="name"/> 
    5193           </a> 
    5194         </xsl:otherwise> 
    5195       </xsl:choose> 
    5196       <xsl:if test="calendars/calendar/calendarCollection='true' and 
    5197                     calendars/calendar/currentAccess/current-user-privilege-set/privilege/write-content"> 
    5198         <!-- set the start date for adding an event to the first day of the 
    5199              given period, the hour of "now", and give a duration of 60 minutes --> 
    5200         <xsl:variable name="calPath" select="calendars/calendar/encodedPath"/> 
    5201         <xsl:variable name="startDate"><xsl:value-of select="/bedework/firstday/date"/>T<xsl:value-of select="substring(/bedework/now/time,1,2)"/>0000</xsl:variable> 
    5202         <a href="{$initEvent}&amp;startdate={$startDate}&amp;newCalPath={$calPath}&amp;minutes=60" class="calendarAdd" title="add event"> 
    5203           <img src="{$resourcesRoot}/resources/addEvent-forCals-icon.gif" width="9" height="12" border="0" alt="add event"/> 
    5204         </a> 
    5205       </xsl:if> 
    5206     </li> 
    5207   </xsl:template> 
    5208  
    5209   <xsl:template name="subInaccessible"> 
    5210     <h2 class="bwStatusConfirmed">Inaccessible</h2> 
    5211     <div class="noEventsCell"> 
    5212       <p> 
    5213         <strong>This subscription cannot be displayed.</strong><br/> 
    5214         The underlying calendar 
    5215         is inaccessible. 
    5216       </p> 
    5217       <p> 
    5218         Possible causes: 
    5219       </p> 
    5220       <ol> 
    5221         <li>Access control was changed, and you may no longer access the underlying calendar.</li> 
    5222         <li>The underlying calendar was deleted.</li> 
    5223       </ol> 
    5224     </div> 
    5225   </xsl:template> 
    5226  
    5227   <!--==== ALARM OPTIONS ====--> 
    5228   <xsl:template name="alarmOptions"> 
    5229     <form method="post" action="{$setAlarm}" id="standardForm"> 
    5230       <input type="hidden" name="updateAlarmOptions" value="true"/> 
    5231       <table class="common" cellspacing="0"> 
    5232         <tr> 
    5233           <th colspan="2" class="commonHeader">Alarm options</th> 
    5234         </tr> 
    5235         <tr> 
    5236           <td class="fieldname"> 
    5237             Alarm Date/Time: 
    5238             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmTriggerSelectorDate/*"/> 
    5239           </td> 
    5240           <td class="fieldval"> 
    5241             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmdate/*"/> 
    5242             <span class="std-text">at  </span> 
    5243             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmtime/*"/> 
    5244           </td> 
    5245         </tr> 
    5246         <tr> 
    5247           <td class="fieldname"> 
    5248             or Before/After event: 
    5249             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmTriggerSelectorDuration/*"/> 
    5250           </td> 
    5251           <td align="left"> 
    5252             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmduration/days/*"/> 
    5253             days 
    5254             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmduration/hours/*"/> 
    5255             hours 
    5256             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmduration/minutes/*"/> 
    5257             minutes 
    5258             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmduration/seconds/*"/> 
    5259             seconds OR: 
    5260             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmduration/weeks/*"/> 
    5261             weeks 
    5262             &#160; 
    5263             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmDurationBefore/*"/> 
    5264             before 
    5265             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmDurationAfter/*"/> 
    5266             after 
    5267             &#160; 
    5268             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmDurationRelStart/*"/> 
    5269             start 
    5270             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmDurationRelEnd/*"/> 
    5271             end 
    5272           </td> 
    5273         </tr> 
    5274         <tr> 
    5275           <td> 
    5276             Email Address: 
    5277           </td> 
    5278           <td align="left"> 
    5279             <xsl:copy-of select="/bedework/alarmoptionsform/form/email/*"/> 
    5280           </td> 
    5281         </tr> 
    5282         <tr> 
    5283           <td> 
    5284             Subject: 
    5285           </td> 
    5286           <td align="left"> 
    5287             <xsl:copy-of select="/bedework/alarmoptionsform/form/subject/*"/> 
    5288           </td> 
    5289         </tr> 
    5290         <tr> 
    5291           <td>&#160;</td> 
    5292           <td> 
    5293             <input name="submit" type="submit" value="Continue"/>&#160; 
    5294             <input name="cancelled" type="submit" value="cancel"/> 
    5295           </td> 
    5296         </tr> 
    5297       </table> 
    5298     </form> 
    5299   </xsl:template> 
    5300  
    53011620  <!--==== UPLOAD ====--> 
    53021621  <xsl:template name="upload"> 
     
    53231642              <em>default calendar</em> 
    53241643            </span> 
    5325             <xsl:call-template name="selectCalForEvent"/> 
    53261644          </td> 
    53271645        </tr> 
     
    53571675      </table> 
    53581676    </form> 
    5359   </xsl:template> 
    5360  
    5361   <!--==== EMAIL OPTIONS ====--> 
    5362   <xsl:template name="emailOptions"> 
    5363     <form method="post" action="{$mailEvent}" id="standardForm"> 
    5364       <input type="hidden" name="updateEmailOptions" value="true"/> 
    5365       <table class="common" cellspacing="0"> 
    5366         <tr> 
    5367           <th colspan="2" class="commonHeader">Update email options</th> 
    5368         </tr> 
    5369         <tr> 
    5370           <td> 
    5371             Email Address: 
    5372           </td> 
    5373           <td align="left"> 
    5374             <xsl:copy-of select="/bedework/emailoptionsform/form/email/*"/> 
    5375           </td> 
    5376         </tr> 
    5377         <tr> 
    5378           <td> 
    5379             Subject: 
    5380           </td> 
    5381           <td align="left"> 
    5382             <xsl:copy-of select="/bedework/emailoptionsform/form/subject/*"/> 
    5383           </td> 
    5384         </tr> 
    5385         <tr> 
    5386           <td>&#160;</td> 
    5387           <td> 
    5388             <input name="submit" type="submit" value="Continue"/>&#160; 
    5389             <input name="cancelled" type="submit" value="cancel"/> 
    5390           </td> 
    5391         </tr> 
    5392       </table> 
    5393     </form> 
    5394   </xsl:template> 
    5395  
    5396   <!--==== MANAGE LOCATIONS ====--> 
    5397   <xsl:template name="locationList"> 
    5398     <h2> 
    5399       Manage Locations 
    5400       <input type="button" name="return" value="Add new location" onclick="javascript:location.replace('{$location-initAdd}')" class="titleButton"/> 
    5401     </h2> 
    5402     <table class="common" id="manage" cellspacing="0"> 
    5403       <tr> 
    5404         <th class="commonHeader">Edit/Delete Locations</th> 
    5405       </tr> 
    5406       <tr> 
    5407         <td> 
    5408           <xsl:if test="/bedework/locations/location"> 
    5409             <ul> 
    5410               <xsl:for-each select="/bedework/locations/location"> 
    5411                 <xsl:sort select="."/> 
    5412                 <li> 
    5413                   <xsl:variable name="uid" select="uid"/> 
    5414                   <a href="{$location-fetchForUpdate}&amp;uid={$uid}"><xsl:value-of select="address"/></a> 
    5415                 </li> 
    5416               </xsl:for-each> 
    5417             </ul> 
    5418           </xsl:if> 
    5419         </td> 
    5420       </tr> 
    5421     </table> 
    5422   </xsl:template> 
    5423  
    5424   <xsl:template name="modLocation"> 
    5425     <xsl:choose> 
    5426       <xsl:when test="/bedework/creating = 'true'"> 
    5427         <form name="addLocationForm" method="post" action="{$location-update}" id="standardForm"> 
    5428           <h2>Manage Locations</h2> 
    5429           <table class="common" cellspacing="0"> 
    5430             <tr> 
    5431               <th class="commonHeader" colspan="2">Add Location</th> 
    5432             </tr> 
    5433             <tr> 
    5434               <td class="fieldname"> 
    5435                 Main Address: 
    5436               </td> 
    5437               <td> 
    5438                 <input size="60" name="locationAddress.value" type="text" id="bwLocMainAddress"/> 
    5439               </td> 
    5440             </tr> 
    5441             <tr> 
    5442               <td class="fieldname"> 
    5443                 Subaddress: 
    5444               </td> 
    5445               <td> 
    5446                 <input size="60" name="locationSubaddress.value" type="text"/> 
    5447               </td> 
    5448             </tr> 
    5449             <tr> 
    5450               <td class="fieldname"> 
    5451                 Location Link: 
    5452               </td> 
    5453               <td> 
    5454                 <input size="60" name="location.link" type="text"/> 
    5455               </td> 
    5456             </tr> 
    5457           </table> 
    5458           <table border="0" id="submitTable"> 
    5459             <tr> 
    5460               <td> 
    5461                 <input name="submit" type="submit" value="Submit Location"/> 
    5462                 <input name="cancelled" type="submit" value="cancel"/> 
    5463               </td> 
    5464             </tr> 
    5465           </table> 
    5466         </form> 
    5467       </xsl:when> 
    5468       <xsl:otherwise> 
    5469         <form name="editLocationForm" method="post" action="{$location-update}" id="standardForm"> 
    5470           <input type="hidden" name="updateLocation" value="true"/> 
    5471           <h2>Manage Locations</h2> 
    5472           <table class="common" cellspacing="0"> 
    5473             <tr> 
    5474               <th colspan="2" class="commonHeader"> 
    5475                 Edit Location 
    5476               </th> 
    5477             </tr> 
    5478             <tr> 
    5479               <td class="fieldname"> 
    5480                 Main Address: 
    5481               </td> 
    5482               <td align="left"> 
    5483                 <input size="60" name="locationAddress.value" type="text" id="bwLocMainAddress"> 
    5484                   <xsl:attribute name="value"><xsl:value-of select="/bedework/currentLocation/address"/></xsl:attribute> 
    5485                 </input> 
    5486               </td> 
    5487             </tr> 
    5488             <tr> 
    5489               <td class="fieldname"> 
    5490                 Subaddress: 
    5491               </td> 
    5492               <td align="left"> 
    5493                 <input size="60" name="locationSubaddress.value" type="text"> 
    5494                   <xsl:attribute name="value"><xsl:value-of select="/bedework/currentLocation/subaddress"/></xsl:attribute> 
    5495                 </input> 
    5496               </td> 
    5497             </tr> 
    5498             <tr> 
    5499               <td class="fieldname"> 
    5500                 Location Link: 
    5501               </td> 
    5502               <td> 
    5503                 <input size="60" name="location.link" type="text"> 
    5504                   <xsl:attribute name="value"><xsl:value-of select="/bedework/currentLocation/link"/></xsl:attribute> 
    5505                 </input> 
    5506               </td> 
    5507             </tr> 
    5508           </table> 
    5509           <table border="0" id="submitTable"> 
    5510             <tr> 
    5511               <td> 
    5512                 <input name="submit" type="submit" value="Submit Location"/> 
    5513                 <input name="cancelled" type="submit" value="cancel"/> 
    5514                 <input type="reset" value="Reset"/> 
    5515               </td> 
    5516               <td align="right"> 
    5517                 <!--<xsl:variable name="uid" select="form/uid"/>--> 
    5518                 <a href="{$location-delete}"><input type="button" name="delete" value="Delete Location"/></a> 
    5519               </td> 
    5520             </tr> 
    5521           </table> 
    5522         </form> 
    5523       </xsl:otherwise> 
    5524     </xsl:choose> 
    5525   </xsl:template> 
    5526  
    5527   <xsl:template name="deleteLocationConfirm"> 
    5528     <h2>Ok to delete this location?</h2> 
    5529  
    5530     <table class="common" cellspacing="0"> 
    5531       <tr> 
    5532         <th class="commonHeader" colspan="2">Delete Location</th> 
    5533       </tr> 
    5534       <tr> 
    5535         <td class="fieldname"> 
    5536           Main Address: 
    5537         </td> 
    5538         <td align="left"> 
    5539           <xsl:value-of select="/bedework/currentLocation/address"/> 
    5540         </td> 
    5541       </tr> 
    5542       <tr> 
    5543         <td class="fieldname"> 
    5544           Subaddress: 
    5545         </td> 
    5546         <td align="left"> 
    5547           <xsl:value-of select="/bedework/currentLocation/subaddress"/> 
    5548         </td> 
    5549       </tr> 
    5550       <tr> 
    5551         <td class="fieldname"> 
    5552           Location Link: 
    5553         </td> 
    5554         <td> 
    5555           <xsl:variable name="link" select="/bedework/currentLocation/link"/> 
    5556           <a href="{$link}"><xsl:value-of select="$link"/></a> 
    5557         </td> 
    5558       </tr> 
    5559     </table> 
    5560  
    5561     <form action="{$location-delete}" method="post"> 
    5562       <input type="submit" name="updateCategory" value="Yes: Delete Location"/> 
    5563       <input type="submit" name="cancelled" value="No: Cancel"/> 
    5564     </form> 
    5565   </xsl:template> 
    5566  
    5567   <!--==== INBOX, OUTBOX, and SCHEDULING ====--> 
    5568   <xsl:template match="inbox"> 
    5569     <h2 class="common">Inbox</h2> 
    5570     <table id="inoutbox" class="common" cellspacing="0"> 
    5571       <tr> 
    5572         <th class="commonHeader">&#160;</th> 
    5573         <th class="commonHeader">sent</th> 
    5574         <th class="commonHeader">from</th> 
    5575         <th class="commonHeader">title</th> 
    5576         <th class="commonHeader">start</th> 
    5577         <th class="commonHeader">end</th> 
    5578         <th class="commonHeader">method</th> 
    5579         <!--<th class="commonHeader">status</th>--> 
    5580         <th class="commonHeader">&#160;</th> 
    5581         <th class="commonHeader">&#160;</th> 
    5582       </tr> 
    5583       <xsl:for-each select="events/event"> 
    5584         <xsl:sort select="lastmod" order="descending"/> 
    5585         <xsl:variable name="guid" select="guid"/> 
    5586         <xsl:variable name="subscriptionId" select="subscription/id"/> 
    5587         <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    5588         <xsl:variable name="eventName" select="name"/> 
    5589         <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    5590         <xsl:variable name="inboxItemAction"> 
    5591           <xsl:choose> 
    5592             <xsl:when test="scheduleMethod=2"><xsl:value-of select="$schedule-initAttendeeRespond"/></xsl:when> 
    5593             <xsl:when test="scheduleMethod=3"><xsl:value-of select="$schedule-initAttendeeReply"/></xsl:when> 
    5594             <xsl:when test="scheduleMethod=6"><xsl:value-of select="$schedule-processRefresh"/></xsl:when> 
    5595             <xsl:when test="scheduleMethod=7"><xsl:value-of select="$schedule-initAttendeeReply"/></xsl:when> 
    5596             <xsl:otherwise><xsl:value-of select="$schedule-initAttendeeRespond"/></xsl:otherwise> 
    5597           </xsl:choose> 
    5598         </xsl:variable> 
    5599         <tr> 
    5600           <xsl:attribute name="class"> 
    5601             <xsl:choose> 
    5602               <xsl:when test="scheduleState=0">unprocessed</xsl:when> 
    5603               <xsl:when test="scheduleMethod=1">publish</xsl:when> 
    5604               <xsl:when test="scheduleMethod=2">request</xsl:when> 
    5605               <xsl:when test="scheduleMethod=5">cancel</xsl:when> 
    5606               <xsl:when test="scheduleMethod=7 or scheduleMethod=8">counter</xsl:when> 
    5607             </xsl:choose> 
    5608           </xsl:attribute> 
    5609           <td> 
    5610             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message"> 
    5611               <img src="{$resourcesRoot}/resources/calIconSchedule-sm.gif" width="13" height="13" border="0" alt="check message"/> 
    5612             </a> 
    5613           </td> 
    5614           <td> 
    5615             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message"> 
    5616               <!--<xsl:value-of select="dtstamp/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="dtstamp/time"/>--> 
    5617               <!--<xsl:value-of select="lastmod"/>--> 
    5618               <xsl:variable name="dt" select="substring-before(lastmod,'T')"/> 
    5619               <xsl:variable name="tm" select="substring-after(lastmod,'T')"/> 
    5620               <xsl:value-of select="substring($dt,1,4)"/>-<xsl:value-of select="substring($dt,5,2)"/>-<xsl:value-of select="substring($dt,7,2)"/> 
    5621               <xsl:text> </xsl:text> 
    5622               <xsl:value-of select="substring($tm,1,2)"/>:<xsl:value-of select="substring($tm,3,2)"/> 
    5623             </a> 
    5624           </td> 
    5625           <td> 
    5626             <xsl:choose> 
    5627               <xsl:when test="scheduleMethod = '1' or 
    5628                               scheduleMethod = '2' or 
    5629                               scheduleMethod = '4' or 
    5630                               scheduleMethod = '5' or 
    5631                               scheduleMethod = '8'"> 
    5632                 <xsl:if test="organizer"> 
    5633                   <xsl:variable name="organizerUri" select="organizer/organizerUri"/> 
    5634                   <xsl:choose> 
    5635                     <xsl:when test="organizer/cn != ''"> 
    5636                       <xsl:value-of select="organizer/cn"/> 
    5637                     </xsl:when> 
    5638                     <xsl:otherwise> 
    5639                       <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> 
    5640                     </xsl:otherwise> 
    5641                   </xsl:choose> 
    5642                   <xsl:if test="organizer/organizerUri != ''"> 
    5643                     <a href="{$organizerUri}" class="emailIcon" title="email"> 
    5644                       <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    5645                     </a> 
    5646                   </xsl:if> 
    5647                 </xsl:if> 
    5648               </xsl:when> 
    5649               <xsl:otherwise> 
    5650                 <xsl:if test="attendees/attendee"> 
    5651                   <!-- there will only be one attendee at this point --> 
    5652                   <xsl:variable name="attendeeUri" select="attendees/attendee/attendeeUri"/> 
    5653                   <xsl:choose> 
    5654                     <xsl:when test="attendees/attendee/cn != ''"> 
    5655                       <xsl:value-of select="attendees/attendee/cn"/> 
    5656                     </xsl:when> 
    5657                     <xsl:otherwise> 
    5658                       <xsl:value-of select="substring-after(attendees/attendee/attendeeUri,'mailto:')"/> 
    5659                     </xsl:otherwise> 
    5660                   </xsl:choose> 
    5661                   <xsl:if test="$attendeeUri != ''"> 
    5662                     <a href="{$attendeeUri}" class="emailIcon" title="email"> 
    5663                       <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    5664                     </a> 
    5665                   </xsl:if> 
    5666                 </xsl:if> 
    5667               </xsl:otherwise> 
    5668             </xsl:choose> 
    5669           </td> 
    5670           <td> 
    5671             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message"> 
    5672               <xsl:value-of select="title"/> 
    5673             </a> 
    5674           </td> 
    5675           <td><xsl:value-of select="start/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="start/time"/></td> 
    5676           <td><xsl:value-of select="end/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="end/time"/></td> 
    5677           <td><xsl:apply-templates select="scheduleMethod"/></td> 
    5678           <!--<td> 
    5679             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message"> 
    5680               <xsl:choose> 
    5681                 <xsl:when test="scheduleState=0"><em>unprocessed</em></xsl:when> 
    5682                 <xsl:otherwise>processed</xsl:otherwise> 
    5683               </xsl:choose> 
    5684             </a> 
    5685           </td>--> 
    5686           <td> 
    5687             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    5688             <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="download"> 
    5689               <img src="{$resourcesRoot}/resources/std-ical_icon_small.gif" width="12" height="16" border="0" alt="download"/> 
    5690             </a> 
    5691           </td> 
    5692           <td> 
    5693             <a href="{$delInboxEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="delete"> 
    5694               <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    5695             </a> 
    5696           </td> 
    5697         </tr> 
    5698       </xsl:for-each> 
    5699     </table> 
    5700   </xsl:template> 
    5701  
    5702   <xsl:template match="outbox"> 
    5703     <h2 class="common">Outbox</h2> 
    5704     <table id="inoutbox" class="common" cellspacing="0"> 
    5705       <tr> 
    5706         <th class="commonHeader">&#160;</th> 
    5707         <th class="commonHeader">sent</th> 
    5708         <th class="commonHeader">organizer</th> 
    5709         <th class="commonHeader">title</th> 
    5710         <th class="commonHeader">start</th> 
    5711         <th class="commonHeader">end</th> 
    5712         <th class="commonHeader">method</th> 
    5713         <th class="commonHeader">status</th> 
    5714         <th class="commonHeader">&#160;</th> 
    5715         <th class="commonHeader">&#160;</th> 
    5716       </tr> 
    5717       <xsl:for-each select="events/event"> 
    5718         <xsl:sort select="lastmod" order="descending"/> 
    5719         <xsl:variable name="guid" select="guid"/> 
    5720         <xsl:variable name="subscriptionId" select="subscription/id"/> 
    5721         <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    5722         <xsl:variable name="eventName" select="name"/> 
    5723         <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    5724         <xsl:variable name="inboxItemAction"> 
    5725           <xsl:choose> 
    5726             <xsl:when test="scheduleMethod=2"><xsl:value-of select="$schedule-initAttendeeRespond"/></xsl:when> 
    5727             <xsl:when test="scheduleMethod=3"><xsl:value-of select="$schedule-initAttendeeReply"/></xsl:when> 
    5728             <xsl:otherwise><xsl:value-of select="$schedule-initAttendeeRespond"/></xsl:otherwise> 
    5729           </xsl:choose> 
    5730         </xsl:variable> 
    5731         <tr> 
    5732           <xsl:attribute name="class"> 
    5733             <xsl:choose> 
    5734               <xsl:when test="scheduleMethod=1">publish</xsl:when> 
    5735               <xsl:when test="scheduleMethod=2">request</xsl:when> 
    5736               <xsl:when test="scheduleMethod=5">cancel</xsl:when> 
    5737               <xsl:when test="scheduleMethod=7 or scheduleMethod=8">counter</xsl:when> 
    5738             </xsl:choose> 
    5739           </xsl:attribute> 
    5740           <td> 
    5741             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message"> 
    5742               <img src="{$resourcesRoot}/resources/calIconSchedule-sm.gif" width="13" height="13" border="0" alt="check message"/> 
    5743             </a> 
    5744           </td> 
    5745           <td> 
    5746             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}" title="check message"> 
    5747               <!-- <xsl:value-of select="dtstamp/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="dtstamp/time"/>--> 
    5748               <!--<xsl:value-of select="lastmod"/>--> 
    5749               <xsl:variable name="dt" select="substring-before(lastmod,'T')"/> 
    5750               <xsl:variable name="tm" select="substring-after(lastmod,'T')"/> 
    5751               <xsl:value-of select="substring($dt,1,4)"/>-<xsl:value-of select="substring($dt,5,2)"/>-<xsl:value-of select="substring($dt,7,2)"/> 
    5752               <xsl:text> </xsl:text> 
    5753               <xsl:value-of select="substring($tm,1,2)"/>:<xsl:value-of select="substring($tm,3,2)"/> 
    5754             </a> 
    5755           </td> 
    5756           <td> 
    5757             <xsl:if test="organizer"> 
    5758               <xsl:variable name="organizerUri" select="organizer/organizerUri"/> 
    5759               <xsl:choose> 
    5760                 <xsl:when test="organizer/cn != ''"> 
    5761                   <xsl:value-of select="organizer/cn"/> 
    5762                 </xsl:when> 
    5763                 <xsl:otherwise> 
    5764                   <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> 
    5765                 </xsl:otherwise> 
    5766               </xsl:choose> 
    5767               <xsl:if test="organizer/organizerUri != ''"> 
    5768                 <a href="{$organizerUri}" class="emailIcon" title="email"> 
    5769                   <img src="{$resourcesRoot}/resources/email.gif" width="16" height="10" border="0" alt="email"/> 
    5770                 </a> 
    5771               </xsl:if> 
    5772             </xsl:if> 
    5773           </td> 
    5774           <td> 
    5775             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}"> 
    5776               <xsl:value-of select="title"/> 
    5777             </a> 
    5778           </td> 
    5779           <td><xsl:value-of select="start/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="start/time"/></td> 
    5780           <td><xsl:value-of select="end/shortdate"/><xsl:text> </xsl:text><xsl:value-of select="end/time"/></td> 
    5781           <td><xsl:apply-templates select="scheduleMethod"/></td> 
    5782           <td> 
    5783             <a href="{$inboxItemAction}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;eventName={$eventName}&amp;recurrenceId={$recurrenceId}"> 
    5784               <xsl:choose> 
    5785                 <xsl:when test="scheduleState=0"><em>unprocessed</em></xsl:when> 
    5786                 <xsl:otherwise>processed</xsl:otherwise> 
    5787               </xsl:choose> 
    5788             </a> 
    5789           </td> 
    5790           <td> 
    5791             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    5792             <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="download"> 
    5793               <img src="{$resourcesRoot}/resources/std-ical_icon_small.gif" width="12" height="16" border="0" alt="download"/> 
    5794             </a> 
    5795           </td> 
    5796           <td> 
    5797             <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete"> 
    5798               <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    5799             </a> 
    5800           </td> 
    5801         </tr> 
    5802       </xsl:for-each> 
    5803     </table> 
    5804   </xsl:template> 
    5805  
    5806   <xsl:template match="scheduleMethod"> 
    5807     <xsl:choose> 
    5808       <xsl:when test="node()=1">publish</xsl:when> 
    5809       <xsl:when test="node()=2">request</xsl:when> 
    5810       <xsl:when test="node()=3">reply</xsl:when> 
    5811       <xsl:when test="node()=4">add</xsl:when> 
    5812       <xsl:when test="node()=5">cancel</xsl:when> 
    5813       <xsl:when test="node()=6">refresh</xsl:when> 
    5814       <xsl:when test="node()=7">counter</xsl:when> 
    5815       <xsl:when test="node()=8">declined</xsl:when><!-- declinecounter --> 
    5816       <xsl:otherwise>unknown</xsl:otherwise> 
    5817     </xsl:choose> 
    5818   </xsl:template> 
    5819  
    5820   <xsl:template match="formElements" mode="attendeeRespond"> 
    5821     <xsl:variable name="subscriptionId" select="subscriptionId"/> 
    5822     <xsl:variable name="calPathEncoded" select="form/calendar/encodedPath"/> 
    5823     <xsl:variable name="calPath" select="form/calendar/path"/> 
    5824     <xsl:variable name="guid" select="guid"/> 
    5825     <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    5826     <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    5827     change it without modifying bedework.js --> 
    5828     <form name="eventForm" method="post" action="{$schedule-attendeeRespond}" id="standardForm"> 
    5829       <input type="hidden" name="updateEvent" value="true"/> 
    5830       <input type="hidden" name="endType" value="date"/> 
    5831       <h2> 
    5832         <xsl:choose> 
    5833           <xsl:when test="form/status = 'CANCELLED'"> 
    5834             Meeting Cancelled 
    5835           </xsl:when> 
    5836           <xsl:otherwise> 
    5837             Meeting Request 
    5838             <xsl:if test="guidcals/calendar"> (update)</xsl:if> 
    5839           </xsl:otherwise> 
    5840         </xsl:choose> 
    5841       </h2> 
    5842       <table class="common" cellspacing="0"> 
    5843         <tr> 
    5844           <th colspan="2" class="commonHeader"> 
    5845             Organizer: 
    5846             <xsl:choose> 
    5847               <xsl:when test="organizer/cn != ''"> 
    5848                 <xsl:value-of select="organizer/cn"/> 
    5849               </xsl:when> 
    5850               <xsl:otherwise> 
    5851                 <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> 
    5852               </xsl:otherwise> 
    5853             </xsl:choose> 
    5854           </th> 
    5855         </tr> 
    5856  
    5857         <tr> 
    5858           <td class="fieldname"> 
    5859             Calendar: 
    5860           </td> 
    5861           <td class="fieldval scheduleActions"> 
    5862             <xsl:choose> 
    5863               <xsl:when test="not(guidcals/calendar)"> 
    5864               <!-- the event has not been added to a calendar, so this is the 
    5865                    first request --> 
    5866  
    5867                 <!-- the string "user/" should not be hard coded; fix this --> 
    5868                 <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
    5869                 <xsl:variable name="writableCalendars"> 
    5870                   <xsl:value-of select=" 
    5871                     count(/bedework/myCalendars//calendar[calType = '1' and 
    5872                            currentAccess/current-user-privilege-set/privilege/write-content]) + 
    5873                     count(/bedework/mySubscriptions//calendar[calType = '1' and 
    5874                            currentAccess/current-user-privilege-set/privilege/write-content and 
    5875                            (not(contains(path,$userPath)))])"/> 
    5876                 </xsl:variable> 
    5877                 <xsl:choose> 
    5878                   <xsl:when test="$writableCalendars = 1"> 
    5879                     <!-- there is only 1 writable calendar, so find it by looking down both trees at once --> 
    5880                     <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[calType = '1' and 
    5881                              currentAccess/current-user-privilege-set/privilege/write-content]/path"/><xsl:value-of select="/bedework/mySubscriptions//calendar[calType = '1' and 
    5882                            currentAccess/current-user-privilege-set/privilege/write-content and 
    5883                            (not(contains(path,$userPath)))]/path"/></xsl:variable> 
    5884  
    5885                     <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
    5886  
    5887                     <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> 
    5888                     <span id="bwEventCalDisplay"> 
    5889                       <xsl:choose> 
    5890                         <xsl:when test="contains($newCalPath,$userFullPath)"> 
    5891                           <xsl:value-of select="substring-after($newCalPath,$userFullPath)"/> 
    5892                         </xsl:when> 
    5893                         <xsl:otherwise> 
    5894                           <xsl:value-of select="$newCalPath"/> 
    5895                         </xsl:otherwise> 
    5896                       </xsl:choose> 
    5897                     </span> 
    5898                   </xsl:when> 
    5899                   <xsl:otherwise> 
    5900                     <input type="hidden" name="newCalPath" id="bwNewCalPathField" value=""/> 
    5901                     <!-- 
    5902                       <xsl:if test="form/calendar/calType = '1'"><xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute></xsl:if> 
    5903                     </input>--> 
    5904  
    5905                     <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> 
    5906  
    5907                     <span id="bwEventCalDisplay"> 
    5908                       <xsl:if test="form/calendar/calType = '1'"> 
    5909                         <xsl:choose> 
    5910                           <xsl:when test="contains(form/calendar/path,$userFullPath)"> 
    5911                             <xsl:value-of select="substring-after(form/calendar/path,$userFullPath)"/> 
    5912                           </xsl:when> 
    5913                           <xsl:otherwise> 
    5914                             <xsl:value-of select="form/calendar/path"/> 
    5915                           </xsl:otherwise> 
    5916                         </xsl:choose> 
    5917                       </xsl:if> 
    5918                       <xsl:text> </xsl:text> 
    5919                       <!-- this final text element is required to avoid an empty 
    5920                            span element which is improperly rendered in the browser --> 
    5921                     </span> 
    5922  
    5923                     <xsl:call-template name="selectCalForEvent"/> 
    5924  
    5925                   </xsl:otherwise> 
    5926                 </xsl:choose> 
    5927  
    5928               </xsl:when> 
    5929               <xsl:otherwise> 
    5930                 <!-- the event exists in calendars already, so this is a 
    5931                      subsequent follow-up.  Let the user choose which copies 
    5932                      of the event to update.  For now, we'll just list them 
    5933                      and add calPath request parameters --> 
    5934                 <ul> 
    5935                   <xsl:for-each select="guidcals/calendar"> 
    5936                     <li class="calendar"> 
    5937                       <xsl:value-of select="name"/> 
    5938                       <input type="hidden" name="calPath"> 
    5939                         <xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute> 
    5940                       </input> 
    5941                     </li> 
    5942                   </xsl:for-each> 
    5943                 </ul> 
    5944               </xsl:otherwise> 
    5945             </xsl:choose> 
    5946           </td> 
    5947         </tr> 
    5948         <tr> 
    5949           <td class="fieldname">Action:</td> 
    5950           <td class="fieldval scheduleActions"> 
    5951             <xsl:choose> 
    5952               <xsl:when test="form/status = 'CANCELLED' or form/scheduleMethod = '8'"> 
    5953               <!-- respond to a cancel --> 
    5954                 <input type="hidden" name="method" value="REPLY"/> 
    5955                 <select name="cancelAction"> 
    5956                   <option value="mark">mark event as cancelled</option> 
    5957                   <option value="delete">delete event</option> 
    5958                 </select> 
    5959               </xsl:when> 
    5960               <xsl:otherwise> 
    5961               <!-- respond to a request --> 
    5962                 <input type="radio" name="method" value="REPLY" checked="checked" onclick="swapScheduleDisplay('hide');"/>reply as 
    5963                 <select name="partstat"> 
    5964                   <option value="ACCEPTED">accepted</option> 
    5965                   <option value="DECLINED">declined</option> 
    5966                   <option value="TENTATIVE">tentative</option> 
    5967                 </select><br/> 
    5968                 <!--<input type="radio" name="method" value="REFRESH" onclick="swapScheduleDisplay('hide');"/>refresh this event<br/>--> 
    5969                 <input type="radio" name="method" value="DELEGATE" onclick="swapScheduleDisplay('hide');"/>delegate to 
    5970                 <input type="test" name="delegate" value=""/> (uri or account)<br/> 
    5971                 <input type="radio" name="method" value="COUNTER" onclick="swapScheduleDisplay('show');"/>counter (suggest a different date, time, and/or location) 
    5972               </xsl:otherwise> 
    5973             </xsl:choose> 
    5974           </td> 
    5975         </tr> 
    5976         <tr id="scheduleDateEdit" class="invisible"> 
    5977           <td class="fieldname">New Date/Time:</td> 
    5978           <td class="fieldval scheduleActions"> 
    5979             <!-- Set the timefields class for the first load of the page; 
    5980                  subsequent changes will take place using javascript without a 
    5981                  page reload. --> 
    5982             <xsl:variable name="timeFieldsClass"> 
    5983               <xsl:choose> 
    5984                 <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
    5985                 <xsl:otherwise>timeFields</xsl:otherwise> 
    5986               </xsl:choose> 
    5987             </xsl:variable> 
    5988             <xsl:choose> 
    5989               <xsl:when test="form/allDay/input/@checked='checked'"> 
    5990                 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 
    5991                 <input type="hidden" name="eventStartDate.dateOnly" value="on" id="allDayStartDateField"/> 
    5992                 <input type="hidden" name="eventEndDate.dateOnly" value="on" id="allDayEndDateField"/> 
    5993               </xsl:when> 
    5994               <xsl:otherwise> 
    5995                 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 
    5996                 <input type="hidden" name="eventStartDate.dateOnly" value="off" id="allDayStartDateField"/> 
    5997                 <input type="hidden" name="eventEndDate.dateOnly" value="off" id="allDayEndDateField"/> 
    5998               </xsl:otherwise> 
    5999             </xsl:choose> 
    6000             all day event<br/> 
    6001             <div class="dateStartEndBox"> 
    6002               <strong>Start:</strong> 
    6003               <div class="dateFields"> 
    6004                 <span class="startDateLabel">Date </span> 
    6005                 <xsl:copy-of select="form/start/month/*"/> 
    6006                 <xsl:copy-of select="form/start/day/*"/> 
    6007                 <xsl:choose> 
    6008                   <xsl:when test="/bedework/creating = 'true'"> 
    6009                     <xsl:copy-of select="form/start/year/*"/> 
    6010                   </xsl:when> 
    6011                   <xsl:otherwise> 
    6012                     <xsl:copy-of select="form/start/yearText/*"/> 
    6013                   </xsl:otherwise> 
    6014                 </xsl:choose> 
    6015               </div> 
    6016               <!--<script language="JavaScript" type="text/javascript"> 
    6017               <xsl:comment> 
    6018                 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'); 
    6019               </xsl:comment> 
    6020               </script>--> 
    6021               <!--<img src="{$resourcesRoot}/resources/calIcon.gif" width="16" height="15" border="0"/>--> 
    6022               <div class="{$timeFieldsClass}" id="startTimeFields"> 
    6023                 <span id="calWidgetStartTimeHider" class="show"> 
    6024                   <xsl:copy-of select="form/start/hour/*"/> 
    6025                   <xsl:copy-of select="form/start/minute/*"/> 
    6026                   <xsl:if test="form/start/ampm"> 
    6027                     <xsl:copy-of select="form/start/ampm/*"/> 
    6028                   </xsl:if> 
    6029                   <xsl:text> </xsl:text> 
    6030                   <!--<a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a>--> 
    6031                 </span> 
    6032               </div> 
    6033             </div> 
    6034             <div class="dateStartEndBox"> 
    6035               <strong>End:</strong> 
    6036               <xsl:choose> 
    6037                 <xsl:when test="form/end/type='E'"> 
    6038                   <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    6039                 </xsl:when> 
    6040                 <xsl:otherwise> 
    6041                   <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    6042                 </xsl:otherwise> 
    6043               </xsl:choose> 
    6044               Date 
    6045               <xsl:variable name="endDateTimeClass"> 
    6046                 <xsl:choose> 
    6047                   <xsl:when test="form/end/type='E'">shown</xsl:when> 
    6048                   <xsl:otherwise>invisible</xsl:otherwise> 
    6049                 </xsl:choose> 
    6050               </xsl:variable> 
    6051               <div class="{$endDateTimeClass}" id="endDateTime"> 
    6052                 <div class="dateFields"> 
    6053                   <xsl:copy-of select="form/end/dateTime/month/*"/> 
    6054                   <xsl:copy-of select="form/end/dateTime/day/*"/> 
    6055                   <xsl:choose> 
    6056                     <xsl:when test="/bedework/creating = 'true'"> 
    6057                       <xsl:copy-of select="form/end/dateTime/year/*"/> 
    6058                     </xsl:when> 
    6059                     <xsl:otherwise> 
    6060                       <xsl:copy-of select="form/end/dateTime/yearText/*"/> 
    6061                     </xsl:otherwise> 
    6062                   </xsl:choose> 
    6063                 </div> 
    6064                 <!--<script language="JavaScript" type="text/javascript"> 
    6065                 <xsl:comment> 
    6066                   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'); 
    6067                 </xsl:comment> 
    6068                 </script>--> 
    6069                 <div class="{$timeFieldsClass}" id="endTimeFields"> 
    6070                   <span id="calWidgetEndTimeHider" class="show"> 
    6071                     <xsl:copy-of select="form/end/dateTime/hour/*"/> 
    6072                     <xsl:copy-of select="form/end/dateTime/minute/*"/> 
    6073                     <xsl:if test="form/end/dateTime/ampm"> 
    6074                       <xsl:copy-of select="form/end/dateTime/ampm/*"/> 
    6075                     </xsl:if> 
    6076                     <xsl:text> </xsl:text> 
    6077                     <!--<a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0"/></a>--> 
    6078                   </span> 
    6079                 </div> 
    6080               </div><br/> 
    6081               <div id="clock" class="invisible"> 
    6082                 <xsl:call-template name="clock"/> 
    6083               </div> 
    6084               <div class="dateFields"> 
    6085                 <xsl:choose> 
    6086                   <xsl:when test="form/end/type='D'"> 
    6087                     <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    6088                   </xsl:when> 
    6089                   <xsl:otherwise> 
    6090                     <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    6091                   </xsl:otherwise> 
    6092                 </xsl:choose> 
    6093                 Duration 
    6094                 <xsl:variable name="endDurationClass"> 
    6095                   <xsl:choose> 
    6096                     <xsl:when test="form/end/type='D'">shown</xsl:when> 
    6097                     <xsl:otherwise>invisible</xsl:otherwise> 
    6098                   </xsl:choose> 
    6099                 </xsl:variable> 
    6100                 <xsl:variable name="durationHrMinClass"> 
    6101                   <xsl:choose> 
    6102                     <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
    6103                     <xsl:otherwise>shown</xsl:otherwise> 
    6104                   </xsl:choose> 
    6105                 </xsl:variable> 
    6106                 <div class="{$endDurationClass}" id="endDuration"> 
    6107                   <xsl:choose> 
    6108                     <xsl:when test="form/end/duration/weeks/input/@value = '0'"> 
    6109                     <!-- we are using day, hour, minute format --> 
    6110                     <!-- must send either no week value or week value of 0 (zero) --> 
    6111                       <div class="durationBox"> 
    6112                         <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 
    6113                         <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
    6114                         <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 
    6115                         <span id="durationHrMin" class="{$durationHrMinClass}"> 
    6116                           <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
    6117                           <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 
    6118                           <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
    6119                           <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 
    6120                         </span> 
    6121                       </div> 
    6122                       <span class="durationSpacerText">or</span> 
    6123                       <div class="durationBox"> 
    6124                         <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 
    6125                         <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
    6126                         <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="disabled"/>weeks 
    6127                       </div> 
    6128                     </xsl:when> 
    6129                     <xsl:otherwise> 
    6130                       <!-- we are using week format --> 
    6131                       <div class="durationBox"> 
    6132                         <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 
    6133                         <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
    6134                         <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="disabled"/>days 
    6135                         <span id="durationHrMin" class="{$durationHrMinClass}"> 
    6136                           <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
    6137                           <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="disabled"/>hours 
    6138                           <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
    6139                           <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="disabled"/>minutes 
    6140                         </span> 
    6141                       </div> 
    6142                       <span class="durationSpacerText">or</span> 
    6143                       <div class="durationBox"> 
    6144                         <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 
    6145                         <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
    6146                         <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 
    6147                       </div> 
    6148                     </xsl:otherwise> 
    6149                   </xsl:choose> 
    6150                 </div> 
    6151               </div><br/> 
    6152               <div class="dateFields" id="noDuration"> 
    6153                 <xsl:choose> 
    6154                   <xsl:when test="form/end/type='N'"> 
    6155                     <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    6156                   </xsl:when> 
    6157                   <xsl:otherwise> 
    6158                     <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    6159                   </xsl:otherwise> 
    6160                 </xsl:choose> 
    6161                 This event has no duration / end date 
    6162               </div> 
    6163             </div> 
    6164           </td> 
    6165         </tr> 
    6166         <tr id="scheduleLocationEdit" class="invisible"> 
    6167           <td class="fieldname">New Location:</td> 
    6168           <td class="fieldval scheduleActions"> 
    6169             <span class="std-text">choose: </span> 
    6170             <span id="eventFormLocationList"> 
    6171               <select name="eventLocationUid"> 
    6172                 <option value="-1">select...</option> 
    6173                 <xsl:copy-of select="/bedework/formElements/form/location/locationmenu/select/*"/> 
    6174               </select> 
    6175             </span> 
    6176             <span class="std-text"> or add new: </span> 
    6177             <input type="text" name="locationAddress.value" value="" /> 
    6178           </td> 
    6179         </tr> 
    6180         <tr> 
    6181           <td class="fieldname">Comment:</td> 
    6182           <td class="fieldval scheduleActions"> 
    6183             <textarea name="comment" cols="60" rows="2"> 
    6184               <xsl:text> </xsl:text> 
    6185             </textarea> 
    6186           </td> 
    6187         </tr> 
    6188         <tr> 
    6189           <td class="fieldname">&#160;</td> 
    6190           <td class="fieldval scheduleActions"> 
    6191             <input name="submit" type="submit" value="Submit"/>&#160; 
    6192             <input name="cancelled" type="submit" value="cancel"/> 
    6193           </td> 
    6194         </tr> 
    6195         <tr> 
    6196           <td class="fieldname"> 
    6197             Title: 
    6198           </td> 
    6199           <td class="fieldval"> 
    6200             <strong><xsl:value-of select="form/title/input/@value"/></strong> 
    6201           </td> 
    6202         </tr> 
    6203         <tr> 
    6204           <td class="fieldname">Description:</td> 
    6205           <td class="fieldval"> 
    6206             <xsl:value-of select="/bedework/formElements/form/desc/textarea"/> 
    6207           </td> 
    6208         </tr> 
    6209         <tr> 
    6210           <td class="fieldname"> 
    6211             Date &amp; Time: 
    6212           </td> 
    6213           <td class="fieldval"> 
    6214             <xsl:value-of select="form/start/month/select/option[@selected='selected']"/> 
    6215             <xsl:text> </xsl:text> 
    6216             <xsl:value-of select="form/start/day/select/option[@selected='selected']"/>, 
    6217             <xsl:value-of select="form/start/yearText/input/@value"/> 
    6218             <xsl:text> </xsl:text> 
    6219             <xsl:value-of select="form/start/hour/select/option[@selected='selected']"/>:<xsl:value-of select="form/start/minute/select/option[@selected='selected']"/> 
    6220             - 
    6221             <xsl:value-of select="form/end/dateTime/month/select/option[@selected='selected']"/> 
    6222             <xsl:text> </xsl:text> 
    6223             <xsl:value-of select="form/end/dateTime/day/select/option[@selected='selected']"/>, 
    6224             <xsl:value-of select="form/end/dateTime/yearText/input/@value"/> 
    6225             <xsl:text> </xsl:text> 
    6226             <xsl:value-of select="form/end/dateTime/hour/select/option[@selected='selected']"/>:<xsl:value-of select="form/end/dateTime/minute/select/option[@selected='selected']"/> 
    6227             <xsl:if test="form/allDay/input/@checked='checked'"> 
    6228               <xsl:text> </xsl:text> 
    6229               (all day) 
    6230             </xsl:if> 
    6231           </td> 
    6232         </tr> 
    6233         <tr> 
    6234           <td class="fieldname">Location:</td> 
    6235           <td class="fieldval" align="left"> 
    6236             <xsl:if test="location/address = ''"> 
    6237              <em>not specified</em> 
    6238             </xsl:if> 
    6239             <xsl:value-of select="location/address"/> 
    6240           </td> 
    6241         </tr> 
    6242         <xsl:if test="attendee"> 
    6243           <tr> 
    6244             <td class="fieldname">Attendees:</td> 
    6245             <td class="fieldval"> 
    6246               <table id="attendees" cellspacing="0"> 
    6247                 <tr> 
    6248                   <th>role</th> 
    6249                   <th>status</th> 
    6250                   <th>attendee</th> 
    6251                 </tr> 
    6252                 <xsl:for-each select="attendee"> 
    6253                   <xsl:sort select="cn" order="ascending" case-order="upper-first"/> 
    6254                   <xsl:sort select="attendeeUri" order="ascending" case-order="upper-first"/> 
    6255                   <tr> 
    6256                     <td class="role"> 
    6257                       <xsl:value-of select="role"/> 
    6258                     </td> 
    6259                     <td class="status"> 
    6260                       <xsl:value-of select="partstat"/> 
    6261                     </td> 
    6262                     <td> 
    6263                       <xsl:variable name="attendeeUri" select="attendeeUri"/> 
    6264                       <a href="{$attendeeUri}"> 
    6265                         <xsl:choose> 
    6266                           <xsl:when test="cn != ''"> 
    6267                             <xsl:value-of select="cn"/> 
    6268                           </xsl:when> 
    6269                           <xsl:otherwise> 
    6270                             <xsl:value-of select="substring-after(attendeeUri,'mailto:')"/> 
    6271                           </xsl:otherwise> 
    6272                         </xsl:choose> 
    6273                       </a> 
    6274                     </td> 
    6275                   </tr> 
    6276                 </xsl:for-each> 
    6277               </table> 
    6278             </td> 
    6279           </tr> 
    6280         </xsl:if> 
    6281         <!--  Transparency  --> 
    6282         <!-- 
    6283         <tr> 
    6284           <td class="fieldname"> 
    6285             Effects free/busy: 
    6286           </td> 
    6287           <td class="fieldval"> 
    6288             <xsl:choose> 
    6289               <xsl:when test="form/transparency = 'TRANSPARENT'"> 
    6290                 <input type="radio" name="editEvent.transparency" value="OPAQUE"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    6291                 <input type="radio" name="editEvent.transparency" value="TRANSPARENT" checked="checked"/>no <span class="note">(transparent: event status does not affect your free/busy)</span> 
    6292               </xsl:when> 
    6293               <xsl:otherwise> 
    6294                 <input type="radio" name="editEvent.transparency" value="OPAQUE" checked="checked"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    6295                 <input type="radio" name="editEvent.transparency" value="TRANSPARENT"/>no <span class="note">(transparent: event status does not affect your free/busy)</span> 
    6296               </xsl:otherwise> 
    6297             </xsl:choose> 
    6298           </td> 
    6299         </tr>--> 
    6300         <xsl:if test="form/link/input/@value != ''"> 
    6301           <tr> 
    6302             <td class="fieldname">See:</td> 
    6303             <td class="fieldval"> 
    6304               <a> 
    6305                 <xsl:attribute name="href"><xsl:value-of select="form/link/input/@value"/></xsl:attribute> 
    6306                 <xsl:value-of select="form/link/input/@value"/> 
    6307               </a> 
    6308             </td> 
    6309           </tr> 
    6310         </xsl:if> 
    6311         <!--  Status  --> 
    6312         <tr> 
    6313           <td class="fieldname"> 
    6314             Status: 
    6315           </td> 
    6316           <td class="fieldval"> 
    6317             <xsl:value-of select="form/status"/> 
    6318           </td> 
    6319         </tr> 
    6320       </table> 
    6321     </form> 
    6322   </xsl:template> 
    6323  
    6324   <xsl:template match="event" mode="attendeeReply"> 
    6325     <xsl:variable name="subscriptionId" select="subscription/id"/> 
    6326     <xsl:variable name="calPath" select="calendar/encodedPath"/> 
    6327     <xsl:variable name="guid" select="guid"/> 
    6328     <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    6329     <xsl:variable name="statusClass"> 
    6330       <xsl:choose> 
    6331         <xsl:when test="status='CANCELLED'">bwStatusCancelled</xsl:when> 
    6332         <xsl:when test="status='TENTATIVE'">bwStatusTentative</xsl:when> 
    6333         <xsl:otherwise>bwStatusConfirmed</xsl:otherwise> 
    6334       </xsl:choose> 
    6335     </xsl:variable> 
    6336     <h2> 
    6337       <xsl:choose> 
    6338         <xsl:when test="scheduleMethod='7'"> 
    6339           Meeting Change Request (Counter) 
    6340         </xsl:when> 
    6341         <xsl:otherwise> 
    6342           Meeting Reply 
    6343         </xsl:otherwise> 
    6344       </xsl:choose> 
    6345     </h2> 
    6346     <form name="processReply" method="post" action="{$schedule-processAttendeeReply}"> 
    6347       <table class="common" cellspacing="0"> 
    6348         <tr> 
    6349           <th colspan="2" class="commonHeader"> 
    6350             <div id="eventActions"> 
    6351             </div> 
    6352             Organizer: 
    6353             <xsl:choose> 
    6354               <xsl:when test="organizer/cn != ''"> 
    6355                 <xsl:value-of select="organizer/cn"/> 
    6356               </xsl:when> 
    6357               <xsl:otherwise> 
    6358                 <xsl:value-of select="substring-after(organizer/organizerUri,'mailto:')"/> 
    6359               </xsl:otherwise> 
    6360             </xsl:choose> 
    6361           </th> 
    6362         </tr> 
    6363         <tr> 
    6364           <td class="fieldname"> 
    6365             Calendar: 
    6366           </td> 
    6367           <td class="fieldval scheduleActions"> 
    6368             <xsl:choose> 
    6369               <xsl:when test="not(/bedework/guidcals/calendar)"> 
    6370               <!-- the event has been deleted by the organizer --> 
    6371                 Event no longer exists. 
    6372               </xsl:when> 
    6373               <xsl:otherwise> 
    6374                 <!-- the event exists.  Let the user choose which copies 
    6375                      of the event to update.  For now, we'll just list them 
    6376                      and add calPath request parameters --> 
    6377                 <ul> 
    6378                   <xsl:for-each select="/bedework/guidcals/calendar"> 
    6379                     <li class="calendar"> 
    6380                       <xsl:value-of select="name"/> 
    6381                       <input type="hidden" name="calPath"> 
    6382                         <xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute> 
    6383                       </input> 
    6384                     </li> 
    6385                   </xsl:for-each> 
    6386                 </ul> 
    6387               </xsl:otherwise> 
    6388             </xsl:choose> 
    6389           </td> 
    6390         </tr> 
    6391         <tr> 
    6392           <td class="fieldname"> 
    6393             From: 
    6394           </td> 
    6395           <td class="fieldval scheduleActions"> 
    6396             <strong> 
    6397               <a> 
    6398                 <xsl:attribute name="href"><xsl:value-of select="attendees/attendee/attendeeUri"/></xsl:attribute> 
    6399                 <xsl:choose> 
    6400                   <xsl:when test="cn != ''"> 
    6401                     <xsl:value-of select="cn"/> 
    6402                   </xsl:when> 
    6403                   <xsl:otherwise> 
    6404                     <xsl:value-of select="substring-after(attendees/attendee/attendeeUri,'mailto:')"/> 
    6405                   </xsl:otherwise> 
    6406                 </xsl:choose> 
    6407               </a> 
    6408             </strong> 
    6409           </td> 
    6410         </tr> 
    6411         <tr> 
    6412           <td class="fieldname"> 
    6413             Status: 
    6414           </td> 
    6415           <td class="fieldval scheduleActions"> 
    6416             <xsl:value-of select="attendees/attendee/partstat"/> 
    6417             <xsl:if test="comments/value"> 
    6418               <p><strong>Comments:</strong></p> 
    6419               <div id="comments"> 
    6420                 <xsl:for-each select="comments/value"> 
    6421                   <p><xsl:value-of select="."/></p> 
    6422                 </xsl:for-each> 
    6423               </div> 
    6424             </xsl:if> 
    6425           </td> 
    6426         </tr> 
    6427         <tr> 
    6428           <td class="fieldname"> 
    6429             Action: 
    6430           </td> 
    6431           <td class="fieldval scheduleActions"> 
    6432             <xsl:choose> 
    6433               <xsl:when test="scheduleMethod='7'"><!-- counter --> 
    6434                 <input type="submit" value="accept / modify" name="accept"/> 
    6435                 <input type="submit" value="decline" name="decline"/> 
    6436                 <input type="submit" value="cancel" name="cancelled"/> 
    6437               </xsl:when> 
    6438               <xsl:otherwise><!-- normal reply --> 
    6439                 <input type="submit" value="ok" name="update"/> 
    6440                 <input type="submit" value="cancel" name="cancelled"/> 
    6441               </xsl:otherwise> 
    6442             </xsl:choose> 
    6443           </td> 
    6444         </tr> 
    6445         <tr> 
    6446           <td class="fieldname">Title:</td> 
    6447           <td class="fieldval"> 
    6448             <strong> 
    6449               <xsl:choose> 
    6450                 <xsl:when test="summary = ''"> 
    6451                   <em>no title</em> 
    6452                 </xsl:when> 
    6453                 <xsl:when test="link != ''"> 
    6454                   <xsl:variable name="link" select="link"/> 
    6455                   <a href="{$link}"> 
    6456                     <xsl:value-of select="summary"/> 
    6457                   </a> 
    6458                 </xsl:when> 
    6459                 <xsl:otherwise> 
    6460                   <xsl:value-of select="summary"/> 
    6461                 </xsl:otherwise> 
    6462               </xsl:choose> 
    6463             </strong> 
    6464           </td> 
    6465         </tr> 
    6466         <tr> 
    6467           <td class="fieldname">When:</td> 
    6468           <td class="fieldval"> 
    6469             <xsl:value-of select="start/dayname"/>, <xsl:value-of select="start/longdate"/><xsl:text> </xsl:text> 
    6470             <xsl:if test="start/allday = 'false'"> 
    6471               <span class="time"><xsl:value-of select="start/time"/></span> 
    6472             </xsl:if> 
    6473             <xsl:if test="(end/longdate != start/longdate) or 
    6474                           ((end/longdate = start/longdate) and (end/time != start/time))"> - </xsl:if> 
    6475             <xsl:if test="end/longdate != start/longdate"> 
    6476               <xsl:value-of select="substring(end/dayname,1,3)"/>, <xsl:value-of select="end/longdate"/><xsl:text> </xsl:text> 
    6477             </xsl:if> 
    6478             <xsl:choose> 
    6479               <xsl:when test="start/allday = 'true'"> 
    6480                 <span class="time"><em>(all day)</em></span> 
    6481               </xsl:when> 
    6482               <xsl:when test="end/longdate != start/longdate"> 
    6483                 <span class="time"><xsl:value-of select="end/time"/></span> 
    6484               </xsl:when> 
    6485               <xsl:when test="end/time != start/time"> 
    6486                 <span class="time"><xsl:value-of select="end/time"/></span> 
    6487               </xsl:when> 
    6488             </xsl:choose> 
    6489           </td> 
    6490           <!--<th class="icon" rowspan="2"> 
    6491             <xsl:variable name="eventIcalName" select="concat($guid,'.ics')"/> 
    6492             <a href="{$export}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}&amp;nocache=no&amp;contentName={$eventIcalName}" title="Download event as ical - for Outlook, PDAs, iCal, and other desktop calendars"> 
    6493               <img src="{$resourcesRoot}/resources/std-ical-icon.gif" width="20" height="26" border="0" align="left" alt="Download this event"/> 
    6494             </a> 
    6495           </th>--> 
    6496         </tr> 
    6497         <tr> 
    6498           <td class="fieldname">Where:</td> 
    6499           <td class="fieldval"> 
    6500             <xsl:choose> 
    6501               <xsl:when test="location/link=''"> 
    6502                 <xsl:value-of select="location/address"/> 
    6503               </xsl:when> 
    6504               <xsl:otherwise> 
    6505                 <xsl:variable name="locationLink" select="location/link"/> 
    6506                 <a href="{$locationLink}"> 
    6507                   <xsl:value-of select="location/address"/> 
    6508                 </a> 
    6509               </xsl:otherwise> 
    6510             </xsl:choose> 
    6511             <xsl:if test="location/subaddress!=''"> 
    6512               <br/><xsl:value-of select="location/subaddress"/> 
    6513             </xsl:if> 
    6514           </td> 
    6515         </tr> 
    6516         <tr> 
    6517           <td class="fieldname">Description:</td> 
    6518           <td class="fieldval"> 
    6519             <xsl:call-template name="replace"> 
    6520               <xsl:with-param name="string" select="description"/> 
    6521               <xsl:with-param name="pattern" select="'&#xA;'"/> 
    6522               <xsl:with-param name="replacement"><br/></xsl:with-param> 
    6523             </xsl:call-template> 
    6524           </td> 
    6525         </tr> 
    6526         <xsl:if test="status !='' and status != 'CONFIRMED'"> 
    6527           <tr> 
    6528             <td class="fieldname">Status:</td> 
    6529             <td class="fieldval"> 
    6530               <xsl:value-of select="status"/> 
    6531             </td> 
    6532           </tr> 
    6533         </xsl:if> 
    6534         <tr> 
    6535           <td class="fieldname filler">&#160;</td> 
    6536           <td class="fieldval">&#160;</td> 
    6537         </tr> 
    6538       </table> 
    6539     </form> 
    6540   </xsl:template> 
    6541  
    6542   <xsl:template match="event" mode="addEventRef"> 
    6543   <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    6544     change it without modifying bedework.js --> 
    6545     <form name="eventForm" method="post" action="{$event-addEventRefComplete}" id="standardForm"  enctype="multipart/form-data"> 
    6546       <xsl:variable name="subscriptionId" select="subscription/id"/> 
    6547       <xsl:variable name="calPath" select="calendar/path"/> 
    6548       <xsl:variable name="guid" select="guid"/> 
    6549       <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    6550       <input type="hidden" name="subid" value="{$subscriptionId}"/> 
    6551       <input type="hidden" name="calPath" value="{$calPath}"/> 
    6552       <input type="hidden" name="guid" value="{$guid}"/> 
    6553       <input type="hidden" name="recurrenceId" value="{$recurrenceId}"/> 
    6554       <!-- newCalPath is the path to the calendar in which the reference 
    6555            should be placed.  If no value, then default calendar. --> 
    6556       <input type="hidden" name="newCalPath" value="" id="bwNewCalPathField"/> 
    6557  
    6558       <h2>Add Event Reference</h2> 
    6559       <table class="common" cellspacing="0"> 
    6560         <tr> 
    6561           <td class="fieldname"> 
    6562             Event: 
    6563           </td> 
    6564           <td> 
    6565             <xsl:choose> 
    6566               <xsl:when test="summary = ''"> 
    6567                 <em>no title</em> 
    6568               </xsl:when> 
    6569               <xsl:otherwise> 
    6570                 <xsl:value-of select="summary"/> 
    6571               </xsl:otherwise> 
    6572             </xsl:choose> 
    6573           </td> 
    6574         </tr> 
    6575         <tr> 
    6576           <td class="fieldname"> 
    6577             Into calendar: 
    6578           </td> 
    6579           <td align="left"> 
    6580             <span id="bwEventCalDisplay"> 
    6581               <em>default calendar</em> 
    6582             </span> 
    6583             <xsl:call-template name="selectCalForEvent"/> 
    6584           </td> 
    6585         </tr> 
    6586         <tr> 
    6587           <td class="fieldname"> 
    6588             Affects Free/busy: 
    6589           </td> 
    6590           <td align="left"> 
    6591             <input type="radio" value="OPAQUE" name="transparency"/> yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    6592             <input type="radio" value="TRANSPARENT" name="transparency" checked="checked"/> no <span class="note">(transparent: event status does not affect your free/busy)</span> 
    6593           </td> 
    6594         </tr> 
    6595       </table> 
    6596       <table border="0" id="submitTable"> 
    6597         <tr> 
    6598           <td> 
    6599             <input name="submit" type="submit" value="Continue"/> 
    6600             <input name="cancelled" type="submit" value="cancel"/> 
    6601           </td> 
    6602         </tr> 
    6603       </table> 
    6604     </form> 
    6605   </xsl:template> 
    6606  
    6607   <!--==== PREFERENCES ====--> 
    6608   <xsl:template match="prefs"> 
    6609     <h2>Manage Preferences</h2> 
    6610     <ul class="submenu"> 
    6611       <li class="selected">general</li> 
    6612       <li><a href="{$prefs-fetchSchedulingForUpdate}">scheduling/meetings</a></li> 
    6613     </ul> 
    6614     <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    6615     change it without modifying bedework.js --> 
    6616     <form name="eventForm" method="post" action="{$prefs-update}" onsubmit="setWorkDays(this)"> 
    6617       <table class="common"> 
    6618         <tr><td colspan="2" class="fill">User settings:</td></tr> 
    6619         <tr> 
    6620           <td class="fieldname"> 
    6621             User: 
    6622           </td> 
    6623           <td> 
    6624             <xsl:value-of select="user"/> 
    6625             <xsl:variable name="user" select="user"/> 
    6626             <input type="hidden" name="user" value="{$user}"/> 
    6627           </td> 
    6628         </tr> 
    6629         <tr> 
    6630           <td class="fieldname"> 
    6631             Email address: 
    6632           </td> 
    6633           <td> 
    6634             <xsl:variable name="email" select="email"/> 
    6635             <input type="text" name="email" value="{$email}" size="40"/> 
    6636           </td> 
    6637         </tr> 
    6638         <tr><td colspan="2">&#160;</td></tr> 
    6639         <tr><td colspan="2" class="fill">Adding events:</td></tr> 
    6640         <!-- hide if only one calendar to select --> 
    6641         <xsl:if test="count(/bedework/myCalendars/calendars//calendar[currentAccess/current-user-privilege-set/privilege/write-content and calType = '1']) &gt; 1"> 
    6642           <tr> 
    6643             <td class="fieldname"> 
    6644               Default calendar: 
    6645             </td> 
    6646             <td> 
    6647               <xsl:variable name="newCalPath" select="defaultCalendar/path"/> 
    6648               <input type="hidden" name="newCalPath" value="{$newCalPath}" id="bwNewCalPathField"/> 
    6649               <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
    6650               <span id="bwEventCalDisplay"> 
    6651                 <xsl:choose> 
    6652                   <xsl:when test="contains(defaultCalendar,$userPath)"> 
    6653                     <xsl:value-of select="substring-after(defaultCalendar,$userPath)"/> 
    6654                   </xsl:when> 
    6655                   <xsl:otherwise> 
    6656                     <xsl:value-of select="defaultCalendar"/> 
    6657                   </xsl:otherwise> 
    6658                 </xsl:choose> 
    6659               </span> 
    6660               <xsl:call-template name="selectCalForEvent"/> 
    6661             </td> 
    6662           </tr> 
    6663         </xsl:if> 
    6664         <tr> 
    6665           <td class="fieldname"> 
    6666             Preferred time type: 
    6667           </td> 
    6668           <td> 
    6669             <select name="hour24"> 
    6670               <option value="false"> 
    6671                 <xsl:if test="hour24 = 'false'"> 
    6672                   <xsl:attribute name="selected">selected</xsl:attribute> 
    6673                 </xsl:if> 
    6674                 12 hour + AM/PM 
    6675               </option> 
    6676               <option value="true"> 
    6677                 <xsl:if test="hour24 = 'true'"> 
    6678                   <xsl:attribute name="selected">selected</xsl:attribute> 
    6679                 </xsl:if> 
    6680                 24 hour 
    6681               </option> 
    6682             </select> 
    6683           </td> 
    6684         </tr> 
    6685         <tr> 
    6686           <td class="fieldname"> 
    6687             Preferred end date/time type: 
    6688           </td> 
    6689           <td> 
    6690             <select name="preferredEndType"> 
    6691               <option value="duration"> 
    6692                 <xsl:if test="preferredEndType = 'duration'"> 
    6693                   <xsl:attribute name="selected">selected</xsl:attribute> 
    6694                 </xsl:if> 
    6695                 duration 
    6696               </option> 
    6697               <option value="date"> 
    6698                 <xsl:if test="preferredEndType = 'date'"> 
    6699                   <xsl:attribute name="selected">selected</xsl:attribute> 
    6700                 </xsl:if> 
    6701                 date/time 
    6702               </option> 
    6703             </select> 
    6704           </td> 
    6705         </tr> 
    6706         <tr><td colspan="2">&#160;</td></tr> 
    6707         <tr><td colspan="2" class="fill">Workday settings:</td></tr> 
    6708         <tr> 
    6709           <td class="fieldname"> 
    6710             Workdays: 
    6711           </td> 
    6712           <td> 
    6713             <xsl:variable name="workDays" select="workDays"/> 
    6714             <input type="hidden" name="workDays" value="{$workDays}"/> 
    6715             <input type="checkbox" name="workDayIndex" value="0"> 
    6716               <xsl:if test="substring(workDays,1,1) = 'W'"> 
    6717                 <xsl:attribute name="checked">checked</xsl:attribute> 
    6718               </xsl:if> 
    6719               Sun 
    6720             </input> 
    6721             <input type="checkbox" name="workDayIndex" value="1"> 
    6722               <xsl:if test="substring(workDays,2,1) = 'W'"> 
    6723                 <xsl:attribute name="checked">checked</xsl:attribute> 
    6724               </xsl:if> 
    6725               Mon 
    6726             </input> 
    6727             <input type="checkbox" name="workDayIndex" value="2"> 
    6728               <xsl:if test="substring(workDays,3,1) = 'W'"> 
    6729                 <xsl:attribute name="checked">checked</xsl:attribute> 
    6730               </xsl:if> 
    6731               Tue 
    6732             </input> 
    6733             <input type="checkbox" name="workDayIndex" value="3"> 
    6734               <xsl:if test="substring(workDays,4,1) = 'W'"> 
    6735                 <xsl:attribute name="checked">checked</xsl:attribute> 
    6736               </xsl:if> 
    6737               Wed 
    6738             </input> 
    6739             <input type="checkbox" name="workDayIndex" value="4"> 
    6740               <xsl:if test="substring(workDays,5,1) = 'W'"> 
    6741                 <xsl:attribute name="checked">checked</xsl:attribute> 
    6742               </xsl:if> 
    6743               Thu 
    6744             </input> 
    6745             <input type="checkbox" name="workDayIndex" value="5"> 
    6746               <xsl:if test="substring(workDays,6,1) = 'W'"> 
    6747                 <xsl:attribute name="checked">checked</xsl:attribute> 
    6748               </xsl:if> 
    6749               Fri 
    6750             </input> 
    6751             <input type="checkbox" name="workDayIndex" value="6"> 
    6752               <xsl:if test="substring(workDays,7,1) = 'W'"> 
    6753                 <xsl:attribute name="checked">checked</xsl:attribute> 
    6754               </xsl:if> 
    6755               Sat 
    6756             </input> 
    6757           </td> 
    6758         </tr> 
    6759         <tr> 
    6760           <td class="fieldname"> 
    6761             Workday start: 
    6762           </td> 
    6763           <td> 
    6764             <select name="workdayStart"> 
    6765               <xsl:call-template name="buildWorkdayOptionsList"> 
    6766                 <xsl:with-param name="selectedVal" select="workdayStart"/> 
    6767               </xsl:call-template> 
    6768             </select> 
    6769           </td> 
    6770         </tr> 
    6771         <tr> 
    6772           <td class="fieldname"> 
    6773             Workday end: 
    6774           </td> 
    6775           <td> 
    6776             <xsl:variable name="workdayEnd" select="workdayEnd"/> 
    6777             <select name="workdayEnd"> 
    6778               <xsl:call-template name="buildWorkdayOptionsList"> 
    6779                 <xsl:with-param name="selectedVal" select="workdayEnd"/> 
    6780               </xsl:call-template> 
    6781             </select> 
    6782           </td> 
    6783         </tr> 
    6784         <tr><td colspan="2">&#160;</td></tr> 
    6785         <tr><td colspan="2" class="fill">Display options:</td></tr> 
    6786         <xsl:if test="/bedework/views/view[position()=2]"> 
    6787           <!-- only display if there is more than one to select --> 
    6788           <tr> 
    6789             <td class="fieldname"> 
    6790               Preferred view: 
    6791             </td> 
    6792             <td> 
    6793               <xsl:variable name="preferredView" select="preferredView"/> 
    6794               <select name="preferredView"> 
    6795                 <xsl:for-each select="/bedework/views/view"> 
    6796                   <xsl:variable name="viewName" select="name"/> 
    6797                   <xsl:choose> 
    6798                     <xsl:when test="viewName = $preferredView"> 
    6799                       <option value="{$viewName}" selected="selected"><xsl:value-of select="name"/></option> 
    6800                     </xsl:when> 
    6801                     <xsl:otherwise> 
    6802                       <option value="{$viewName}"><xsl:value-of select="name"/></option> 
    6803                     </xsl:otherwise> 
    6804                   </xsl:choose> 
    6805                 </xsl:for-each> 
    6806               </select> 
    6807             </td> 
    6808           </tr> 
    6809         </xsl:if> 
    6810         <tr> 
    6811           <td class="fieldname"> 
    6812             Preferred view period: 
    6813           </td> 
    6814           <td> 
    6815             <select name="viewPeriod"> 
    6816               <option value="dayView"> 
    6817                 <xsl:if test="preferredViewPeriod = 'dayView'"> 
    6818                   <xsl:attribute name="selected">selected</xsl:attribute> 
    6819                 </xsl:if> 
    6820                 day 
    6821               </option> 
    6822               <option value="todayView"> 
    6823                 <xsl:if test="preferredViewPeriod = 'todayView'"> 
    6824                   <xsl:attribute name="selected">selected</xsl:attribute> 
    6825                 </xsl:if> 
    6826                 today 
    6827               </option> 
    6828               <option value="weekView"> 
    6829                 <xsl:if test="preferredViewPeriod = 'weekView'"> 
    6830                   <xsl:attribute name="selected">selected</xsl:attribute> 
    6831                 </xsl:if> 
    6832                 week 
    6833               </option> 
    6834               <option value="monthView"> 
    6835                 <xsl:if test="preferredViewPeriod = 'monthView'"> 
    6836                   <xsl:attribute name="selected">selected</xsl:attribute> 
    6837                 </xsl:if> 
    6838                 month 
    6839               </option> 
    6840               <option value="yearView"> 
    6841                 <xsl:if test="preferredViewPeriod = 'yearView'"> 
    6842                   <xsl:attribute name="selected">selected</xsl:attribute> 
    6843                 </xsl:if> 
    6844                 year 
    6845               </option> 
    6846             </select> 
    6847           </td> 
    6848         </tr><!-- as you add skins, update this list and set the selected flag 
    6849                  as required; hide if not in use --> 
    6850         <!--<tr> 
    6851           <td class="fieldname"> 
    6852             Skin name: 
    6853           </td> 
    6854           <td> 
    6855             <xsl:variable name="skinName" select="skinName"/> 
    6856             <select name="skin"> 
    6857               <option value="default">default</option> 
    6858             </select> 
    6859           </td> 
    6860         </tr> --> 
    6861         <!-- if you have skin styles, update this list and set the selected flag 
    6862                  as required; hide if not in use --> 
    6863         <!-- 
    6864         <tr> 
    6865           <td class="fieldname"> 
    6866             Skin style: 
    6867           </td> 
    6868           <td> 
    6869             <xsl:variable name="skinStyle" select="skinStyle"/> 
    6870             <select name="skinStyle"> 
    6871               <option value="default">default</option> 
    6872             </select> 
    6873           </td> 
    6874         </tr> --> 
    6875         <!-- hide if not in use: --> 
    6876         <!--<tr> 
    6877           <td class="fieldname"> 
    6878             Interface mode: 
    6879           </td> 
    6880           <td> 
    6881             <select name="userMode"> 
    6882               <option value="0"> 
    6883                 <xsl:if test="userMode = 0"> 
    6884                   <xsl:attribute name="selected">selected</xsl:attribute> 
    6885                 </xsl:if> 
    6886                 basic 
    6887               </option> 
    6888               <option value="1"> 
    6889                 <xsl:if test="userMode = 1"> 
    6890                   <xsl:attribute name="selected">selected</xsl:attribute> 
    6891                 </xsl:if> 
    6892                 simple 
    6893               </option> 
    6894               <option value="3"> 
    6895                 <xsl:if test="userMode = 3"> 
    6896                   <xsl:attribute name="selected">selected</xsl:attribute> 
    6897                 </xsl:if> 
    6898                 advanced 
    6899               </option> 
    6900             </select> 
    6901           </td> 
    6902         </tr>--> 
    6903       </table> 
    6904       <br /> 
    6905  
    6906       <input type="submit" name="modPrefs" value="Update"/> 
    6907       <input type="reset" value="Reset"/> 
    6908       <input type="submit" name="cancelled" value="cancel"/> 
    6909     </form> 
    6910   </xsl:template> 
    6911  
    6912   <xsl:template match="schPrefs"> 
    6913     <h2>Manage Preferences</h2> 
    6914     <ul class="submenu"> 
    6915       <li><a href="{$prefs-fetchForUpdate}">general</a></li> 
    6916       <li class="selected">scheduling/meetings</li> 
    6917     </ul> 
    6918  
    6919     <table class="common" cellspacing="0"> 
    6920       <tr> 
    6921         <th class="leftBorder">Can send me scheduling requests:</th> 
    6922         <th class="leftBorder">Can schedule on my behalf:</th> 
    6923       </tr> 
    6924       <tr> 
    6925         <td class="leftBorder padMe"> 
    6926           <form name="prefsSetAccess1" method="post" action="{$prefs-setAccess}" onsubmit="setScheduleHow(this)"> 
    6927             <xsl:call-template name="schedulingAccessForm"> 
    6928               <xsl:with-param name="what">in</xsl:with-param> 
    6929             </xsl:call-template> 
    6930           </form> 
    6931           <xsl:apply-templates select="inbox/acl" mode="currentAccess"> 
    6932             <xsl:with-param name="action" select="$prefs-setAccess"/> 
    6933             <xsl:with-param name="what">in</xsl:with-param> 
    6934           </xsl:apply-templates> 
    6935         </td> 
    6936         <td class="leftBorder padMe"> 
    6937           <form name="prefsSetAccess2" method="post" action="{$prefs-setAccess}" onsubmit="setScheduleHow(this)"> 
    6938             <xsl:call-template name="schedulingAccessForm"> 
    6939               <xsl:with-param name="what">out</xsl:with-param> 
    6940             </xsl:call-template> 
    6941           </form> 
    6942           <xsl:apply-templates select="outbox/acl" mode="currentAccess"> 
    6943             <xsl:with-param name="action" select="$prefs-setAccess"/> 
    6944             <xsl:with-param name="what">out</xsl:with-param> 
    6945           </xsl:apply-templates> 
    6946         </td> 
    6947       </tr> 
    6948     </table> 
    6949  
    6950     <form name="scheduleAutoProcessingForm" method="post" action="{$prefs-updateSchedulingPrefs}"> 
    6951       <table class="common"> 
    6952         <tr><td colspan="2" class="fill">Scheduling auto-processing:</td></tr> 
    6953         <tr> 
    6954           <td class="fieldname"> 
    6955             Respond to scheduling requests: 
    6956           </td> 
    6957           <td> 
    6958             <input type="radio" name="scheduleAutoRespond" value="true" onclick="toggleAutoRespondFields(this.value)"> 
    6959               <xsl:if test="scheduleAutoRespond = 'true'"> 
    6960                 <xsl:attribute name="checked">checked</xsl:attribute> 
    6961               </xsl:if> 
    6962               true 
    6963             </input> 
    6964             <input type="radio" name="scheduleAutoRespond" value="false" onclick="toggleAutoRespondFields(this.value)"> 
    6965               <xsl:if test="scheduleAutoRespond = 'false'"> 
    6966                 <xsl:attribute name="checked">checked</xsl:attribute> 
    6967               </xsl:if> 
    6968               false 
    6969             </input> 
    6970           </td> 
    6971         </tr> 
    6972         <tr class="subField"> 
    6973           <td class="fieldname"> 
    6974             Accept double-bookings: 
    6975           </td> 
    6976           <td> 
    6977             <input type="radio" name="scheduleDoubleBook" value="true" id="scheduleDoubleBookTrue"> 
    6978               <xsl:if test="scheduleAutoRespond = 'false'"> 
    6979                 <xsl:attribute name="disabled">disabled</xsl:attribute> 
    6980               </xsl:if> 
    6981               <xsl:if test="scheduleDoubleBook = 'true'"> 
    6982                 <xsl:attribute name="checked">checked</xsl:attribute> 
    6983               </xsl:if> 
    6984               true 
    6985             </input> 
    6986             <input type="radio" name="scheduleDoubleBook" value="false" id="scheduleDoubleBookFalse"> 
    6987               <xsl:if test="scheduleAutoRespond = 'false'"> 
    6988                 <xsl:attribute name="disabled">disabled</xsl:attribute> 
    6989               </xsl:if> 
    6990               <xsl:if test="scheduleDoubleBook = 'false'"> 
    6991                 <xsl:attribute name="checked">checked</xsl:attribute> 
    6992               </xsl:if> 
    6993               false 
    6994             </input> 
    6995           </td> 
    6996         </tr> 
    6997         <tr class="subField"> 
    6998           <td class="fieldname"> 
    6999             Cancel processing: 
    7000           </td> 
    7001           <td> 
    7002             <select name="scheduleAutoCancelAction" id="scheduleAutoCancelAction"> 
    7003               <xsl:if test="scheduleAutoRespond = 'false'"> 
    7004                 <xsl:attribute name="disabled">disabled</xsl:attribute> 
    7005               </xsl:if> 
    7006               <option value="0"> 
    7007                 <xsl:if test="scheduleAutoCancelAction = '0'"> 
    7008                   <xsl:attribute name="selected">selected</xsl:attribute> 
    7009                 </xsl:if> 
    7010                 do nothing 
    7011               </option> 
    7012               <option value="1"> 
    7013                 <xsl:if test="scheduleAutoCancelAction = '1'"> 
    7014                   <xsl:attribute name="selected">selected</xsl:attribute> 
    7015                 </xsl:if> 
    7016                 set event status to CANCELLED 
    7017               </option> 
    7018               <option value="2"> 
    7019                 <xsl:if test="scheduleAutoCancelAction = '2'"> 
    7020                   <xsl:attribute name="selected">selected</xsl:attribute> 
    7021                 </xsl:if> 
    7022                 delete the event 
    7023               </option> 
    7024             </select> 
    7025           </td> 
    7026         </tr> 
    7027         <tr> 
    7028           <td colspan="2">&#160;</td> 
    7029         </tr> 
    7030         <tr> 
    7031           <td class="fieldname"> 
    7032             Response processing: 
    7033           </td> 
    7034           <td> 
    7035             <select name="scheduleAutoProcessResponses"> 
    7036               <option value="0"> 
    7037                 <xsl:if test="scheduleAutoProcessResponses = '0'"> 
    7038                   <xsl:attribute name="selected">selected</xsl:attribute> 
    7039                 </xsl:if> 
    7040                 leave in Inbox for manual processing 
    7041               </option> 
    7042               <option value="1"> 
    7043                 <xsl:if test="scheduleAutoProcessResponses = '1'"> 
    7044                   <xsl:attribute name="selected">selected</xsl:attribute> 
    7045                 </xsl:if> 
    7046                 process "Accept" responses - leave the rest in Inbox 
    7047               </option> 
    7048               <option value="2"> 
    7049                 <xsl:if test="scheduleAutoProcessResponses = '2'"> 
    7050                   <xsl:attribute name="selected">selected</xsl:attribute> 
    7051                 </xsl:if> 
    7052                 try to process all responses 
    7053               </option> 
    7054             </select> 
    7055           </td> 
    7056         </tr> 
    7057       </table> 
    7058       <input type="submit" name="modPrefs" value="Update scheduling auto-processing"/> 
    7059       <input type="reset" value="Reset"/> 
    7060       <input type="submit" name="cancelled" value="cancel"/> 
    7061     </form> 
    7062   </xsl:template> 
    7063  
    7064   <!-- construct the workDay times options listings from minute 0 to less than 
    7065        minute 1440 (midnight inclusive); initialize the template with the currently 
    7066        selected value. Change the default value for "increment" here. minTime 
    7067        and maxTime are constants. --> 
    7068   <xsl:template name="buildWorkdayOptionsList"> 
    7069     <xsl:param name="selectedVal"/> 
    7070     <xsl:param name="increment" select="number(30)"/> 
    7071     <xsl:param name="currentTime" select="number(0)"/> 
    7072     <xsl:variable name="minTime" select="number(0)"/> 
    7073     <xsl:variable name="maxTime" select="number(1440)"/> 
    7074     <xsl:if test="$currentTime &lt; $maxTime"> 
    7075       <option value="{$currentTime}"> 
    7076         <xsl:if test="$currentTime = $selectedVal"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    7077         <xsl:if test="floor($currentTime div 60) &lt; 10">0</xsl:if><xsl:value-of select="floor($currentTime div 60)"/>:<xsl:if test="string-length($currentTime mod 60)=1">0</xsl:if><xsl:value-of select="$currentTime mod 60"/> 
    7078       </option> 
    7079       <xsl:call-template name="buildWorkdayOptionsList"> 
    7080         <xsl:with-param name="selectedVal" select="$selectedVal"/> 
    7081         <xsl:with-param name="currentTime" select="$currentTime + $increment"/> 
    7082       </xsl:call-template> 
    7083     </xsl:if> 
    7084   </xsl:template> 
    7085  
    7086  
    7087   <!--==== ACCESS CONTROL TEMPLATES ====--> 
    7088  
    7089   <xsl:template name="schedulingAccessForm"> 
    7090     <xsl:param name="what"/> 
    7091     <input type="hidden" name="what"> 
    7092       <xsl:attribute name="value"><xsl:value-of select="$what"/></xsl:attribute> 
    7093     </input> 
    7094     <p> 
    7095       <input type="text" name="who" width="40"/> 
    7096       <span class="nowrap"><input type="radio" name="whoType" value="user" checked="checked"/>user</span> 
    7097       <span class="nowrap"><input type="radio" name="whoType" value="group"/>group</span> 
    7098     </p> 
    7099     <p> 
    7100       <strong>or</strong> 
    7101       <span class="nowrap"><input type="radio" name="whoType" value="owner"/>owner</span> 
    7102       <span class="nowrap"><input type="radio" name="whoType" value="auth"/>authenticated users</span> 
    7103       <span class="nowrap"><input type="radio" name="whoType" value="other"/>anyone</span> 
    7104     </p> 
    7105  
    7106     <input type="hidden" name="how" value="S"/> 
    7107     <dl> 
    7108       <dt> 
    7109         <input type="checkbox" name="howSetter" value="S" checked="checked" onchange="toggleScheduleHow(this.form,this)"/>all scheduling 
    7110       </dt> 
    7111       <dd> 
    7112         <input type="checkbox" name="howSetter" value="t" checked="checked" disabled="disabled"/>scheduling requests<br/> 
    7113         <input type="checkbox" name="howSetter" value="y" checked="checked" disabled="disabled"/>scheduling replies<br/> 
    7114         <input type="checkbox" name="howSetter" value="s" checked="checked" disabled="disabled"/>free-busy requests 
    7115       </dd> 
    7116     </dl> 
    7117  
    7118     <input type="submit" name="modPrefs" value="Update"/> 
    7119     <input type="reset" value="Reset"/> 
    7120     <input type="submit" name="cancelled" value="cancel"/> 
    7121   </xsl:template> 
    7122  
    7123   <xsl:template name="entityAccessForm"> 
    7124     <xsl:param name="type"/><!-- optional: currently used for inbox and outbox to conditionally display scheduling access --> 
    7125     <xsl:param name="method">1</xsl:param><!-- optional: 
    7126       there are two methods of setting access 
    7127       - method 1, the older method, uses a single request/response per principal 
    7128       - method 2 constructs a javascript object that commits the entire ACL 
    7129         structure in a single request 
    7130       Both methods are currently supported.  Method one is used for calendars, 
    7131       method two for setting event access.  At some point we may move all access 
    7132       control setting to method two. --> 
    7133     <xsl:param name="acl"/><!-- nodeset of entity acls used to initialize 
    7134       javascript object. Required for method two. --> 
    7135  
    7136     <table cellpadding="0" id="shareFormTable" class="common"> 
    7137       <tr> 
    7138         <th colspan="2" class="commonHeader">Add:</th> 
    7139       </tr> 
    7140       <tr> 
    7141         <td> 
    7142           <h5>Who:</h5> 
    7143           <div class="whoTypes"> 
    7144             <input type="text" name="who" size="20"/><br/> 
    7145             <input type="radio" value="user" name="whoType" checked="checked"/> user 
    7146             <input type="radio" value="group" name="whoType"/> group 
    7147             <p>OR</p> 
    7148             <p> 
    7149               <input type="radio" value="owner" name="whoType"/> owner<br/> 
    7150               <input type="radio" value="auth" name="whoType"/> authenticated<br/> 
    7151               <input type="radio" value="unauth" name="whoType"/> unauthenticated<br/> 
    7152               <input type="radio" value="all" name="whoType"/> all users 
    7153             </p> 
    7154           </div> 
    7155         </td> 
    7156         <td> 
    7157           <h5> 
    7158             <span id="accessRightsToggle"> 
    7159               <xsl:choose> 
    7160                 <xsl:when test="/bedework/appvar[key='accessRightsToggle']/value='advanced'"> 
    7161                   <input type="radio" name="setappvar" value="accessRightsToggle(basic)" onclick="changeClass('howList','visible');changeClass('howTable','invisible');"/>basic 
    7162                   <input type="radio" name="setappvar" value="accessRightsToggle(advanced)" checked="checked" onclick="changeClass('howList','invisible');changeClass('howTable','visible');"/>advanced 
    7163                 </xsl:when> 
    7164                 <xsl:otherwise> 
    7165                   <input type="radio" name="setappvar" value="accessRightsToggle(basic)" checked="checked" onclick="changeClass('howList','visible');changeClass('howTable','invisible');"/>basic 
    7166                   <input type="radio" name="setappvar" value="accessRightsToggle(advanced)" onclick="changeClass('howList','invisible');changeClass('howTable','visible');"/>advanced 
    7167                 </xsl:otherwise> 
    7168               </xsl:choose> 
    7169             </span> 
    7170             Rights: 
    7171           </h5> 
    7172           <input type="hidden" name="how" value="" id="bwCurrentHow"/> 
    7173           <!-- field 'acl' will receive xml for method 2 --> 
    7174           <input type="hidden" name="acl" value="" id="bwCurrentAcl" /> 
    7175           <!-- Advanced Access Rights: --> 
    7176           <!-- the "how" field is set by iterating over the howItems below --> 
    7177           <table id="howTable" class="invisible" cellspacing="0"> 
    7178             <xsl:if test="/bedework/appvar[key='accessRightsToggle']/value='advanced'"> 
    7179               <xsl:attribute name="class">visible</xsl:attribute> 
    7180             </xsl:if> 
    7181             <tr> 
    7182               <th>access type</th> 
    7183               <th>allow</th> 
    7184               <th>deny</th> 
    7185             </tr> 
    7186             <tr> 
    7187               <td class="level1"> 
    7188                 <input type="checkbox" value="A" name="howItem" onclick="setupAccessForm(this, this.form); toggleAllowDenyFlag(this, this.form)"/>All 
    7189               </td> 
    7190               <td> 
    7191                 <input type="radio" value="A" name="A" checked="checked" disabled="disabled"/> 
    7192               </td> 
    7193               <td> 
    7194                 <input type="radio" value="-A" name="A" disabled="disabled"/> 
    7195               </td> 
    7196             </tr> 
    7197             <tr> 
    7198               <td class="level2"> 
    7199                 <input type="checkbox" value="R" name="howItem" onclick="setupAccessForm(this, this.form); toggleAllowDenyFlag(this, this.form)" checked="checked"/> Read 
    7200               </td> 
    7201               <td> 
    7202                 <input type="radio" value="R" name="R" checked="checked"/> 
    7203               </td> 
    7204               <td> 
    7205                 <input type="radio" value="-R" name="R"/> 
    7206               </td> 
    7207             </tr> 
    7208             <tr> 
    7209               <td class="level3"> 
    7210                 <input type="checkbox" value="r" name="howItem" disabled="disabled" onclick="toggleAllowDenyFlag(this, this.form)"/> read ACL 
    7211               </td> 
    7212               <td> 
    7213                 <input type="radio" value="r" name="r" checked="checked" disabled="disabled"/> 
    7214               </td> 
    7215               <td> 
    7216                 <input type="radio" value="-r" name="r" disabled="disabled"/> 
    7217               </td> 
    7218             </tr> 
    7219             <tr> 
    7220               <td class="level3"> 
    7221                 <input type="checkbox" value="P" name="howItem" disabled="disabled" onclick="toggleAllowDenyFlag(this, this.form)"/> read current user privilege set 
    7222               </td> 
    7223               <td> 
    7224                 <input type="radio" value="P" name="P" checked="checked" disabled="disabled"/> 
    7225               </td> 
    7226               <td> 
    7227                 <input type="radio" value="-P" name="P" disabled="disabled"/> 
    7228               </td> 
    7229             </tr> 
    7230             <tr> 
    7231               <td class="level3"> 
    7232                 <input type="checkbox" value="F" name="howItem" disabled="disabled" onclick="toggleAllowDenyFlag(this, this.form)"/> read freebusy 
    7233               </td> 
    7234               <td> 
    7235                 <input type="radio" value="F" name="F" checked="checked" disabled="disabled"/> 
    7236               </td> 
    7237               <td> 
    7238                 <input type="radio" value="-F" name="F" disabled="disabled"/> 
    7239               </td> 
    7240             </tr> 
    7241             <tr> 
    7242               <td class="level2"> 
    7243                 <input type="checkbox" value="W" name="howItem" onclick="setupAccessForm(this, this.form); toggleAllowDenyFlag(this, this.form)"/> Write 
    7244               </td> 
    7245               <td> 
    7246                 <input type="radio" value="W" name="W" checked="checked" disabled="disabled"/> 
    7247               </td> 
    7248               <td> 
    7249                 <input type="radio" value="-W" name="W" disabled="disabled"/> 
    7250               </td> 
    7251             </tr> 
    7252             <tr> 
    7253               <td class="level3"> 
    7254                 <input type="checkbox" value="a" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> write ACL 
    7255               </td> 
    7256               <td> 
    7257                 <input type="radio" value="a" name="a" checked="checked" disabled="disabled"/> 
    7258               </td> 
    7259               <td> 
    7260                 <input type="radio" value="-a" name="a" disabled="disabled"/> 
    7261               </td> 
    7262             </tr> 
    7263             <tr> 
    7264               <td class="level3"> 
    7265                 <input type="checkbox" value="p" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> write properties 
    7266               </td> 
    7267               <td> 
    7268                 <input type="radio" value="p" name="p" checked="checked" disabled="disabled"/> 
    7269               </td> 
    7270               <td> 
    7271                 <input type="radio" value="-p" name="p" disabled="disabled"/> 
    7272               </td> 
    7273             </tr> 
    7274             <tr> 
    7275               <td class="level3"> 
    7276                 <input type="checkbox" value="c" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> write content 
    7277               </td> 
    7278               <td> 
    7279                 <input type="radio" value="c" name="c" checked="checked" disabled="disabled"/> 
    7280               </td> 
    7281               <td> 
    7282                 <input type="radio" value="-c" name="c" disabled="disabled"/> 
    7283               </td> 
    7284             </tr> 
    7285             <tr> 
    7286               <td class="level3"> 
    7287                 <input type="checkbox" value="b" name="howItem" onclick="setupAccessForm(this, this.form); toggleAllowDenyFlag(this, this.form)"/> create (bind) 
    7288               </td> 
    7289               <td> 
    7290                 <input type="radio" value="b" name="b" checked="checked" disabled="disabled"/> 
    7291               </td> 
    7292               <td> 
    7293                 <input type="radio" value="-b" name="b" disabled="disabled"/> 
    7294               </td> 
    7295             </tr> 
    7296             <xsl:if test="$type = 'inbox' or $type = 'outbox'"> 
    7297               <tr> 
    7298                 <td class="level4"> 
    7299                   <input type="checkbox" value="S" name="howItem" onclick="setupAccessForm(this, this.form); toggleAllowDenyFlag(this, this.form)"/> schedule 
    7300                 </td> 
    7301               <td> 
    7302                 <input type="radio" value="S" name="S" checked="checked" disabled="disabled"/> 
    7303               </td> 
    7304               <td> 
    7305                 <input type="radio" value="-S" name="S" disabled="disabled"/> 
    7306               </td> 
    7307               </tr> 
    7308               <tr> 
    7309                 <td class="level5"> 
    7310                   <input type="checkbox" value="t" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> schedule request 
    7311                 </td> 
    7312               <td> 
    7313                 <input type="radio" value="t" name="t" checked="checked" disabled="disabled"/> 
    7314               </td> 
    7315               <td> 
    7316                 <input type="radio" value="-t" name="t" disabled="disabled"/> 
    7317               </td> 
    7318               </tr> 
    7319               <tr> 
    7320                 <td class="level5"> 
    7321                   <input type="checkbox" value="y" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> schedule reply 
    7322                 </td> 
    7323               <td> 
    7324                 <input type="radio" value="y" name="y" checked="checked" disabled="disabled"/> 
    7325               </td> 
    7326               <td> 
    7327                 <input type="radio" value="-y" name="y" disabled="disabled"/> 
    7328               </td> 
    7329               </tr> 
    7330               <tr> 
    7331                 <td class="level5"> 
    7332                   <input type="checkbox" value="s" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> schedule free-busy 
    7333                 </td> 
    7334               <td> 
    7335                 <input type="radio" value="s" name="s" checked="checked" disabled="disabled"/> 
    7336               </td> 
    7337               <td> 
    7338                 <input type="radio" value="-s" name="s" disabled="disabled"/> 
    7339               </td> 
    7340               </tr> 
    7341             </xsl:if> 
    7342             <tr> 
    7343               <td class="level3"> 
    7344                  <input type="checkbox" value="u" name="howItem" onclick="toggleAllowDenyFlag(this, this.form)"/> delete (unbind) 
    7345               </td> 
    7346               <td> 
    7347                 <input type="radio" value="u" name="u" checked="checked" disabled="disabled"/> 
    7348               </td> 
    7349               <td> 
    7350                 <input type="radio" value="-u" name="u" disabled="disabled"/> 
    7351               </td> 
    7352             </tr> 
    7353             <!--<tr> 
    7354               <td class="level1"> 
    7355                 <input type="checkbox" value="N" name="howItem" onclick="setupAccessForm(this, this.form)"/> None 
    7356               </td> 
    7357               <td> 
    7358               </td> 
    7359               <td> 
    7360               </td> 
    7361             </tr>--> 
    7362           </table> 
    7363           <!-- Simple Access Rights: --> 
    7364           <!-- the "how" field is set by getting the selected basicHowItem --> 
    7365           <ul id="howList"> 
    7366             <xsl:if test="/bedework/appvar[key='accessRightsToggle']/value='advanced'"> 
    7367               <xsl:attribute name="class">invisible</xsl:attribute> 
    7368             </xsl:if> 
    7369             <li> 
    7370               <input type="radio" value="A" name="basicHowItem"/>All 
    7371             </li> 
    7372             <li> 
    7373               <input type="radio" value="R" name="basicHowItem" checked="checked"/>Read only 
    7374             </li> 
    7375           </ul> 
    7376  
    7377           <!-- below is a simplified listing using radio buttons only; keep for 
    7378                those who would like something inbetween the advanced and simple 
    7379                interfaces --> 
    7380           <!-- 
    7381           <ul id="howList"> 
    7382             <li><input type="radio" value="A" name="how"/> <strong>All</strong> (read, write, delete)</li> 
    7383             <li class="padTop"> 
    7384               <input type="radio" value="R" name="how" checked="checked"/> <strong>Read</strong> (content, access, freebusy) 
    7385             </li> 
    7386             <li> 
    7387               <input type="radio" value="F" name="how"/> Read freebusy only 
    7388             </li> 
    7389             <li class="padTop"> 
    7390               <input type="radio" value="W" name="how"/> <strong>Write and delete</strong> (content, access, properties) 
    7391             </li> 
    7392             <li> 
    7393               <input type="radio" value="c" name="how"/> Write content only 
    7394             </li> 
    7395             <li> 
    7396              <input type="radio" value="u" name="how"/> Delete only 
    7397             </li> 
    7398             <li class="padTop"> 
    7399               <input type="radio" value="Rc" name="how"/> <strong>Read</strong> and <strong>Write content only</strong> 
    7400             </li> 
    7401             <li class="padTop"> 
    7402               <input type="radio" value="N" name="how"/> <strong>None</strong> 
    7403             </li> 
    7404           </ul> --> 
    7405         </td> 
    7406       </tr> 
    7407     </table> 
    7408     <xsl:choose> 
    7409       <xsl:when test="$method = '2'"> 
    7410         <input type="button" name="updateACLs" value="update access" onclick="bwAcl.update(this.form)"/> 
    7411       </xsl:when> 
    7412       <xsl:otherwise> 
    7413         <input type="submit" name="submit" value="Submit"/> 
    7414       </xsl:otherwise> 
    7415     </xsl:choose> 
    7416   </xsl:template> 
    7417  
    7418   <xsl:template match="acl" mode="currentAccess"> 
    7419     <xsl:param name="action"/> <!-- required --> 
    7420     <xsl:param name="calPathEncoded"/> <!-- optional (for entities) --> 
    7421     <xsl:param name="guid"/> <!-- optional (for entities) --> 
    7422     <xsl:param name="recurrenceId"/> <!-- optional (for entities) --> 
    7423     <xsl:param name="what"/> <!-- optional (for scheduling only) --> 
    7424     <xsl:param name="method">1</xsl:param> <!-- which method of access control 
    7425       are we using: 1 (one request per pricipal) or 2 (set all with 
    7426       javascript and send entire ACL to server) --> 
    7427     <h3>Current Access:</h3> 
    7428     <table class="common scheduling" id="bwCurrentAccess"> 
    7429       <thead> 
    7430         <tr> 
    7431           <th>Entry</th> 
    7432           <th>Access</th> 
    7433           <th>Inherited from</th> 
    7434           <td></td> 
    7435         </tr> 
    7436       </thead> 
    7437       <tbody> 
    7438         <xsl:for-each select="ace"> 
    7439           <xsl:variable name="who"> 
    7440             <xsl:choose> 
    7441               <xsl:when test="invert"> 
    7442                 <xsl:choose> 
    7443                   <xsl:when test="invert/principal/href"><xsl:value-of select="normalize-space(invert/principal/href)"/></xsl:when> 
    7444                   <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    7445                   <xsl:otherwise><xsl:value-of select="name(invert/principal/*)"/></xsl:otherwise> 
    7446                 </xsl:choose> 
    7447               </xsl:when> 
    7448               <xsl:otherwise> 
    7449                 <xsl:choose> 
    7450                   <xsl:when test="principal/href"><xsl:value-of select="normalize-space(principal/href)"/></xsl:when> 
    7451                   <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    7452                   <xsl:otherwise><xsl:value-of select="name(principal/*)"/></xsl:otherwise> 
    7453                 </xsl:choose> 
    7454               </xsl:otherwise> 
    7455             </xsl:choose> 
    7456           </xsl:variable> 
    7457           <xsl:variable name="whoType"> 
    7458             <xsl:choose> 
    7459               <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)">user</xsl:when> 
    7460               <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 
    7461               <xsl:when test="$who='authenticated'">auth</xsl:when> 
    7462               <xsl:when test="$who='unauthenticated'">unauth</xsl:when> 
    7463               <xsl:when test="$who='all'">all</xsl:when> 
    7464               <xsl:when test="invert/principal/property/owner">other</xsl:when> 
    7465               <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    7466               <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    7467               <xsl:otherwise></xsl:otherwise> 
    7468             </xsl:choose> 
    7469           </xsl:variable> 
    7470           <xsl:variable name="shortWho"> 
    7471             <xsl:choose> 
    7472               <xsl:when test="$whoType='user'"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/userPrincipalRoot)),'/')"/></xsl:when> 
    7473               <xsl:when test="$whoType='group'"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/groupPrincipalRoot)),'/')"/></xsl:when> 
    7474               <xsl:otherwise></xsl:otherwise> <!-- if not user or group, send no who --> 
    7475             </xsl:choose> 
    7476           </xsl:variable> 
    7477           <tr> 
    7478             <td> 
    7479               <xsl:choose> 
    7480                 <xsl:when test="$whoType = 'user' or ($who = 'owner' and $whoType != 'other')"> 
    7481                   <img src="{$resourcesRoot}/resources/userIcon.gif" width="13" height="13" border="0" alt="user"/> 
    7482                 </xsl:when> 
    7483                 <xsl:otherwise> 
    7484                   <img src="{$resourcesRoot}/resources/groupIcon.gif" width="13" height="13" border="0" alt="group"/> 
    7485                 </xsl:otherwise> 
    7486               </xsl:choose> 
    7487               <xsl:text> </xsl:text> 
    7488               <xsl:choose> 
    7489                 <xsl:when test="$whoType = 'other'"> 
    7490                   anyone (other) 
    7491                 </xsl:when> 
    7492                 <xsl:when test="$shortWho != ''"> 
    7493                   <xsl:value-of select="$shortWho"/> 
    7494                 </xsl:when> 
    7495                 <xsl:otherwise> 
    7496                   <xsl:value-of select="$who"/> 
    7497                 </xsl:otherwise> 
    7498               </xsl:choose> 
    7499             </td> 
    7500             <td class="acls"> 
    7501               <xsl:if test="grant"> 
    7502                 grant: 
    7503                 <span class="grant"> 
    7504                   <xsl:for-each select="grant/*"> 
    7505                     <xsl:value-of select="name(.)"/> 
    7506                     <xsl:if test="position() != last()">, </xsl:if> 
    7507                   </xsl:for-each> 
    7508                 </span><br/> 
    7509               </xsl:if> 
    7510               <xsl:if test="deny"> 
    7511                 deny: 
    7512                 <span class="deny"> 
    7513                   <xsl:for-each select="deny/*"> 
    7514                     <xsl:value-of select="name(.)"/> 
    7515                     <xsl:if test="position() != last()">, </xsl:if> 
    7516                   </xsl:for-each> 
    7517                 </span> 
    7518               </xsl:if> 
    7519             </td> 
    7520             <td> 
    7521               <xsl:choose> 
    7522                 <xsl:when test="inherited"> 
    7523                   <xsl:value-of select="inherited/href"/> 
    7524                 </xsl:when> 
    7525                 <xsl:otherwise> 
    7526                   Not inherited 
    7527                 </xsl:otherwise> 
    7528               </xsl:choose> 
    7529             </td> 
    7530             <td> 
    7531               <xsl:if test="not(inherited)"> 
    7532                 <xsl:choose> 
    7533                   <xsl:when test="$method = '2'"> 
    7534                     <!-- we are using javascript to update the form --> 
    7535                     <xsl:variable name="rowPos" select="position()-1"/> 
    7536                     <a href="javascript:bwAcl.deleteAce({$rowPos})" title="reset to default"> 
    7537                       remove 
    7538                     </a> 
    7539                   </xsl:when> 
    7540                   <xsl:otherwise> 
    7541                     <a href="{$action}&amp;how=default&amp;what={$what}&amp;who={$shortWho}&amp;whoType={$whoType}&amp;calPath={$calPathEncoded}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="reset to default"> 
    7542                       <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="reset to default"/> 
    7543                     </a> 
    7544                   </xsl:otherwise> 
    7545                 </xsl:choose> 
    7546               </xsl:if> 
    7547             </td> 
    7548           </tr> 
    7549         </xsl:for-each> 
    7550       </tbody> 
    7551     </table> 
    7552   </xsl:template> 
    7553  
    7554   <!--==== SEARCH RESULT ====--> 
    7555   <xsl:template name="searchResult"> 
    7556     <h2 class="bwStatusConfirmed"> 
    7557       <div id="searchFilter"> 
    7558         <form name="searchForm" method="post" action="{$search}"> 
    7559           Search: 
    7560           <input type="text" name="query" size="15"> 
    7561             <xsl:attribute name="value"><xsl:value-of select="/bedework/searchResults/query"/></xsl:attribute> 
    7562           </input> 
    7563           <input type="submit" name="submit" value="go"/> 
    7564           Limit: 
    7565           <xsl:choose> 
    7566             <xsl:when test="/bedework/searchResults/searchLimits = 'beforeToday'"> 
    7567               <input type="radio" name="searchLimits" value="fromToday"/>today forward 
    7568               <input type="radio" name="searchLimits" value="beforeToday" checked="checked"/>past dates 
    7569               <input type="radio" name="searchLimits" value="none"/>all dates 
    7570             </xsl:when> 
    7571             <xsl:when test="/bedework/searchResults/searchLimits = 'none'"> 
    7572               <input type="radio" name="searchLimits" value="fromToday"/>today forward 
    7573               <input type="radio" name="searchLimits" value="beforeToday"/>past dates 
    7574               <input type="radio" name="searchLimits" value="none" checked="checked"/>all dates 
    7575             </xsl:when> 
    7576             <xsl:otherwise> 
    7577               <input type="radio" name="searchLimits" value="fromToday" checked="checked"/>today forward 
    7578               <input type="radio" name="searchLimits" value="beforeToday"/>past dates 
    7579               <input type="radio" name="searchLimits" value="none"/>all dates 
    7580             </xsl:otherwise> 
    7581           </xsl:choose> 
    7582         </form> 
    7583       </div> 
    7584       Search Result 
    7585     </h2> 
    7586     <table id="searchTable" cellpadding="0" cellspacing="0"> 
    7587       <tr> 
    7588         <th colspan="5"> 
    7589           <xsl:if test="/bedework/searchResults/numPages &gt; 1"> 
    7590             <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/> 
    7591             <div id="searchPageForm"> 
    7592               page: 
    7593               <xsl:if test="/bedework/searchResults/curPage != 1"> 
    7594                 <xsl:variable name="prevPage" select="number($curPage) - 1"/> 
    7595                 &lt;<a href="{$search-next}&amp;pageNum={$prevPage}">prev</a> 
    7596               </xsl:if> 
    7597               <xsl:text> </xsl:text> 
    7598  
    7599               <xsl:call-template name="searchResultPageNav"> 
    7600                 <xsl:with-param name="page"> 
    7601                   <xsl:choose> 
    7602                     <xsl:when test="number($curPage) - 6 &lt; 1">1</xsl:when> 
    7603                     <xsl:otherwise><xsl:value-of select="number($curPage) - 6"/></xsl:otherwise> 
    7604                   </xsl:choose> 
    7605                 </xsl:with-param> 
    7606               </xsl:call-template> 
    7607  
    7608               <xsl:text> </xsl:text> 
    7609               <xsl:choose> 
    7610                 <xsl:when test="$curPage != /bedework/searchResults/numPages"> 
    7611                   <xsl:variable name="nextPage" select="number($curPage) + 1"/> 
    7612                   <a href="{$search-next}&amp;pageNum={$nextPage}">next</a>&gt; 
    7613                 </xsl:when> 
    7614                 <xsl:otherwise> 
    7615                   <span class="hidden">next&gt;</span><!-- occupy the space to keep the navigation from moving around --> 
    7616                 </xsl:otherwise> 
    7617               </xsl:choose> 
    7618             </div> 
    7619           </xsl:if> 
    7620           <xsl:value-of select="/bedework/searchResults/resultSize"/> 
    7621           result<xsl:if test="/bedework/searchResults/resultSize != 1">s</xsl:if> returned 
    7622           for <em><xsl:value-of select="/bedework/searchResults/query"/></em> 
    7623         </th> 
    7624       </tr> 
    7625       <xsl:if test="/bedework/searchResults/searchResult"> 
    7626         <tr class="fieldNames"> 
    7627           <td> 
    7628             relevance 
    7629           </td> 
    7630           <td> 
    7631             summary 
    7632           </td> 
    7633           <td> 
    7634             date &amp; time 
    7635           </td> 
    7636           <td> 
    7637             calendar 
    7638           </td> 
    7639           <td> 
    7640             location 
    7641           </td> 
    7642         </tr> 
    7643       </xsl:if> 
    7644       <xsl:for-each select="/bedework/searchResults/searchResult"> 
    7645         <xsl:variable name="subscriptionId" select="event/subscription/id"/> 
    7646         <xsl:variable name="calPath" select="event/calendar/encodedPath"/> 
    7647         <xsl:variable name="guid" select="event/guid"/> 
    7648         <xsl:variable name="recurrenceId" select="event/recurrenceId"/> 
    7649         <tr> 
    7650           <td class="relevance"> 
    7651             <xsl:value-of select="ceiling(number(score)*100)"/>% 
    7652             <img src="{$resourcesRoot}/resources/spacer.gif" height="4" class="searchRelevance"> 
    7653               <xsl:attribute name="width"><xsl:value-of select="ceiling((number(score)*100) div 1.5)"/></xsl:attribute> 
    7654             </img> 
    7655           </td> 
    7656           <td> 
    7657             <a href="{$eventView}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}"> 
    7658               <xsl:choose> 
    7659                 <xsl:when test="event/summary = ''"> 
    7660                   <em>no title</em> 
    7661                 </xsl:when> 
    7662                 <xsl:otherwise> 
    7663                   <xsl:value-of select="event/summary"/> 
    7664                 </xsl:otherwise> 
    7665               </xsl:choose> 
    7666             </a> 
    7667           </td> 
    7668           <td> 
    7669             <xsl:value-of select="event/start/longdate"/> 
    7670             <xsl:text> </xsl:text> 
    7671             <xsl:value-of select="event/start/time"/> 
    7672             <xsl:choose> 
    7673               <xsl:when test="event/start/longdate != event/end/longdate"> 
    7674                 - <xsl:value-of select="event/start/longdate"/> 
    7675                 <xsl:text> </xsl:text> 
    7676                 <xsl:value-of select="event/end/time"/> 
    7677               </xsl:when> 
    7678               <xsl:when test="event/start/time != event/end/time"> 
    7679                 - <xsl:value-of select="event/end/time"/> 
    7680               </xsl:when> 
    7681             </xsl:choose> 
    7682           </td> 
    7683           <td> 
    7684             <xsl:variable name="calUrl" select="event/calendar/encodedPath"/> 
    7685             <a href="{$setSelection}&amp;calUrl={$calUrl}"> 
    7686               <xsl:value-of select="event/calendar/name"/> 
    7687             </a> 
    7688           </td> 
    7689           <td> 
    7690             <xsl:value-of select="event/location/address"/> 
    7691           </td> 
    7692         </tr> 
    7693       </xsl:for-each> 
    7694     </table> 
    7695   </xsl:template> 
    7696  
    7697   <xsl:template name="searchResultPageNav"> 
    7698     <xsl:param name="page">1</xsl:param> 
    7699     <xsl:variable name="curPage" select="/bedework/searchResults/curPage"/> 
    7700     <xsl:variable name="numPages" select="/bedework/searchResults/numPages"/> 
    7701     <xsl:variable name="endPage"> 
    7702       <xsl:choose> 
    7703         <xsl:when test="number($curPage) + 6 &gt; number($numPages)"><xsl:value-of select="$numPages"/></xsl:when> 
    7704         <xsl:otherwise><xsl:value-of select="number($curPage) + 6"/></xsl:otherwise> 
    7705       </xsl:choose> 
    7706     </xsl:variable> 
    7707     <xsl:choose> 
    7708       <xsl:when test="$page = $curPage"> 
    7709         <xsl:value-of select="$page"/> 
    7710       </xsl:when> 
    7711       <xsl:otherwise> 
    7712         <a href="{$search-next}&amp;pageNum={$page}"> 
    7713           <xsl:value-of select="$page"/> 
    7714         </a> 
    7715       </xsl:otherwise> 
    7716     </xsl:choose> 
    7717     <xsl:text> </xsl:text> 
    7718     <xsl:if test="$page &lt; $endPage"> 
    7719        <xsl:call-template name="searchResultPageNav"> 
    7720          <xsl:with-param name="page" select="number($page)+1"/> 
    7721       </xsl:call-template> 
    7722     </xsl:if> 
    7723   </xsl:template> 
    7724  
    7725   <!--==== SIDE CALENDAR MENU ====--> 
    7726   <xsl:template match="calendar" mode="sideList"> 
    7727     <xsl:variable name="calPath" select="encodedPath"/> 
    7728     <div class="std-text"> 
    7729       <a href="{$setSelection}&amp;calPath={$calPath}"><xsl:value-of select="title"/></a> 
    7730     </div> 
    7731   </xsl:template> 
    7732  
    7733   <!--==== STAND-ALONE PAGES ====--> 
    7734   <!-- not currently in use --> 
    7735   <xsl:template name="selectPage"> 
    7736     <!-- <xsl:choose> 
    7737       <xsl:when test="/bedework/appvar[key='page']"> 
    7738         <xsl:choose> 
    7739           <xsl:otherwise> 
    7740             <xsl:call-template name="noPage"/> 
    7741           </xsl:otherwise> 
    7742         </xsl:choose> 
    7743       </xsl:when> 
    7744       <xsl:otherwise> --> 
    7745         <xsl:call-template name="noPage"/> 
    7746       <!--</xsl:otherwise> 
    7747     </xsl:choose>--> 
    7748   </xsl:template> 
    7749  
    7750   <xsl:template name="noPage"> 
    7751     <p> 
    7752       Error: there is no page with that name.  Please select a navigational 
    7753       link to continue. 
    7754     </p> 
    77551677  </xsl:template> 
    77561678 
     
    77911713  </xsl:template> 
    77921714 
    7793   <!-- return string values to be loaded into javascript for access control 
    7794        forms, method 2 --> 
    7795   <xsl:template match="ace" mode="initJS"><!-- 
    7796   --><xsl:variable name="who"><!-- 
    7797    --><xsl:choose> 
    7798         <xsl:when test="invert"> 
    7799           <xsl:choose> 
    7800             <xsl:when test="invert/principal/href"><xsl:value-of select="normalize-space(invert/principal/href)"/></xsl:when> 
    7801             <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    7802             <xsl:otherwise><xsl:value-of select="name(invert/principal/*)"/></xsl:otherwise> 
    7803           </xsl:choose> 
    7804         </xsl:when> 
    7805         <xsl:otherwise> 
    7806           <xsl:choose> 
    7807             <xsl:when test="principal/href"><xsl:value-of select="normalize-space(principal/href)"/></xsl:when> 
    7808             <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    7809             <xsl:otherwise><xsl:value-of select="name(principal/*)"/></xsl:otherwise> 
    7810           </xsl:choose> 
    7811         </xsl:otherwise> 
    7812       </xsl:choose><!-- 
    7813   --></xsl:variable><!-- 
    7814   --><xsl:variable name="whoType"><!-- 
    7815    --><xsl:choose> 
    7816         <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)">user</xsl:when> 
    7817         <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 
    7818         <xsl:when test="$who='authenticated'">auth</xsl:when> 
    7819         <xsl:when test="$who='unauthenticated'">unauth</xsl:when> 
    7820         <xsl:when test="$who='all'">all</xsl:when> 
    7821         <xsl:when test="invert/principal/property/owner">other</xsl:when> 
    7822         <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    7823         <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    7824         <xsl:otherwise></xsl:otherwise> 
    7825       </xsl:choose><!-- 
    7826  --></xsl:variable><!-- 
    7827  --><xsl:variable name="aclString"><!-- 
    7828    --><xsl:if test="grant"><!-- 
    7829      --><xsl:for-each select="grant/*"><xsl:call-template name="grantDenyToInternal"><xsl:with-param name="name"><xsl:value-of select="name(.)"/></xsl:with-param></xsl:call-template></xsl:for-each><!-- 
    7830    --></xsl:if><!-- 
    7831    --><xsl:if test="deny"><!-- 
    7832      --><xsl:for-each select="deny/*">-<xsl:call-template name="grantDenyToInternal"><xsl:with-param name="name"><xsl:value-of select="name(.)"/></xsl:with-param></xsl:call-template></xsl:for-each><!-- 
    7833    --></xsl:if><!-- 
    7834  --></xsl:variable><!-- 
    7835  --><xsl:variable name="inherited"><!-- 
    7836    --><xsl:choose> 
    7837        <xsl:when test="inherited"><xsl:value-of select="inherited/href"/></xsl:when> 
    7838        <xsl:otherwise></xsl:otherwise> 
    7839      </xsl:choose><!-- 
    7840   --></xsl:variable><!-- 
    7841   --><xsl:variable name="invert"><!-- 
    7842     --><xsl:choose> 
    7843          <xsl:when test="invert">true</xsl:when> 
    7844          <xsl:otherwise>false</xsl:otherwise> 
    7845        </xsl:choose><!-- 
    7846   --></xsl:variable> 
    7847   <!-- now initialize the object:--> 
    7848     bwAcl.init('<xsl:value-of select="$who"/>','<xsl:value-of select="$whoType"/>','<xsl:value-of select="$aclString"/>','<xsl:value-of select="$inherited"/>','<xsl:value-of select="$invert"/>'); 
    7849   </xsl:template> 
    7850  
    7851   <xsl:template name="grantDenyToInternal"><!-- 
    7852   --><xsl:param name="name"/><!-- 
    7853   --><xsl:choose> 
    7854        <xsl:when test="$name = 'all'">A</xsl:when> 
    7855        <xsl:when test="$name = 'read'">R</xsl:when> 
    7856        <xsl:when test="$name = 'read-acl'">r</xsl:when> 
    7857        <xsl:when test="$name = 'read-cuurrent-user-privilege-set'">P</xsl:when> 
    7858        <xsl:when test="$name = 'read-free-busy'">F</xsl:when> 
    7859        <xsl:when test="$name = 'write'">W</xsl:when> 
    7860        <xsl:when test="$name = 'write-acl'">a</xsl:when> 
    7861        <xsl:when test="$name = 'write-properties'">p</xsl:when> 
    7862        <xsl:when test="$name = 'write-content'">c</xsl:when> 
    7863        <xsl:when test="$name = 'bind'">b</xsl:when> 
    7864        <xsl:when test="$name = 'schedule'">S</xsl:when> 
    7865        <xsl:when test="$name = 'schedule-request'">t</xsl:when> 
    7866        <xsl:when test="$name = 'schedule-reply'">y</xsl:when> 
    7867        <xsl:when test="$name = 'schedule-free-busy'">s</xsl:when> 
    7868        <xsl:when test="$name = 'unbind'">u</xsl:when> 
    7869        <xsl:when test="$name = 'unlock'">U</xsl:when> 
    7870        <xsl:when test="$name = 'none'">N</xsl:when> 
    7871      </xsl:choose><!-- 
    7872 --></xsl:template> 
    7873  
    78741715  <!-- search and replace template taken from 
    78751716       http://www.biglist.com/lists/xsl-list/archives/200211/msg00337.html -->