Changeset 1625

Show
Ignore:
Timestamp:
11/30/07 07:44:58
Author:
kllin
Message:

first work on default.xsl for webuser

Files:

Legend:

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

    r1590 r1625  
    4242  <xsl:include href="../../../bedework-common/default/default/errors.xsl"/> 
    4343  <xsl:include href="../../../bedework-common/default/default/messages.xsl"/> 
     44 
     45  <xsl:include href="../../../bedework-common/default/default/views.xsl"/> 
     46  <xsl:include href="../../../bedework-common/default/default/category-location.xsl"/> 
     47  <xsl:include href="../../../bedework-common/default/default/calendar.xsl"/> 
     48  <xsl:include href="../../../bedework-common/default/default/event-form.xsl"/> 
     49  <xsl:include href="../../../bedework-common/default/default/boxes.xsl"/> 
     50  <xsl:include href="../../../bedework-common/default/default/subscriptions.xsl"/> 
     51  <xsl:include href="../../../bedework-common/default/default/search.xsl"/> 
    4452 
    4553  <!-- DEFINE GLOBAL CONSTANTS --> 
     
    870878  </xsl:template> 
    871879 
    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> 
    1407880 
    1408881  <!--==== SINGLE EVENT ====--> 
     
    19681441  </xsl:template> 
    19691442 
    1970  
    1971   <!--==== ADD and EDIT EVENT FORM ====--> 
    1972   <xsl:template match="formElements" mode="eventForm"> 
    1973     <xsl:variable name="subscriptionId" select="subscriptionId"/> 
    1974     <xsl:variable name="calPathEncoded" select="form/calendar/encodedPath"/> 
    1975     <xsl:variable name="calPath" select="form/calendar/path"/> 
    1976     <xsl:variable name="guid" select="guid"/> 
    1977     <xsl:variable name="recurrenceId" select="recurrenceId"/> 
    1978     <input type="hidden" name="endType" value="date"/> 
    1979  
    1980       <!-- event info for edit event --> 
    1981       <xsl:if test="/bedework/creating != 'true'"> 
    1982         <table class="common" cellspacing="0"> 
    1983           <tr> 
    1984             <th colspan="2" class="commonHeader"> 
    1985               <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> 
    1994                 <xsl:choose> 
    1995                   <xsl:when test="recurrenceId != ''"> 
    1996                     <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    1997                     Delete: 
    1998                     <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="delete master (recurring event)">all</a>, 
    1999                     <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete instance (recurring event)">instance</a> 
    2000                   </xsl:when> 
    2001                   <xsl:otherwise> 
    2002                     <a href="{$delEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="delete event"> 
    2003                       <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="delete"/> 
    2004                       Delete 
    2005                       <xsl:if test="form/recurringEntity='true'"> 
    2006                         all 
    2007                       </xsl:if> 
    2008                     </a> 
    2009                   </xsl:otherwise> 
    2010                 </xsl:choose> 
    2011               </div> 
    2012               <!-- Display type of event --> 
    2013               <xsl:variable name="entityType"> 
    2014                 <xsl:choose> 
    2015                   <xsl:when test="entityType = '2'">Task</xsl:when> 
    2016                   <xsl:when test="scheduleMethod = '2'">Meeting</xsl:when> 
    2017                   <xsl:otherwise>Event</xsl:otherwise> 
    2018                 </xsl:choose> 
    2019               </xsl:variable> 
    2020               <xsl:if test="form/recurringEntity='true' or recurrenceId != ''"> 
    2021                 Recurring 
    2022               </xsl:if> 
    2023               <xsl:choose> 
    2024                 <xsl:when test="form"> 
    2025                   <!-- just a placeholder: need to add owner to the jsp --> 
    2026                   Personal <xsl:value-of select="$entityType"/> 
    2027                 </xsl:when> 
    2028                 <xsl:when test="public = 'true'"> 
    2029                   Public <xsl:value-of select="$entityType"/> 
    2030                 </xsl:when> 
    2031                 <xsl:otherwise> 
    2032                   <xsl:value-of select="$entityType"/> (<xsl:value-of select="calendar/owner"/>) 
    2033                 </xsl:otherwise> 
    2034               </xsl:choose> 
    2035               <xsl:if test="form/recurringEntity='true' and recurrenceId = ''"> 
    2036                 <xsl:text> </xsl:text> 
    2037                 <em>(recurrence master)</em> 
    2038               </xsl:if> 
    2039             </th> 
    2040           </tr> 
    2041         </table> 
    2042       </xsl:if> 
    2043  
    2044       <!-- event form submenu --> 
    2045       <ul id="eventFormTabs" class="submenu"> 
    2046         <li class="selected"> 
    2047           <a href="javascript:setTab('eventFormTabs',0); show('bwEventTab-Basic'); hide('bwEventTab-Details','bwEventTab-Recurrence','bwEventTab-Access','bwEventTab-Scheduling');"> 
    2048             basic 
    2049           </a> 
    2050         </li> 
    2051         <li> 
    2052           <a href="javascript:setTab('eventFormTabs',1); show('bwEventTab-Details'); hide('bwEventTab-Basic','bwEventTab-Recurrence','bwEventTab-Access','bwEventTab-Scheduling');"> 
    2053             details 
    2054           </a> 
    2055         </li> 
    2056         <li> 
    2057           <a href="javascript:setTab('eventFormTabs',2); show('bwEventTab-Recurrence'); hide('bwEventTab-Details','bwEventTab-Basic','bwEventTab-Access','bwEventTab-Scheduling');"> 
    2058             recurrence 
    2059           </a> 
    2060         </li> 
    2061         <li> 
    2062           <a href="javascript:setTab('eventFormTabs',3); show('bwEventTab-Scheduling'); hide('bwEventTab-Basic','bwEventTab-Details','bwEventTab-Recurrence','bwEventTab-Access');"> 
    2063             scheduling 
    2064           </a> 
    2065         </li> 
    2066         <li> 
    2067           <a href="javascript:setTab('eventFormTabs',4); show('bwEventTab-Access'); hide('bwEventTab-Details','bwEventTab-Basic','bwEventTab-Recurrence','bwEventTab-Scheduling');"> 
    2068             access 
    2069           </a> 
    2070         </li> 
    2071       </ul> 
    2072  
    2073     <!-- Basic tab --> 
    2074     <!-- ============== --> 
    2075     <!-- this tab is visible by default --> 
    2076     <div id="bwEventTab-Basic"> 
    2077       <table cellspacing="0" class="common dottedBorder"> 
    2078         <!--  Calendar in which to place event  --> 
    2079         <tr> 
    2080           <td class="fieldname"> 
    2081             Calendar: 
    2082           </td> 
    2083           <td class="fieldval"> 
    2084             <!-- the string "user/" should not be hard coded; fix this --> 
    2085             <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
    2086             <xsl:variable name="writableCalendars"> 
    2087               <xsl:value-of select=" 
    2088                 count(/bedework/myCalendars//calendar[calType = '1' and 
    2089                        currentAccess/current-user-privilege-set/privilege/write-content]) + 
    2090                 count(/bedework/mySubscriptions//calendar[calType = '1' and 
    2091                        currentAccess/current-user-privilege-set/privilege/write-content and 
    2092                        (not(contains(path,$userPath)))])"/> 
    2093             </xsl:variable> 
    2094             <xsl:choose> 
    2095               <xsl:when test="$writableCalendars = 1"> 
    2096                 <!-- there is only 1 writable calendar, so find it by looking down both trees at once --> 
    2097                 <xsl:variable name="newCalPath"><xsl:value-of select="/bedework/myCalendars//calendar[calType = '1' and 
    2098                          currentAccess/current-user-privilege-set/privilege/write-content]/path"/><xsl:value-of select="/bedework/mySubscriptions//calendar[calType = '1' and 
    2099                        currentAccess/current-user-privilege-set/privilege/write-content and 
    2100                        (not(contains(path,$userPath)))]/path"/></xsl:variable> 
    2101  
    2102                 <input type="hidden" name="newCalPath" value="{$newCalPath}"/> 
    2103  
    2104                 <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> 
    2105                 <span id="bwEventCalDisplay"> 
    2106                   <xsl:choose> 
    2107                     <xsl:when test="contains($newCalPath,$userFullPath)"> 
    2108                       <xsl:value-of select="substring-after($newCalPath,$userFullPath)"/> 
    2109                     </xsl:when> 
    2110                     <xsl:otherwise> 
    2111                       <xsl:value-of select="$newCalPath"/> 
    2112                     </xsl:otherwise> 
    2113                   </xsl:choose> 
    2114                 </span> 
    2115               </xsl:when> 
    2116               <xsl:otherwise> 
    2117                 <input type="hidden" name="newCalPath" id="bwNewCalPathField"> 
    2118                   <xsl:attribute name="value"><xsl:value-of select="form/calendar/path"/></xsl:attribute> 
    2119                 </input> 
    2120  
    2121                 <xsl:variable name="userFullPath"><xsl:value-of select="$userPath"/>/</xsl:variable> 
    2122                 <span id="bwEventCalDisplay"> 
    2123                   <xsl:choose> 
    2124                     <xsl:when test="contains(form/calendar/path,$userFullPath)"> 
    2125                       <xsl:value-of select="substring-after(form/calendar/path,$userFullPath)"/> 
    2126                     </xsl:when> 
    2127                     <xsl:otherwise> 
    2128                       <xsl:value-of select="form/calendar/path"/> 
    2129                     </xsl:otherwise> 
    2130                   </xsl:choose> 
    2131                   <xsl:text> </xsl:text> 
    2132                   <!-- this final text element is required to avoid an empty 
    2133                        span element which is improperly rendered in the browser --> 
    2134                 </span> 
    2135  
    2136                 <xsl:call-template name="selectCalForEvent"/> 
    2137  
    2138               </xsl:otherwise> 
    2139             </xsl:choose> 
    2140           </td> 
    2141         </tr> 
    2142         <!--  Summary (title) of event  --> 
    2143         <tr> 
    2144           <td class="fieldname"> 
    2145             Title: 
    2146           </td> 
    2147           <td class="fieldval"> 
    2148             <xsl:variable name="title" select="form/title/input/@value"/> 
    2149             <input type="text" name="summary" size="80" value="{$title}" id="bwEventTitle"/> 
    2150           </td> 
    2151         </tr> 
    2152  
    2153         <!--  Date and Time --> 
    2154         <!--  ============= --> 
    2155         <tr> 
    2156           <td class="fieldname"> 
    2157             Date &amp; Time: 
    2158           </td> 
    2159           <td class="fieldval"> 
    2160             <!-- Set the timefields class for the first load of the page; 
    2161                  subsequent changes will take place using javascript without a 
    2162                  page reload. --> 
    2163             <xsl:variable name="timeFieldsClass"> 
    2164               <xsl:choose> 
    2165                 <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
    2166                 <xsl:otherwise>timeFields</xsl:otherwise> 
    2167               </xsl:choose> 
    2168             </xsl:variable> 
    2169  
    2170             <!-- date only event: anniversary event - often interpreted as "all day event" --> 
    2171             <xsl:choose> 
    2172               <xsl:when test="form/allDay/input/@checked='checked'"> 
    2173                 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="on" checked="checked"/> 
    2174                 <input type="hidden" name="eventStartDate.dateOnly" value="true" id="allDayStartDateField"/> 
    2175                 <input type="hidden" name="eventEndDate.dateOnly" value="true" id="allDayEndDateField"/> 
    2176               </xsl:when> 
    2177               <xsl:otherwise> 
    2178                 <input type="checkbox" name="allDayFlag" onclick="swapAllDayEvent(this)" value="off"/> 
    2179                 <input type="hidden" name="eventStartDate.dateOnly" value="false" id="allDayStartDateField"/> 
    2180                 <input type="hidden" name="eventEndDate.dateOnly" value="false" id="allDayEndDateField"/> 
    2181               </xsl:otherwise> 
    2182             </xsl:choose> 
    2183             all day 
    2184  
    2185             <!-- floating event: no timezone (and not UTC) --> 
    2186             <xsl:choose> 
    2187               <xsl:when test="form/floating/input/@checked='checked'"> 
    2188                 <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="on" checked="checked"/> 
    2189                 <input type="hidden" name="eventStartDate.floating" value="true" id="startFloating"/> 
    2190                 <input type="hidden" name="eventEndDate.floating" value="true" id="endFloating"/> 
    2191               </xsl:when> 
    2192               <xsl:otherwise> 
    2193                 <input type="checkbox" name="floatingFlag" id="floatingFlag" onclick="swapFloatingTime(this)" value="off"/> 
    2194                 <input type="hidden" name="eventStartDate.floating" value="false" id="startFloating"/> 
    2195                 <input type="hidden" name="eventEndDate.floating" value="false" id="endFloating"/> 
    2196               </xsl:otherwise> 
    2197             </xsl:choose> 
    2198             floating 
    2199  
    2200             <!-- store time as coordinated universal time (UTC) --> 
    2201             <xsl:choose> 
    2202               <xsl:when test="form/storeUTC/input/@checked='checked'"> 
    2203                 <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="on" checked="checked"/> 
    2204                 <input type="hidden" name="eventStartDate.storeUTC" value="true" id="startStoreUTC"/> 
    2205                 <input type="hidden" name="eventEndDate.storeUTC" value="true" id="endStoreUTC"/> 
    2206               </xsl:when> 
    2207               <xsl:otherwise> 
    2208                 <input type="checkbox" name="storeUTCFlag" id="storeUTCFlag" onclick="swapStoreUTC(this)" value="off"/> 
    2209                 <input type="hidden" name="eventStartDate.storeUTC" value="false" id="startStoreUTC"/> 
    2210                 <input type="hidden" name="eventEndDate.storeUTC" value="false" id="endStoreUTC"/> 
    2211               </xsl:otherwise> 
    2212             </xsl:choose> 
    2213             store as UTC 
    2214  
    2215             <br/> 
    2216             <div class="dateStartEndBox"> 
    2217               <strong>Start:</strong> 
    2218               <div class="dateFields"> 
    2219                 <span class="startDateLabel">Date </span> 
    2220                 <xsl:choose> 
    2221                   <xsl:when test="$portalFriendly = 'true'"> 
    2222                     <xsl:copy-of select="/bedework/formElements/form/start/month/*"/> 
    2223                     <xsl:copy-of select="/bedework/formElements/form/start/day/*"/> 
    2224                     <xsl:choose> 
    2225                       <xsl:when test="/bedework/creating = 'true'"> 
    2226                         <xsl:copy-of select="/bedework/formElements/form/start/year/*"/> 
    2227                       </xsl:when> 
    2228                       <xsl:otherwise> 
    2229                         <xsl:copy-of select="/bedework/formElements/form/start/yearText/*"/> 
    2230                       </xsl:otherwise> 
    2231                     </xsl:choose> 
    2232                     <script language="JavaScript" type="text/javascript"> 
    2233                       <xsl:comment> 
    2234                       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', '<xsl:value-of select="$resourcesRoot"/>/resources/'); 
    2235                       </xsl:comment> 
    2236                     </script> 
    2237                   </xsl:when> 
    2238                   <xsl:otherwise> 
    2239                     <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetStartDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
    2240                       <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute> 
    2241                       <xsl:text> </xsl:text> 
    2242                     </span> 
    2243                     <input type="hidden" name="eventStartDate.year"> 
    2244                       <xsl:attribute name="value"><xsl:value-of select="form/start/yearText/input/@value"/></xsl:attribute> 
    2245                     </input> 
    2246                     <input type="hidden" name="eventStartDate.month"> 
    2247                       <xsl:attribute name="value"><xsl:value-of select="form/start/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
    2248                     </input> 
    2249                     <input type="hidden" name="eventStartDate.day"> 
    2250                       <xsl:attribute name="value"><xsl:value-of select="form/start/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
    2251                     </input> 
    2252                   </xsl:otherwise> 
    2253                 </xsl:choose> 
    2254               </div> 
    2255               <div class="{$timeFieldsClass}" id="startTimeFields"> 
    2256                 <span id="calWidgetStartTimeHider" class="show"> 
    2257                   <xsl:copy-of select="form/start/hour/*"/> 
    2258                   <xsl:copy-of select="form/start/minute/*"/> 
    2259                   <xsl:if test="form/start/ampm"> 
    2260                     <xsl:copy-of select="form/start/ampm/*"/> 
    2261                   </xsl:if> 
    2262                   <xsl:text> </xsl:text> 
    2263                   <a href="javascript:bwClockLaunch('eventStartDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a> 
    2264  
    2265                   <select name="eventStartDate.tzid" id="startTzid" class="timezones"> 
    2266                     <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 
    2267                     <option value="-1">select timezone...</option> 
    2268                     <xsl:variable name="startTzId" select="form/start/tzid"/> 
    2269                     <xsl:for-each select="/bedework/timezones/timezone"> 
    2270                       <option> 
    2271                         <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
    2272                         <xsl:if test="$startTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    2273                         <xsl:value-of select="name"/> 
    2274                       </option> 
    2275                     </xsl:for-each> 
    2276                   </select> 
    2277                 </span> 
    2278               </div> 
    2279             </div> 
    2280             <div class="dateStartEndBox"> 
    2281               <strong> 
    2282                 <xsl:choose> 
    2283                   <xsl:when test="form/entityType = '2'">Due:</xsl:when> 
    2284                   <xsl:otherwise>End:</xsl:otherwise> 
    2285                 </xsl:choose> 
    2286               </strong> 
    2287               <xsl:choose> 
    2288                 <xsl:when test="form/end/type='E'"> 
    2289                   <input type="radio" name="eventEndType" value="E" checked="checked" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    2290                 </xsl:when> 
    2291                 <xsl:otherwise> 
    2292                   <input type="radio" name="eventEndType" value="E" onclick="changeClass('endDateTime','shown');changeClass('endDuration','invisible');"/> 
    2293                 </xsl:otherwise> 
    2294               </xsl:choose> 
    2295               Date 
    2296               <xsl:variable name="endDateTimeClass"> 
    2297                 <xsl:choose> 
    2298                   <xsl:when test="form/end/type='E'">shown</xsl:when> 
    2299                   <xsl:otherwise>invisible</xsl:otherwise> 
    2300                 </xsl:choose> 
    2301               </xsl:variable> 
    2302               <div class="{$endDateTimeClass}" id="endDateTime"> 
    2303                 <div class="dateFields"> 
    2304                   <xsl:choose> 
    2305                     <xsl:when test="$portalFriendly = 'true'"> 
    2306                       <xsl:copy-of select="/bedework/formElements/form/end/dateTime/month/*"/> 
    2307                       <xsl:copy-of select="/bedework/formElements/form/end/dateTime/day/*"/> 
    2308                       <xsl:choose> 
    2309                         <xsl:when test="/bedework/creating = 'true'"> 
    2310                           <xsl:copy-of select="/bedework/formElements/form/end/dateTime/year/*"/> 
    2311                         </xsl:when> 
    2312                         <xsl:otherwise> 
    2313                           <xsl:copy-of select="/bedework/formElements/form/end/dateTime/yearText/*"/> 
    2314                         </xsl:otherwise> 
    2315                       </xsl:choose> 
    2316                       <script language="JavaScript" type="text/javascript"> 
    2317                       <xsl:comment> 
    2318                         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', '<xsl:value-of select="$resourcesRoot"/>/resources/'); 
    2319                       </xsl:comment> 
    2320                       </script> 
    2321                     </xsl:when> 
    2322                     <xsl:otherwise> 
    2323                       <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetEndDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
    2324                         <xsl:attribute name="value"><xsl:value-of select="form/end/rfc3339DateTime"/></xsl:attribute> 
    2325                         <xsl:text> </xsl:text> 
    2326                       </span> 
    2327                       <input type="hidden" name="eventEndDate.year"> 
    2328                         <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/yearText/input/@value"/></xsl:attribute> 
    2329                       </input> 
    2330                       <input type="hidden" name="eventEndDate.month"> 
    2331                         <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/month/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
    2332                       </input> 
    2333                       <input type="hidden" name="eventEndDate.day"> 
    2334                         <xsl:attribute name="value"><xsl:value-of select="form/end/dateTime/day/select/option[@selected = 'selected']/@value"/></xsl:attribute> 
    2335                       </input> 
    2336                     </xsl:otherwise> 
    2337                   </xsl:choose> 
    2338                 </div> 
    2339                 <div class="{$timeFieldsClass}" id="endTimeFields"> 
    2340                   <span id="calWidgetEndTimeHider" class="show"> 
    2341                     <xsl:copy-of select="form/end/dateTime/hour/*"/> 
    2342                     <xsl:copy-of select="form/end/dateTime/minute/*"/> 
    2343                     <xsl:if test="form/end/dateTime/ampm"> 
    2344                       <xsl:copy-of select="form/end/dateTime/ampm/*"/> 
    2345                     </xsl:if> 
    2346                     <xsl:text> </xsl:text> 
    2347                     <a href="javascript:bwClockLaunch('eventEndDate');"><img src="{$resourcesRoot}/resources/clockIcon.gif" width="16" height="15" border="0" alt="bwClock"/></a> 
    2348  
    2349                     <select name="eventEndDate.tzid" id="endTzid" class="timezones"> 
    2350                       <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 
    2351                       <option value="-1">select timezone...</option> 
    2352                       <xsl:variable name="endTzId" select="form/end/dateTime/tzid"/> 
    2353                       <xsl:for-each select="/bedework/timezones/timezone"> 
    2354                         <option> 
    2355                           <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
    2356                             <xsl:if test="$endTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    2357                           <xsl:value-of select="name"/> 
    2358                         </option> 
    2359                       </xsl:for-each> 
    2360                     </select> 
    2361                   </span> 
    2362                 </div> 
    2363               </div><br/> 
    2364               <div id="clock" class="invisible"> 
    2365                 <xsl:call-template name="clock"/> 
    2366               </div> 
    2367               <div class="dateFields"> 
    2368                 <xsl:choose> 
    2369                   <xsl:when test="form/end/type='D'"> 
    2370                     <input type="radio" name="eventEndType" value="D" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    2371                   </xsl:when> 
    2372                   <xsl:otherwise> 
    2373                     <input type="radio" name="eventEndType" value="D" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','shown');"/> 
    2374                   </xsl:otherwise> 
    2375                 </xsl:choose> 
    2376                 Duration 
    2377                 <xsl:variable name="endDurationClass"> 
    2378                   <xsl:choose> 
    2379                     <xsl:when test="form/end/type='D'">shown</xsl:when> 
    2380                     <xsl:otherwise>invisible</xsl:otherwise> 
    2381                   </xsl:choose> 
    2382                 </xsl:variable> 
    2383                 <xsl:variable name="durationHrMinClass"> 
    2384                   <xsl:choose> 
    2385                     <xsl:when test="form/allDay/input/@checked='checked'">invisible</xsl:when> 
    2386                     <xsl:otherwise>shown</xsl:otherwise> 
    2387                   </xsl:choose> 
    2388                 </xsl:variable> 
    2389                 <div class="{$endDurationClass}" id="endDuration"> 
    2390                   <xsl:choose> 
    2391                     <xsl:when test="form/end/duration/weeks/input/@value = '0'"> 
    2392                     <!-- we are using day, hour, minute format --> 
    2393                     <!-- must send either no week value or week value of 0 (zero) --> 
    2394                       <div class="durationBox"> 
    2395                         <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')" checked="checked"/> 
    2396                         <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
    2397                         <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays"/>days 
    2398                         <span id="durationHrMin" class="{$durationHrMinClass}"> 
    2399                           <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
    2400                           <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours"/>hours 
    2401                           <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
    2402                           <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes"/>minutes 
    2403                         </span> 
    2404                       </div> 
    2405                       <span class="durationSpacerText">or</span> 
    2406                       <div class="durationBox"> 
    2407                         <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')"/> 
    2408                         <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
    2409                         <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks" disabled="disabled"/>weeks 
    2410                       </div> 
    2411                     </xsl:when> 
    2412                     <xsl:otherwise> 
    2413                       <!-- we are using week format --> 
    2414                       <div class="durationBox"> 
    2415                         <input type="radio" name="eventDuration.type" value="daytime" onclick="swapDurationType('daytime')"/> 
    2416                         <xsl:variable name="daysStr" select="form/end/duration/days/input/@value"/> 
    2417                         <input type="text" name="eventDuration.daysStr" size="2" value="{$daysStr}" id="durationDays" disabled="disabled"/>days 
    2418                         <span id="durationHrMin" class="{$durationHrMinClass}"> 
    2419                           <xsl:variable name="hoursStr" select="form/end/duration/hours/input/@value"/> 
    2420                           <input type="text" name="eventDuration.hoursStr" size="2" value="{$hoursStr}" id="durationHours" disabled="disabled"/>hours 
    2421                           <xsl:variable name="minutesStr" select="form/end/duration/minutes/input/@value"/> 
    2422                           <input type="text" name="eventDuration.minutesStr" size="2" value="{$minutesStr}" id="durationMinutes" disabled="disabled"/>minutes 
    2423                         </span> 
    2424                       </div> 
    2425                       <span class="durationSpacerText">or</span> 
    2426                       <div class="durationBox"> 
    2427                         <input type="radio" name="eventDuration.type" value="weeks" onclick="swapDurationType('week')" checked="checked"/> 
    2428                         <xsl:variable name="weeksStr" select="form/end/duration/weeks/input/@value"/> 
    2429                         <input type="text" name="eventDuration.weeksStr" size="2" value="{$weeksStr}" id="durationWeeks"/>weeks 
    2430                       </div> 
    2431                     </xsl:otherwise> 
    2432                   </xsl:choose> 
    2433                 </div> 
    2434               </div><br/> 
    2435               <div class="dateFields" id="noDuration"> 
    2436                 <xsl:choose> 
    2437                   <xsl:when test="form/end/type='N'"> 
    2438                     <input type="radio" name="eventEndType" value="N" checked="checked" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    2439                   </xsl:when> 
    2440                   <xsl:otherwise> 
    2441                     <input type="radio" name="eventEndType" value="N" onclick="changeClass('endDateTime','invisible');changeClass('endDuration','invisible');"/> 
    2442                   </xsl:otherwise> 
    2443                 </xsl:choose> 
    2444                 This 
    2445                 <xsl:choose> 
    2446                   <xsl:when test="form/entityType = '2'">task</xsl:when> 
    2447                   <xsl:otherwise>event</xsl:otherwise> 
    2448                 </xsl:choose> 
    2449                 has no duration / end date 
    2450               </div> 
    2451             </div> 
    2452           </td> 
    2453         </tr> 
    2454  
    2455         <!--  Percent Complete (only for Tasks)  --> 
    2456         <xsl:if test="form/entityType = '2'"> 
    2457           <tr> 
    2458             <td class="fieldname"> 
    2459               % Complete: 
    2460             </td> 
    2461             <td class="fieldval" align="left"> 
    2462               <input type="text" name="event.percentComplete" size="3" maxlength="3"> 
    2463                 <xsl:attribute name="value"><xsl:value-of select="form/percentComplete"/></xsl:attribute> 
    2464               </input>% 
    2465             </td> 
    2466           </tr> 
    2467         </xsl:if> 
    2468  
    2469         <!--  Transparency  --> 
    2470         <tr> 
    2471           <td class="fieldname padMeTop"> 
    2472             Effects free/busy: 
    2473           </td> 
    2474           <td align="left" class="padMeTop"> 
    2475             <input type="radio" value="OPAQUE" name="transparency"> 
    2476               <xsl:if test="form/transparency = 'OPAQUE'"> 
    2477                 <xsl:attribute name="checked">checked</xsl:attribute> 
    2478               </xsl:if> 
    2479             </input> 
    2480             yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    2481  
    2482             <input type="radio" value="TRANSPARENT" name="transparency"> 
    2483               <xsl:if test="form/transparency = 'TRANSPARENT'"> 
    2484                 <xsl:attribute name="checked">checked</xsl:attribute> 
    2485               </xsl:if> 
    2486             </input> 
    2487             no <span class="note">(transparent: event status does not affect your free/busy)</span><br/> 
    2488           </td> 
    2489         </tr> 
    2490  
    2491         <!--  Category  --> 
    2492         <tr> 
    2493           <td class="fieldname"> 
    2494             Categories: 
    2495           </td> 
    2496           <td class="fieldval" align="left"> 
    2497             <xsl:variable name="catCount" select="count(form/categories/all/category)"/> 
    2498             <xsl:choose> 
    2499               <xsl:when test="not(form/categories/all/category)"> 
    2500                 no categories defined 
    2501                 <span class="note">(<a href="{$category-initAdd}">add category</a>)</span> 
    2502               </xsl:when> 
    2503               <xsl:otherwise> 
    2504                 <table cellpadding="0" id="allCategoryCheckboxes"> 
    2505                   <tr> 
    2506                     <td> 
    2507                       <xsl:for-each select="form/categories/all/category[position() &lt;= ceiling($catCount div 2)]"> 
    2508                         <input type="checkbox" name="categoryKey"> 
    2509                           <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 
    2510                           <xsl:if test="keyword = form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2511                           <xsl:value-of select="keyword"/> 
    2512                         </input><br/> 
    2513                       </xsl:for-each> 
    2514                     </td> 
    2515                     <td> 
    2516                       <xsl:for-each select="form/categories/all/category[position() &gt; ceiling($catCount div 2)]"> 
    2517                         <input type="checkbox" name="categoryKey"> 
    2518                           <xsl:attribute name="value"><xsl:value-of select="keyword"/></xsl:attribute> 
    2519                           <xsl:if test="keyword = form/categories/current//category/keyword"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2520                           <xsl:value-of select="keyword"/> 
    2521                         </input><br/> 
    2522                       </xsl:for-each> 
    2523                     </td> 
    2524                   </tr> 
    2525                 </table> 
    2526               </xsl:otherwise> 
    2527             </xsl:choose> 
    2528           </td> 
    2529         </tr> 
    2530       </table> 
    2531     </div> 
    2532  
    2533  
    2534     <!-- Details tab --> 
    2535     <!-- ============== --> 
    2536     <div id="bwEventTab-Details" class="invisible"> 
    2537       <table cellspacing="0" class="common dottedBorder"> 
    2538         <!--  Location  --> 
    2539         <tr> 
    2540           <td class="fieldname">Location:</td> 
    2541           <td class="fieldval" align="left"> 
    2542             <span class="std-text">choose: </span> 
    2543             <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               --> 
    2560               <select name="locationUid"> 
    2561                 <option value="">select...</option> 
    2562                 <xsl:copy-of select="form/location/locationmenu/select/*"/> 
    2563               </select> 
    2564             </span> 
    2565             <span class="std-text"> or add new: </span> 
    2566             <input type="text" name="locationAddress.value" value="" /> 
    2567           </td> 
    2568         </tr> 
    2569         <!--  Link (url associated with event)  --> 
    2570         <tr> 
    2571           <td class="fieldname">Event Link:</td> 
    2572           <td class="fieldval"> 
    2573             <xsl:variable name="link" select="form/link/input/@value"/> 
    2574             <input type="text" name="event.link" size="80" value="{$link}"/> 
    2575           </td> 
    2576         </tr> 
    2577         <!--  Description  --> 
    2578         <tr> 
    2579           <td class="fieldname">Description:</td> 
    2580           <td class="fieldval"> 
    2581             <xsl:choose> 
    2582               <xsl:when test="normalize-space(form/desc/textarea) = ''"> 
    2583                 <textarea name="description" cols="60" rows="4"> 
    2584                   <xsl:text> </xsl:text> 
    2585                 </textarea> 
    2586                 <!-- keep this space to avoid browser 
    2587                 rendering errors when the text area is empty --> 
    2588               </xsl:when> 
    2589               <xsl:otherwise> 
    2590                 <textarea name="description" cols="60" rows="4"> 
    2591                   <xsl:value-of select="form/desc/textarea"/> 
    2592                 </textarea> 
    2593               </xsl:otherwise> 
    2594             </xsl:choose> 
    2595           </td> 
    2596         </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>--> 
    2629         <!--  Status  --> 
    2630         <tr> 
    2631           <td class="fieldname"> 
    2632             Status: 
    2633           </td> 
    2634           <td class="fieldval"> 
    2635             <input type="radio" name="eventStatus" value="CONFIRMED"> 
    2636               <xsl:if test="form/status = 'CONFIRMED' or /bedework/creating = 'true' or form/status = ''"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2637             </input> 
    2638             confirmed 
    2639             <input type="radio" name="eventStatus" value="TENTATIVE"> 
    2640               <xsl:if test="form/status = 'TENTATIVE'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2641             </input> 
    2642             tentative 
    2643             <input type="radio" name="eventStatus" value="CANCELLED"> 
    2644               <xsl:if test="form/status = 'CANCELLED'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2645             </input> 
    2646             cancelled 
    2647           </td> 
    2648         </tr> 
    2649         <!--  Transparency  --> 
    2650         <xsl:if test="entityType != '2'"><!-- no transparency for Tasks --> 
    2651           <tr> 
    2652             <td class="fieldname"> 
    2653               Effects free/busy: 
    2654             </td> 
    2655             <td class="fieldval"> 
    2656               <xsl:choose> 
    2657                 <xsl:when test="form/transparency = 'TRANSPARENT'"> 
    2658                   <input type="radio" name="event.transparency" value="OPAQUE"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    2659                   <input type="radio" name="event.transparency" value="TRANSPARENT" checked="checked"/>no <span class="note">(transparent: event status does not affect your free/busy)</span> 
    2660                 </xsl:when> 
    2661                 <xsl:otherwise> 
    2662                   <input type="radio" name="event.transparency" value="OPAQUE" checked="checked"/>yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    2663                   <input type="radio" name="event.transparency" value="TRANSPARENT"/>no <span class="note">(transparent: event status does not affect your free/busy)</span> 
    2664                 </xsl:otherwise> 
    2665               </xsl:choose> 
    2666             </td> 
    2667           </tr> 
    2668         </xsl:if> 
    2669       </table> 
    2670     </div> 
    2671  
    2672  
    2673     <!-- Recurrence tab --> 
    2674     <!-- ============== --> 
    2675     <div id="bwEventTab-Recurrence" class="invisible"> 
    2676       <xsl:choose> 
    2677         <xsl:when test="recurrenceId != ''"> 
    2678           <!-- recurrence instances can not themselves recur, 
    2679                so provide access to master event --> 
    2680           <em>This event is a recurrence instance.</em><br/> 
    2681           <a href="{$editEvent}&amp;subid={$subscriptionId}&amp;calPath={$calPath}&amp;guid={$guid}" title="edit master (recurring event)">edit master event</a> 
    2682         </xsl:when> 
    2683         <xsl:otherwise> 
    2684           <!-- has recurrenceId, so is master --> 
    2685  
    2686           <div id="recurringSwitch"> 
    2687             <!-- set or remove "recurring" and show or hide all recurrence fields: --> 
    2688             <input type="radio" name="recurring" value="true" onclick="swapRecurrence(this)"> 
    2689               <xsl:if test="form/recurringEntity = 'true'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2690             </input> event recurs 
    2691             <input type="radio" name="recurring" value="false" onclick="swapRecurrence(this)"> 
    2692               <xsl:if test="form/recurringEntity = 'false'"><xsl:attribute name="checked">checked</xsl:attribute></xsl:if> 
    2693             </input> event does not recur 
    2694           </div> 
    2695  
    2696           <!-- wrapper for all recurrence fields (rrules and rdates): --> 
    2697           <div id="recurrenceFields" class="invisible"> 
    2698             <xsl:if test="form/recurringEntity = 'true'"><xsl:attribute name="class">visible</xsl:attribute></xsl:if> 
    2699  
    2700             <h4>Recurrence Rules</h4> 
    2701             <!-- show or hide rrules fields when editing: --> 
    2702             <xsl:if test="form/recurrence"> 
    2703               <input type="checkbox" name="rrulesFlag" onclick="swapRrules(this)" value="on"/> 
    2704               <span id="rrulesSwitch"> 
    2705                 change recurrence rules 
    2706               </span> 
    2707             </xsl:if> 
    2708             <span id="rrulesUiSwitch"> 
    2709               <xsl:if test="form/recurrence"> 
    2710                 <xsl:attribute name="class">invisible</xsl:attribute> 
    2711               </xsl:if> 
    2712               <input type="checkbox" name="rrulesUiSwitch" value="advanced" onchange="swapVisible(this,'advancedRrules')"/> 
    2713               show advanced recurrence rules 
    2714             </span> 
    2715  
    2716             <xsl:if test="form/recurrence"> 
    2717               <!-- Output descriptive recurrence rules information.  Probably not 
    2718                    complete yet. Replace all strings so can be 
    2719                    more easily internationalized. --> 
    2720               <div id="recurrenceInfo"> 
    2721                 Every 
    2722                 <xsl:choose> 
    2723                   <xsl:when test="form/recurrence/interval &gt; 1"> 
    2724                     <xsl:value-of select="form/recurrence/interval"/> 
    2725                   </xsl:when> 
    2726                 </xsl:choose> 
    2727                 <xsl:text> </xsl:text> 
    2728                 <xsl:choose> 
    2729                   <xsl:when test="form/recurrence/freq = 'HOURLY'">hour</xsl:when> 
    2730                   <xsl:when test="form/recurrence/freq = 'DAILY'">day</xsl:when> 
    2731                   <xsl:when test="form/recurrence/freq = 'WEEKLY'">week</xsl:when> 
    2732                   <xsl:when test="form/recurrence/freq = 'MONTHLY'">month</xsl:when> 
    2733                   <xsl:when test="form/recurrence/freq = 'YEARLY'">year</xsl:when> 
    2734                 </xsl:choose><xsl:if test="form/recurrence/interval &gt; 1">s</xsl:if> 
    2735                 <xsl:text> </xsl:text> 
    2736  
    2737                 <xsl:if test="form/recurrence/byday"> 
    2738                   <xsl:for-each select="form/recurrence/byday/pos"> 
    2739                     <xsl:if test="position() != 1"> and </xsl:if> 
    2740                     on 
    2741                     <xsl:choose> 
    2742                       <xsl:when test="@val='1'"> 
    2743                         the first 
    2744                       </xsl:when> 
    2745                       <xsl:when test="@val='2'"> 
    2746                         the second 
    2747                       </xsl:when> 
    2748                       <xsl:when test="@val='3'"> 
    2749                         the third 
    2750                       </xsl:when> 
    2751                       <xsl:when test="@val='4'"> 
    2752                         the fourth 
    2753                       </xsl:when> 
    2754                       <xsl:when test="@val='5'"> 
    2755                         the fifth 
    2756                       </xsl:when> 
    2757                       <xsl:when test="@val='-1'"> 
    2758                         the last 
    2759                       </xsl:when> 
    2760                       <!-- don't output "every" --> 
    2761                       <!--<xsl:otherwise> 
    2762                         every 
    2763                       </xsl:otherwise>--> 
    2764                     </xsl:choose> 
    2765                     <xsl:for-each select="day"> 
    2766                       <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
    2767                       <xsl:variable name="dayVal" select="."/> 
    2768                       <xsl:variable name="dayPos"> 
    2769                         <xsl:for-each select="/bedework/recurdayvals/val"> 
    2770                           <xsl:if test="node() = $dayVal"><xsl:value-of select="position()"/></xsl:if> 
    2771                         </xsl:for-each> 
    2772                       </xsl:variable> 
    2773                       <xsl:value-of select="/bedework/shortdaynames/val[position() = $dayPos]"/> 
    2774                       <xsl:if test="position() != last()">, </xsl:if> 
    2775                     </xsl:for-each> 
    2776                   </xsl:for-each> 
    2777                 </xsl:if> 
    2778  
    2779                 <xsl:if test="form/recurrence/bymonth"> 
    2780                   in 
    2781                   <xsl:for-each select="form/recurrence/bymonth/val"> 
    2782                     <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
    2783                     <xsl:variable name="monthNum" select="number(.)"/> 
    2784                     <xsl:value-of select="/bedework/monthlabels/val[position() = $monthNum]"/> 
    2785                     <xsl:if test="position() != last()">, </xsl:if> 
    2786                   </xsl:for-each> 
    2787                 </xsl:if> 
    2788  
    2789                 <xsl:if test="form/recurrence/bymonthday"> 
    2790                   on the 
    2791                   <xsl:apply-templates select="form/recurrence/bymonthday/val" mode="weekMonthYearNumbers"/> 
    2792                   day<xsl:if test="form/recurrence/bymonthday/val[position()=2]">s</xsl:if> of the month 
    2793                 </xsl:if> 
    2794  
    2795                 <xsl:if test="form/recurrence/byyearday"> 
    2796                   on the 
    2797                   <xsl:apply-templates select="form/recurrence/byyearday/val" mode="weekMonthYearNumbers"/> 
    2798                   day<xsl:if test="form/recurrence/byyearday/val[position()=2]">s</xsl:if> of the year 
    2799                 </xsl:if> 
    2800  
    2801                 <xsl:if test="form/recurrence/byweekno"> 
    2802                   in the 
    2803                   <xsl:apply-templates select="form/recurrence/byweekno/val" mode="weekMonthYearNumbers"/> 
    2804                   week<xsl:if test="form/recurrence/byweekno/val[position()=2]">s</xsl:if> of the year 
    2805                 </xsl:if> 
    2806  
    2807                 repeating 
    2808                 <xsl:choose> 
    2809                   <xsl:when test="form/recurrence/count = '-1'">forever</xsl:when> 
    2810                   <xsl:when test="form/recurrence/until"> 
    2811                     until <xsl:value-of select="substring(form/recurrence/until,1,4)"/>-<xsl:value-of select="substring(form/recurrence/until,5,2)"/>-<xsl:value-of select="substring(form/recurrence/until,7,2)"/> 
    2812                   </xsl:when> 
    2813                   <xsl:otherwise> 
    2814                     <xsl:value-of select="form/recurrence/count"/> 
    2815                     time<xsl:if test="form/recurrence/count &gt; 1">s</xsl:if> 
    2816                   </xsl:otherwise> 
    2817                 </xsl:choose> 
    2818               </div> 
    2819             </xsl:if> 
    2820  
    2821             <!-- set these dynamically when form is submitted --> 
    2822             <input type="hidden" name="interval" value=""/> 
    2823             <input type="hidden" name="count" value=""/> 
    2824             <input type="hidden" name="until" value=""/> 
    2825             <input type="hidden" name="byday" value=""/> 
    2826             <input type="hidden" name="bymonthday" value=""/> 
    2827             <input type="hidden" name="bymonth" value=""/> 
    2828             <input type="hidden" name="byweekno" value=""/> 
    2829             <input type="hidden" name="byyearday" value=""/> 
    2830             <input type="hidden" name="wkst" value=""/> 
    2831             <input type="hidden" name="setpos" value=""/> 
    2832  
    2833             <!-- wrapper for rrules: --> 
    2834             <table id="rrulesTable" cellspacing="0"> 
    2835               <xsl:if test="form/recurrence"> 
    2836                 <xsl:attribute name="class">invisible</xsl:attribute> 
    2837               </xsl:if> 
    2838               <tr> 
    2839                 <td id="recurrenceFrequency" rowspan="2"> 
    2840                   <em>Frequency:</em><br/> 
    2841                   <input type="radio" name="freq" value="NONE" onclick="showRrules(this.value)" checked="checked"/>none<br/> 
    2842                   <!--<input type="radio" name="freq" value="HOURLY" onclick="showRrules(this.value)"/>hourly<br/>--> 
    2843                   <input type="radio" name="freq" value="DAILY" onclick="showRrules(this.value)"/>daily<br/> 
    2844                   <input type="radio" name="freq" value="WEEKLY" onclick="showRrules(this.value)"/>weekly<br/> 
    2845                   <input type="radio" name="freq" value="MONTHLY" onclick="showRrules(this.value)"/>monthly<br/> 
    2846                   <input type="radio" name="freq" value="YEARLY" onclick="showRrules(this.value)"/>yearly 
    2847                 </td> 
    2848                 <!-- recurrence count, until, forever --> 
    2849                 <td id="recurrenceUntil"> 
    2850                   <div id="noneRecurrenceRules"> 
    2851                     no recurrence rules 
    2852                   </div> 
    2853                   <div id="recurrenceUntilRules" class="invisible"> 
    2854                     <em>Repeat:</em> 
    2855                     <p> 
    2856                       <input type="radio" name="recurCountUntil" value="forever"> 
    2857                         <xsl:if test="not(form/recurring) or form/recurring/count = '-1'"> 
    2858                           <xsl:attribute name="checked">checked</xsl:attribute> 
    2859                         </xsl:if> 
    2860                       </input> 
    2861                       forever 
    2862                       <input type="radio" name="recurCountUntil" value="count" id="recurCount"> 
    2863                         <xsl:if test="form/recurring/count != '-1'"> 
    2864                           <xsl:attribute name="checked">checked</xsl:attribute> 
    2865                         </xsl:if> 
    2866                       </input> 
    2867                       <input type="text" value="1" size="2" name="countHolder"  onfocus="selectRecurCountUntil('recurCount')"> 
    2868                         <xsl:if test="form/recurring/count and form/recurring/count != '-1'"> 
    2869                           <xsl:attribute name="value"><xsl:value-of select="form/recurring/count"/></xsl:attribute> 
    2870                         </xsl:if> 
    2871                       </input> 
    2872                       time(s) 
    2873                       <input type="radio" name="recurCountUntil" value="until" id="recurUntil"> 
    2874                         <xsl:if test="form/recurring/until"> 
    2875                           <xsl:attribute name="checked">checked</xsl:attribute> 
    2876                         </xsl:if> 
    2877                       </input> 
    2878                       until 
    2879                       <span id="untilHolder"> 
    2880                         <span dojoType="dropdowndatepicker" formatLength="medium" value="today" saveFormat="yyyyMMdd" id="bwEventWidgetUntilDate" iconURL="{$resourcesRoot}/resources/calIcon.gif"> 
    2881                           <xsl:attribute name="value"><xsl:value-of select="form/start/rfc3339DateTime"/></xsl:attribute> 
    2882                           <xsl:text> </xsl:text> 
    2883                         </span> 
    2884                       </span> 
    2885                     </p> 
    2886                   </div> 
    2887                 </td> 
    2888               </tr> 
    2889               <tr> 
    2890                 <td id="advancedRrules" class="invisible"> 
    2891                   <!-- hourly --> 
    2892                   <div id="hourlyRecurrenceRules" class="invisible"> 
    2893                     <p> 
    2894                       <em>Interval:</em> 
    2895                       every 
    2896                       <input type="text" name="hourlyInterval" size="2" value="1"> 
    2897                         <xsl:if test="form/recurrence/interval"> 
    2898                           <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    2899                         </xsl:if> 
    2900                       </input> 
    2901                       hour(s) 
    2902                     </p> 
    2903                   </div> 
    2904                   <!-- daily --> 
    2905                   <div id="dailyRecurrenceRules" class="invisible"> 
    2906                     <p> 
    2907                       <em>Interval:</em> 
    2908                       every 
    2909                       <input type="text" name="dailyInterval" size="2" value="1"> 
    2910                         <xsl:if test="form/recurrence/interval"> 
    2911                           <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    2912                         </xsl:if> 
    2913                       </input> 
    2914                       day(s) 
    2915                     </p> 
    2916                     <p> 
    2917                       <input type="checkbox" name="swapDayMonthCheckBoxList" value="" onclick="swapVisible(this,'dayMonthCheckBoxList')"/> 
    2918                       in these months: 
    2919                       <div id="dayMonthCheckBoxList" class="invisible"> 
    2920                         <xsl:for-each select="/bedework/monthlabels/val"> 
    2921                           <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
    2922                           <span class="chkBoxListItem"> 
    2923                             <input type="checkbox" name="dayMonths"> 
    2924                               <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
    2925                             </input> 
    2926                             <xsl:value-of select="."/> 
    2927                           </span> 
    2928                           <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
    2929                         </xsl:for-each> 
    2930                       </div> 
    2931                     </p> 
    2932                     <!--<p> 
    2933                       <input type="checkbox" name="swapDaySetPos" value="" onclick="swapVisible(this,'daySetPos')"/> 
    2934                       limit to: 
    2935                       <div id="daySetPos" class="invisible"> 
    2936                       </div> 
    2937                     </p>--> 
    2938                   </div> 
    2939                   <!-- weekly --> 
    2940                   <div id="weeklyRecurrenceRules" class="invisible"> 
    2941                     <p> 
    2942                       <em>Interval:</em> 
    2943                       every 
    2944                       <input type="text" name="weeklyInterval" size="2" value="1"> 
    2945                         <xsl:if test="form/recurrence/interval"> 
    2946                           <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    2947                         </xsl:if> 
    2948                       </input> 
    2949                       week(s) on: 
    2950                     </p> 
    2951                     <p> 
    2952                       <div id="weekRecurFields"> 
    2953                         <xsl:call-template name="byDayChkBoxList"> 
    2954                           <xsl:with-param name="name">byDayWeek</xsl:with-param> 
    2955                         </xsl:call-template> 
    2956                       </div> 
    2957                     </p> 
    2958                     <p class="weekRecurLinks"> 
    2959                       <a href="javascript:recurSelectWeekdays('weekRecurFields')">select weekdays</a> | 
    2960                       <a href="javascript:recurSelectWeekends('weekRecurFields')">select weekends</a> 
    2961                     </p> 
    2962                     <p> 
    2963                       Week start: 
    2964                       <select name="weekWkst"> 
    2965                         <xsl:for-each select="/bedework/shortdaynames/val"> 
    2966                           <xsl:variable name="pos" select="position()"/> 
    2967                           <option> 
    2968                             <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
    2969                             <xsl:value-of select="."/> 
    2970                           </option> 
    2971                         </xsl:for-each> 
    2972                       </select> 
    2973                     </p> 
    2974                   </div> 
    2975                   <!-- monthly --> 
    2976                   <div id="monthlyRecurrenceRules" class="invisible"> 
    2977                     <p> 
    2978                       <em>Interval:</em> 
    2979                       every 
    2980                       <input type="text" name="monthlyInterval" size="2" value="1"> 
    2981                         <xsl:if test="form/recurrence/interval"> 
    2982                           <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    2983                         </xsl:if> 
    2984                       </input> 
    2985                       month(s) 
    2986                     </p> 
    2987                     <div id="monthRecurFields"> 
    2988                       <div id="monthRecurFields1"> 
    2989                         on 
    2990                         <select name="bymonthposPos1" width="7em" onchange="changeClass('monthRecurFields2','shown')"> 
    2991                           <xsl:call-template name="recurrenceDayPosOptions"/> 
    2992                         </select> 
    2993                         <xsl:call-template name="byDayChkBoxList"/> 
    2994                       </div> 
    2995                       <xsl:call-template name="buildRecurFields"> 
    2996                         <xsl:with-param name="current">2</xsl:with-param> 
    2997                         <xsl:with-param name="total">10</xsl:with-param> 
    2998                         <xsl:with-param name="name">month</xsl:with-param> 
    2999                       </xsl:call-template> 
    3000                     </div> 
    3001                     <p> 
    3002                       <input type="checkbox" name="swapMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'monthDaysCheckBoxList')"/> 
    3003                       on these days:<br/> 
    3004                       <div id="monthDaysCheckBoxList" class="invisible"> 
    3005                         <xsl:call-template name="buildCheckboxList"> 
    3006                           <xsl:with-param name="current">1</xsl:with-param> 
    3007                           <xsl:with-param name="end">31</xsl:with-param> 
    3008                           <xsl:with-param name="name">monthDayBoxes</xsl:with-param> 
    3009                         </xsl:call-template> 
    3010                       </div> 
    3011                     </p> 
    3012                   </div> 
    3013                   <!-- yearly --> 
    3014                   <div id="yearlyRecurrenceRules" class="invisible"> 
    3015                     <p> 
    3016                       <em>Interval:</em> 
    3017                       every 
    3018                       <input type="text" name="yearlyInterval" size="2" value="1"> 
    3019                         <xsl:if test="form/recurrence/interval"> 
    3020                           <xsl:attribute name="value"><xsl:value-of select="form/recurrence/interval"/></xsl:attribute> 
    3021                         </xsl:if> 
    3022                       </input> 
    3023                       years(s) 
    3024                     </p> 
    3025                     <div id="yearRecurFields"> 
    3026                       <div id="yearRecurFields1"> 
    3027                         on 
    3028                         <select name="byyearposPos1" width="7em" onchange="changeClass('yearRecurFields2','shown')"> 
    3029                           <xsl:call-template name="recurrenceDayPosOptions"/> 
    3030                         </select> 
    3031                         <xsl:call-template name="byDayChkBoxList"/> 
    3032                       </div> 
    3033                       <xsl:call-template name="buildRecurFields"> 
    3034                         <xsl:with-param name="current">2</xsl:with-param> 
    3035                         <xsl:with-param name="total">10</xsl:with-param> 
    3036                         <xsl:with-param name="name">year</xsl:with-param> 
    3037                       </xsl:call-template> 
    3038                     </div> 
    3039                     <p> 
    3040                       <input type="checkbox" name="swapYearMonthCheckBoxList" value="" onclick="swapVisible(this,'yearMonthCheckBoxList')"/> 
    3041                       in these months: 
    3042                       <div id="yearMonthCheckBoxList" class="invisible"> 
    3043                         <xsl:for-each select="/bedework/monthlabels/val"> 
    3044                           <xsl:variable name="pos"><xsl:value-of select="position()"/></xsl:variable> 
    3045                           <span class="chkBoxListItem"> 
    3046                             <input type="checkbox" name="yearMonths"> 
    3047                               <xsl:attribute name="value"><xsl:value-of select="/bedework/monthvalues/val[position() = $pos]"/></xsl:attribute> 
    3048                             </input> 
    3049                             <xsl:value-of select="."/> 
    3050                           </span> 
    3051                           <xsl:if test="$pos mod 6 = 0"><br/></xsl:if> 
    3052                         </xsl:for-each> 
    3053                       </div> 
    3054                     </p> 
    3055                     <p> 
    3056                       <input type="checkbox" name="swapYearMonthDaysCheckBoxList" value="" onclick="swapVisible(this,'yearMonthDaysCheckBoxList')"/> 
    3057                       on these days of the month:<br/> 
    3058                       <div id="yearMonthDaysCheckBoxList" class="invisible"> 
    3059                         <xsl:call-template name="buildCheckboxList"> 
    3060                           <xsl:with-param name="current">1</xsl:with-param> 
    3061                           <xsl:with-param name="end">31</xsl:with-param> 
    3062                           <xsl:with-param name="name">yearMonthDayBoxes</xsl:with-param> 
    3063                         </xsl:call-template> 
    3064                       </div> 
    3065                     </p> 
    3066                     <p> 
    3067                       <input type="checkbox" name="swapYearWeeksCheckBoxList" value="" onclick="swapVisible(this,'yearWeeksCheckBoxList')"/> 
    3068                       in these weeks of the year:<br/> 
    3069                       <div id="yearWeeksCheckBoxList" class="invisible"> 
    3070                         <xsl:call-template name="buildCheckboxList"> 
    3071                           <xsl:with-param name="current">1</xsl:with-param> 
    3072                           <xsl:with-param name="end">53</xsl:with-param> 
    3073                           <xsl:with-param name="name">yearWeekBoxes</xsl:with-param> 
    3074                         </xsl:call-template> 
    3075                       </div> 
    3076                     </p> 
    3077                     <p> 
    3078                       <input type="checkbox" name="swapYearDaysCheckBoxList" value="" onclick="swapVisible(this,'yearDaysCheckBoxList')"/> 
    3079                       on these days of the year:<br/> 
    3080                       <div id="yearDaysCheckBoxList" class="invisible"> 
    3081                         <xsl:call-template name="buildCheckboxList"> 
    3082                           <xsl:with-param name="current">1</xsl:with-param> 
    3083                           <xsl:with-param name="end">366</xsl:with-param> 
    3084                           <xsl:with-param name="name">yearDayBoxes</xsl:with-param> 
    3085                         </xsl:call-template> 
    3086                       </div> 
    3087                     </p> 
    3088                     <p> 
    3089                       Week start: 
    3090                       <select name="yearWkst"> 
    3091                         <xsl:for-each select="/bedework/shortdaynames/val"> 
    3092                           <xsl:variable name="pos" select="position()"/> 
    3093                           <option> 
    3094                             <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
    3095                             <xsl:value-of select="."/> 
    3096                           </option> 
    3097                         </xsl:for-each> 
    3098                       </select> 
    3099                     </p> 
    3100                   </div> 
    3101                 </td> 
    3102               </tr> 
    3103             </table> 
    3104  
    3105             <h4> 
    3106               Recurrence and Exception Dates 
    3107             </h4> 
    3108             <div id="raContent"> 
    3109               <div class="dateStartEndBox" id="rdatesFormFields"> 
    3110                 <!-- dateonly event: this is temporary - should be determined by the main event --> 
    3111                 <input type="checkbox" name="dateOnly" id="rdateDateOnly" onclick="swapRdateAllDay(this)" value="true"/> 
    3112                 all day 
    3113                 <!-- floating event: no timezone (and not UTC) --> 
    3114                 <input type="checkbox" name="floating" id="rdateFloating" onclick="swapRdateFloatingTime(this)" value="true"/> 
    3115                 floating 
    3116                 <!-- store time as coordinated universal time (UTC) --> 
    3117                 <input type="checkbox" name="storeUTC" id="rdateStoreUTC" onclick="swapRdateStoreUTC(this)" value="true"/> 
    3118                 store as UTC<br/> 
    3119                 <div class="dateFields"> 
    3120                   <input name="eventRdate.date" 
    3121                          dojoType="dropdowndatepicker" 
    3122                          formatLength="medium" 
    3123                          value="today" 
    3124                          saveFormat="yyyyMMdd" 
    3125                          id="bwEventWidgeRdate" 
    3126                          iconURL="{$resourcesRoot}/resources/calIcon.gif"/> 
    3127                 </div> 
    3128                 <div id="rdateTimeFields" class="timeFields"> 
    3129                  <select name="eventRdate.hour"> 
    3130                     <option value="00">00</option> 
    3131                     <option value="01">01</option> 
    3132                     <option value="02">02</option> 
    3133                     <option value="03">03</option> 
    3134                     <option value="04">04</option> 
    3135                     <option value="05">05</option> 
    3136                     <option value="06">06</option> 
    3137                     <option value="07">07</option> 
    3138                     <option value="08">08</option> 
    3139                     <option value="09">09</option> 
    3140                     <option value="10">10</option> 
    3141                     <option value="11">11</option> 
    3142                     <option value="12" selected="selected">12</option> 
    3143                     <option value="13">13</option> 
    3144                     <option value="14">14</option> 
    3145                     <option value="15">15</option> 
    3146                     <option value="16">16</option> 
    3147                     <option value="17">17</option> 
    3148                     <option value="18">18</option> 
    3149                     <option value="19">19</option> 
    3150                     <option value="20">20</option> 
    3151                     <option value="21">21</option> 
    3152                     <option value="22">22</option> 
    3153                     <option value="23">23</option> 
    3154                   </select> 
    3155                   <select name="eventRdate.minute"> 
    3156                     <option value="00" selected="selected">00</option> 
    3157                     <option value="05">05</option> 
    3158                     <option value="10">10</option> 
    3159                     <option value="15">15</option> 
    3160                     <option value="20">20</option> 
    3161                     <option value="25">25</option> 
    3162                     <option value="30">30</option> 
    3163                     <option value="35">35</option> 
    3164                     <option value="40">40</option> 
    3165                     <option value="45">45</option> 
    3166                     <option value="50">50</option> 
    3167                     <option value="55">55</option> 
    3168                   </select> 
    3169                  <xsl:text> </xsl:text> 
    3170  
    3171                   <select name="tzid" id="rdateTzid" class="timezones"> 
    3172                     <xsl:if test="form/floating/input/@checked='checked'"><xsl:attribute name="disabled">disabled</xsl:attribute></xsl:if> 
    3173                     <option value="">select timezone...</option> 
    3174                     <xsl:variable name="rdateTzId" select="/bedework/now/defaultTzid"/> 
    3175                     <xsl:for-each select="/bedework/timezones/timezone"> 
    3176                       <option> 
    3177                         <xsl:attribute name="value"><xsl:value-of select="id"/></xsl:attribute> 
    3178                         <xsl:if test="$rdateTzId = id"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    3179                         <xsl:value-of select="name"/> 
    3180                       </option> 
    3181                     </xsl:for-each> 
    3182                   </select> 
    3183                 </div> 
    3184                 <xsl:text> </xsl:text> 
    3185                 <!--bwRdates.update() accepts: date, time, allDay, floating, utc, tzid--> 
    3186                 <input type="button" name="rdate" value="add recurrence" onclick="bwRdates.update(this.form['eventRdate.date'].value,this.form['eventRdate.hour'].value + this.form['eventRdate.minute'].value,false,false,false,this.form.tzid.value)"/> 
    3187                 <input type="button" name="exdate" value="add exception" onclick="bwExdates.update(this.form['eventRdate.date'].value,this.form['eventRdate.hour'].value + this.form['eventRdate.minute'].value,false,false,false,this.form.tzid.value)"/> 
    3188  
    3189                 <input type="hidden" name="rdates" value="" id="bwRdatesField" /> 
    3190                 <!-- if there are no recurrence dates, the following table will show --> 
    3191                 <table cellspacing="0" class="invisible" id="bwCurrentRdatesNone"> 
    3192                   <tr><th>Recurrence Dates</th></tr> 
    3193                   <tr><td>No recurrence dates</td></tr> 
    3194                 </table> 
    3195  
    3196                 <!-- if there are recurrence dates, the following table will show --> 
    3197                 <table cellspacing="0" class="invisible" id="bwCurrentRdates"> 
    3198                   <tr> 
    3199                     <th colspan="4">Recurrence Dates</th> 
    3200                   </tr> 
    3201                   <tr class="colNames"> 
    3202                     <td>Date</td> 
    3203                     <td>Time</td> 
    3204                     <td>TZid</td> 
    3205                     <td></td> 
    3206                   </tr> 
    3207                 </table> 
    3208  
    3209                 <input type="hidden" name="exdates" value="" id="bwExdatesField" /> 
    3210                 <!-- if there are no exception dates, the following table will show --> 
    3211                 <table cellspacing="0" class="invisible" id="bwCurrentExdatesNone"> 
    3212                   <tr><th>Exception Dates</th></tr> 
    3213                   <tr><td>No exception dates</td></tr> 
    3214                 </table> 
    3215  
    3216                 <!-- if there are exception dates, the following table will show --> 
    3217                 <table cellspacing="0" class="invisible" id="bwCurrentExdates"> 
    3218                   <tr> 
    3219                     <th colspan="4">Exception Dates</th> 
    3220                   </tr> 
    3221                   <tr class="colNames"> 
    3222                     <td>Date</td> 
    3223                     <td>Time</td> 
    3224                     <td>TZid</td> 
    3225                     <td></td> 
    3226                   </tr> 
    3227                 </table> 
    3228                 <p> 
    3229                   Exception dates may also be created by deleting an instance 
    3230                   of a recurring event. 
    3231                 </p> 
    3232               </div> 
    3233             </div> 
    3234           </div> 
    3235         </xsl:otherwise> 
    3236       </xsl:choose> 
    3237     </div> 
    3238  
    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  
    3313     <div class="eventSubmitButtons"> 
    3314       <xsl:choose> 
    3315         <xsl:when test="form/scheduleMethod = '2'"> 
    3316           <input name="submit" type="submit" value="save"/> 
    3317           <input name="submitAndSend" type="submit" value="save &amp; send invitations"/> 
    3318         </xsl:when> 
    3319         <xsl:otherwise> 
    3320           <input name="submit" type="submit" value="save"/> 
    3321         </xsl:otherwise> 
    3322       </xsl:choose> 
    3323       <input name="cancelled" type="submit" value="cancel"/> 
    3324     </div> 
    3325   </xsl:template> 
    3326  
    3327   <xsl:template match="val" mode="weekMonthYearNumbers"> 
    3328     <xsl:if test="position() != 1 and position() = last()"> and </xsl:if> 
    3329     <xsl:value-of select="."/><xsl:choose> 
    3330       <xsl:when test="substring(., string-length(.)-1, 2) = '11' or 
    3331                       substring(., string-length(.)-1, 2) = '12' or 
    3332                       substring(., string-length(.)-1, 2) = '13'">th</xsl:when> 
    3333       <xsl:when test="substring(., string-length(.), 1) = '1'">st</xsl:when> 
    3334       <xsl:when test="substring(., string-length(.), 1) = '2'">nd</xsl:when> 
    3335       <xsl:when test="substring(., string-length(.), 1) = '3'">rd</xsl:when> 
    3336       <xsl:otherwise>th</xsl:otherwise> 
    3337     </xsl:choose> 
    3338     <xsl:if test="position() != last()">, </xsl:if> 
    3339   </xsl:template> 
    3340  
    3341   <xsl:template name="byDayChkBoxList"> 
    3342     <xsl:param name="name"/> 
    3343     <xsl:for-each select="/bedework/shortdaynames/val"> 
    3344       <xsl:variable name="pos" select="position()"/> 
    3345       <input type="checkbox"> 
    3346         <xsl:attribute name="value"><xsl:value-of select="/bedework/recurdayvals/val[position() = $pos]"/></xsl:attribute> 
    3347         <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute> 
    3348       </input> 
    3349       <xsl:value-of select="."/> 
    3350     </xsl:for-each> 
    3351   </xsl:template> 
    3352  
    3353   <xsl:template name="buildCheckboxList"> 
    3354     <xsl:param name="current"/> 
    3355     <xsl:param name="end"/> 
    3356     <xsl:param name="name"/> 
    3357     <xsl:param name="splitter">10</xsl:param> 
    3358     <span class="chkBoxListItem"> 
    3359       <input type="checkbox"> 
    3360         <xsl:attribute name="name"><xsl:value-of select="$name"/></xsl:attribute> 
    3361         <xsl:attribute name="value"><xsl:value-of select="$current"/></xsl:attribute> 
    3362       </input> 
    3363       <xsl:value-of select="$current"/> 
    3364     </span> 
    3365     <xsl:if test="$current mod $splitter = 0"><br/></xsl:if> 
    3366     <xsl:if test="$current = $end"><br/></xsl:if> 
    3367     <xsl:if test="$current &lt; $end"> 
    3368       <xsl:call-template name="buildCheckboxList"> 
    3369         <xsl:with-param name="current"><xsl:value-of select="$current + 1"/></xsl:with-param> 
    3370         <xsl:with-param name="end"><xsl:value-of select="$end"/></xsl:with-param> 
    3371         <xsl:with-param name="name"><xsl:value-of select="$name"/></xsl:with-param> 
    3372       </xsl:call-template> 
    3373     </xsl:if> 
    3374   </xsl:template> 
    3375  
    3376   <xsl:template name="recurrenceDayPosOptions"> 
    3377     <option value="0">none</option> 
    3378     <option value="1">the first</option> 
    3379     <option value="2">the second</option> 
    3380     <option value="3">the third</option> 
    3381     <option value="4">the fourth</option> 
    3382     <option value="5">the fifth</option> 
    3383     <option value="-1">the last</option> 
    3384     <option value="">every</option> 
    3385   </xsl:template> 
    3386  
    3387   <xsl:template name="buildRecurFields"> 
    3388     <xsl:param name="current"/> 
    3389     <xsl:param name="total"/> 
    3390     <xsl:param name="name"/> 
    3391     <div class="invisible"> 
    3392       <xsl:attribute name="id"><xsl:value-of select="$name"/>RecurFields<xsl:value-of select="$current"/></xsl:attribute> 
    3393       and 
    3394       <select width="12em"> 
    3395         <xsl:attribute name="name">by<xsl:value-of select="$name"/>posPos<xsl:value-of select="$current"/></xsl:attribute> 
    3396         <xsl:if test="$current != $total"> 
    3397           <xsl:attribute name="onchange">changeClass('<xsl:value-of select="$name"/>RecurFields<xsl:value-of select="$current+1"/>','shown')</xsl:attribute> 
    3398         </xsl:if> 
    3399         <xsl:call-template name="recurrenceDayPosOptions"/> 
    3400       </select> 
    3401       <xsl:call-template name="byDayChkBoxList"/> 
    3402     </div> 
    3403     <xsl:if test="$current &lt; $total"> 
    3404       <xsl:call-template name="buildRecurFields"> 
    3405         <xsl:with-param name="current"><xsl:value-of select="$current+1"/></xsl:with-param> 
    3406         <xsl:with-param name="total"><xsl:value-of select="$total"/></xsl:with-param> 
    3407         <xsl:with-param name="name"><xsl:value-of select="$name"/></xsl:with-param> 
    3408       </xsl:call-template> 
    3409     </xsl:if> 
    3410   </xsl:template> 
    3411  
    34121443  <xsl:template name="buildNumberOptions"> 
    34131444    <xsl:param name="current"/> 
     
    34971528  </xsl:template> 
    34981529 
    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  
    35551530  <xsl:template match="freebusy" mode="freeBusyGrid"> 
    35561531    <xsl:param name="aggregation">false</xsl:param> 
     
    37351710  </xsl:template> 
    37361711 
    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  
    37671712  <xsl:template match="event" mode="addEventRef"> 
    37681713  <!-- The name "eventForm" is referenced by several javascript functions. Do not 
     
    38741819      </xsl:apply-templates> 
    38751820    </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> 
    40791821  </xsl:template> 
    40801822 
     
    41681910  </xsl:template> 
    41691911 
    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> 
     1912 
    46311913 
    46321914  <xsl:template match="calendars" mode="exportCalendars"> 
     
    47652047  </xsl:template> 
    47662048 
    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="subscription.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  
    51682049  <xsl:template match="subscription" mode="mySubscriptions"> 
    51692050    <li> 
     
    53922273      </table> 
    53932274    </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> 
    58182275  </xsl:template> 
    58192276 
     
    65402997  </xsl:template> 
    65412998 
    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  
    66072999  <!--==== PREFERENCES ====--> 
    66083000  <xsl:template match="prefs"> 
     
    71193511    <input type="reset" value="Reset"/> 
    71203512    <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> 
    74163513  </xsl:template> 
    74173514 
     
    75523649  </xsl:template> 
    75533650 
    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  
    77253651  <!--==== SIDE CALENDAR MENU ====--> 
    77263652  <xsl:template match="calendar" mode="sideList">