Changeset 1633

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

moveing prefs, schprefs and related templates to prefs.xsl

Files:

Legend:

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

    r1632 r1633  
    5353  <xsl:include href="../../../bedework-common/default/default/freebusy.xsl"/> 
    5454  <xsl:include href="../../../bedework-common/default/default/event.xsl"/> 
    55  
     55  <xsl:include href="../../../bedework-common/default/default/prefs.xsl"/> 
    5656 
    5757  <!-- DEFINE GLOBAL CONSTANTS --> 
     
    956956  </xsl:template> 
    957957 
    958   <!--==== PREFERENCES ====--> 
    959   <xsl:template match="prefs"> 
    960     <h2>Manage Preferences</h2> 
    961     <ul class="submenu"> 
    962       <li class="selected">general</li> 
    963       <li><a href="{$prefs-fetchSchedulingForUpdate}">scheduling/meetings</a></li> 
    964     </ul> 
    965     <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    966     change it without modifying bedework.js --> 
    967     <form name="eventForm" method="post" action="{$prefs-update}" onsubmit="setWorkDays(this)"> 
    968       <table class="common"> 
    969         <tr><td colspan="2" class="fill">User settings:</td></tr> 
    970         <tr> 
    971           <td class="fieldname"> 
    972             User: 
    973           </td> 
    974           <td> 
    975             <xsl:value-of select="user"/> 
    976             <xsl:variable name="user" select="user"/> 
    977             <input type="hidden" name="user" value="{$user}"/> 
    978           </td> 
    979         </tr> 
    980         <tr> 
    981           <td class="fieldname"> 
    982             Email address: 
    983           </td> 
    984           <td> 
    985             <xsl:variable name="email" select="email"/> 
    986             <input type="text" name="email" value="{$email}" size="40"/> 
    987           </td> 
    988         </tr> 
    989         <tr><td colspan="2">&#160;</td></tr> 
    990         <tr><td colspan="2" class="fill">Adding events:</td></tr> 
    991         <!-- hide if only one calendar to select --> 
    992         <xsl:if test="count(/bedework/myCalendars/calendars//calendar[currentAccess/current-user-privilege-set/privilege/write-content and calType = '1']) &gt; 1"> 
    993           <tr> 
    994             <td class="fieldname"> 
    995               Default calendar: 
    996             </td> 
    997             <td> 
    998               <xsl:variable name="newCalPath" select="defaultCalendar/path"/> 
    999               <input type="hidden" name="newCalPath" value="{$newCalPath}" id="bwNewCalPathField"/> 
    1000               <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/>/</xsl:variable> 
    1001               <span id="bwEventCalDisplay"> 
    1002                 <xsl:choose> 
    1003                   <xsl:when test="contains(defaultCalendar,$userPath)"> 
    1004                     <xsl:value-of select="substring-after(defaultCalendar,$userPath)"/> 
    1005                   </xsl:when> 
    1006                   <xsl:otherwise> 
    1007                     <xsl:value-of select="defaultCalendar"/> 
    1008                   </xsl:otherwise> 
    1009                 </xsl:choose> 
    1010               </span> 
    1011               <xsl:call-template name="selectCalForEvent"/> 
    1012             </td> 
    1013           </tr> 
    1014         </xsl:if> 
    1015         <tr> 
    1016           <td class="fieldname"> 
    1017             Preferred time type: 
    1018           </td> 
    1019           <td> 
    1020             <select name="hour24"> 
    1021               <option value="false"> 
    1022                 <xsl:if test="hour24 = 'false'"> 
    1023                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1024                 </xsl:if> 
    1025                 12 hour + AM/PM 
    1026               </option> 
    1027               <option value="true"> 
    1028                 <xsl:if test="hour24 = 'true'"> 
    1029                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1030                 </xsl:if> 
    1031                 24 hour 
    1032               </option> 
    1033             </select> 
    1034           </td> 
    1035         </tr> 
    1036         <tr> 
    1037           <td class="fieldname"> 
    1038             Preferred end date/time type: 
    1039           </td> 
    1040           <td> 
    1041             <select name="preferredEndType"> 
    1042               <option value="duration"> 
    1043                 <xsl:if test="preferredEndType = 'duration'"> 
    1044                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1045                 </xsl:if> 
    1046                 duration 
    1047               </option> 
    1048               <option value="date"> 
    1049                 <xsl:if test="preferredEndType = 'date'"> 
    1050                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1051                 </xsl:if> 
    1052                 date/time 
    1053               </option> 
    1054             </select> 
    1055           </td> 
    1056         </tr> 
    1057         <tr><td colspan="2">&#160;</td></tr> 
    1058         <tr><td colspan="2" class="fill">Workday settings:</td></tr> 
    1059         <tr> 
    1060           <td class="fieldname"> 
    1061             Workdays: 
    1062           </td> 
    1063           <td> 
    1064             <xsl:variable name="workDays" select="workDays"/> 
    1065             <input type="hidden" name="workDays" value="{$workDays}"/> 
    1066             <input type="checkbox" name="workDayIndex" value="0"> 
    1067               <xsl:if test="substring(workDays,1,1) = 'W'"> 
    1068                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1069               </xsl:if> 
    1070               Sun 
    1071             </input> 
    1072             <input type="checkbox" name="workDayIndex" value="1"> 
    1073               <xsl:if test="substring(workDays,2,1) = 'W'"> 
    1074                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1075               </xsl:if> 
    1076               Mon 
    1077             </input> 
    1078             <input type="checkbox" name="workDayIndex" value="2"> 
    1079               <xsl:if test="substring(workDays,3,1) = 'W'"> 
    1080                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1081               </xsl:if> 
    1082               Tue 
    1083             </input> 
    1084             <input type="checkbox" name="workDayIndex" value="3"> 
    1085               <xsl:if test="substring(workDays,4,1) = 'W'"> 
    1086                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1087               </xsl:if> 
    1088               Wed 
    1089             </input> 
    1090             <input type="checkbox" name="workDayIndex" value="4"> 
    1091               <xsl:if test="substring(workDays,5,1) = 'W'"> 
    1092                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1093               </xsl:if> 
    1094               Thu 
    1095             </input> 
    1096             <input type="checkbox" name="workDayIndex" value="5"> 
    1097               <xsl:if test="substring(workDays,6,1) = 'W'"> 
    1098                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1099               </xsl:if> 
    1100               Fri 
    1101             </input> 
    1102             <input type="checkbox" name="workDayIndex" value="6"> 
    1103               <xsl:if test="substring(workDays,7,1) = 'W'"> 
    1104                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1105               </xsl:if> 
    1106               Sat 
    1107             </input> 
    1108           </td> 
    1109         </tr> 
    1110         <tr> 
    1111           <td class="fieldname"> 
    1112             Workday start: 
    1113           </td> 
    1114           <td> 
    1115             <select name="workdayStart"> 
    1116               <xsl:call-template name="buildWorkdayOptionsList"> 
    1117                 <xsl:with-param name="selectedVal" select="workdayStart"/> 
    1118               </xsl:call-template> 
    1119             </select> 
    1120           </td> 
    1121         </tr> 
    1122         <tr> 
    1123           <td class="fieldname"> 
    1124             Workday end: 
    1125           </td> 
    1126           <td> 
    1127             <xsl:variable name="workdayEnd" select="workdayEnd"/> 
    1128             <select name="workdayEnd"> 
    1129               <xsl:call-template name="buildWorkdayOptionsList"> 
    1130                 <xsl:with-param name="selectedVal" select="workdayEnd"/> 
    1131               </xsl:call-template> 
    1132             </select> 
    1133           </td> 
    1134         </tr> 
    1135         <tr><td colspan="2">&#160;</td></tr> 
    1136         <tr><td colspan="2" class="fill">Display options:</td></tr> 
    1137         <xsl:if test="/bedework/views/view[position()=2]"> 
    1138           <!-- only display if there is more than one to select --> 
    1139           <tr> 
    1140             <td class="fieldname"> 
    1141               Preferred view: 
    1142             </td> 
    1143             <td> 
    1144               <xsl:variable name="preferredView" select="preferredView"/> 
    1145               <select name="preferredView"> 
    1146                 <xsl:for-each select="/bedework/views/view"> 
    1147                   <xsl:variable name="viewName" select="name"/> 
    1148                   <xsl:choose> 
    1149                     <xsl:when test="viewName = $preferredView"> 
    1150                       <option value="{$viewName}" selected="selected"><xsl:value-of select="name"/></option> 
    1151                     </xsl:when> 
    1152                     <xsl:otherwise> 
    1153                       <option value="{$viewName}"><xsl:value-of select="name"/></option> 
    1154                     </xsl:otherwise> 
    1155                   </xsl:choose> 
    1156                 </xsl:for-each> 
    1157               </select> 
    1158             </td> 
    1159           </tr> 
    1160         </xsl:if> 
    1161         <tr> 
    1162           <td class="fieldname"> 
    1163             Preferred view period: 
    1164           </td> 
    1165           <td> 
    1166             <select name="viewPeriod"> 
    1167               <option value="dayView"> 
    1168                 <xsl:if test="preferredViewPeriod = 'dayView'"> 
    1169                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1170                 </xsl:if> 
    1171                 day 
    1172               </option> 
    1173               <option value="todayView"> 
    1174                 <xsl:if test="preferredViewPeriod = 'todayView'"> 
    1175                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1176                 </xsl:if> 
    1177                 today 
    1178               </option> 
    1179               <option value="weekView"> 
    1180                 <xsl:if test="preferredViewPeriod = 'weekView'"> 
    1181                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1182                 </xsl:if> 
    1183                 week 
    1184               </option> 
    1185               <option value="monthView"> 
    1186                 <xsl:if test="preferredViewPeriod = 'monthView'"> 
    1187                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1188                 </xsl:if> 
    1189                 month 
    1190               </option> 
    1191               <option value="yearView"> 
    1192                 <xsl:if test="preferredViewPeriod = 'yearView'"> 
    1193                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1194                 </xsl:if> 
    1195                 year 
    1196               </option> 
    1197             </select> 
    1198           </td> 
    1199         </tr><!-- as you add skins, update this list and set the selected flag 
    1200                  as required; hide if not in use --> 
    1201         <!--<tr> 
    1202           <td class="fieldname"> 
    1203             Skin name: 
    1204           </td> 
    1205           <td> 
    1206             <xsl:variable name="skinName" select="skinName"/> 
    1207             <select name="skin"> 
    1208               <option value="default">default</option> 
    1209             </select> 
    1210           </td> 
    1211         </tr> --> 
    1212         <!-- if you have skin styles, update this list and set the selected flag 
    1213                  as required; hide if not in use --> 
    1214         <!-- 
    1215         <tr> 
    1216           <td class="fieldname"> 
    1217             Skin style: 
    1218           </td> 
    1219           <td> 
    1220             <xsl:variable name="skinStyle" select="skinStyle"/> 
    1221             <select name="skinStyle"> 
    1222               <option value="default">default</option> 
    1223             </select> 
    1224           </td> 
    1225         </tr> --> 
    1226         <!-- hide if not in use: --> 
    1227         <!--<tr> 
    1228           <td class="fieldname"> 
    1229             Interface mode: 
    1230           </td> 
    1231           <td> 
    1232             <select name="userMode"> 
    1233               <option value="0"> 
    1234                 <xsl:if test="userMode = 0"> 
    1235                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1236                 </xsl:if> 
    1237                 basic 
    1238               </option> 
    1239               <option value="1"> 
    1240                 <xsl:if test="userMode = 1"> 
    1241                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1242                 </xsl:if> 
    1243                 simple 
    1244               </option> 
    1245               <option value="3"> 
    1246                 <xsl:if test="userMode = 3"> 
    1247                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1248                 </xsl:if> 
    1249                 advanced 
    1250               </option> 
    1251             </select> 
    1252           </td> 
    1253         </tr>--> 
    1254       </table> 
    1255       <br /> 
    1256  
    1257       <input type="submit" name="modPrefs" value="Update"/> 
    1258       <input type="reset" value="Reset"/> 
    1259       <input type="submit" name="cancelled" value="cancel"/> 
    1260     </form> 
    1261   </xsl:template> 
    1262  
    1263   <xsl:template match="schPrefs"> 
    1264     <h2>Manage Preferences</h2> 
    1265     <ul class="submenu"> 
    1266       <li><a href="{$prefs-fetchForUpdate}">general</a></li> 
    1267       <li class="selected">scheduling/meetings</li> 
    1268     </ul> 
    1269  
    1270     <table class="common" cellspacing="0"> 
    1271       <tr> 
    1272         <th class="leftBorder">Can send me scheduling requests:</th> 
    1273         <th class="leftBorder">Can schedule on my behalf:</th> 
    1274       </tr> 
    1275       <tr> 
    1276         <td class="leftBorder padMe"> 
    1277           <form name="prefsSetAccess1" method="post" action="{$prefs-setAccess}" onsubmit="setScheduleHow(this)"> 
    1278             <xsl:call-template name="schedulingAccessForm"> 
    1279               <xsl:with-param name="what">in</xsl:with-param> 
    1280             </xsl:call-template> 
    1281           </form> 
    1282           <xsl:apply-templates select="inbox/acl" mode="currentAccess"> 
    1283             <xsl:with-param name="action" select="$prefs-setAccess"/> 
    1284             <xsl:with-param name="what">in</xsl:with-param> 
    1285           </xsl:apply-templates> 
    1286         </td> 
    1287         <td class="leftBorder padMe"> 
    1288           <form name="prefsSetAccess2" method="post" action="{$prefs-setAccess}" onsubmit="setScheduleHow(this)"> 
    1289             <xsl:call-template name="schedulingAccessForm"> 
    1290               <xsl:with-param name="what">out</xsl:with-param> 
    1291             </xsl:call-template> 
    1292           </form> 
    1293           <xsl:apply-templates select="outbox/acl" mode="currentAccess"> 
    1294             <xsl:with-param name="action" select="$prefs-setAccess"/> 
    1295             <xsl:with-param name="what">out</xsl:with-param> 
    1296           </xsl:apply-templates> 
    1297         </td> 
    1298       </tr> 
    1299     </table> 
    1300  
    1301     <form name="scheduleAutoProcessingForm" method="post" action="{$prefs-updateSchedulingPrefs}"> 
    1302       <table class="common"> 
    1303         <tr><td colspan="2" class="fill">Scheduling auto-processing:</td></tr> 
    1304         <tr> 
    1305           <td class="fieldname"> 
    1306             Respond to scheduling requests: 
    1307           </td> 
    1308           <td> 
    1309             <input type="radio" name="scheduleAutoRespond" value="true" onclick="toggleAutoRespondFields(this.value)"> 
    1310               <xsl:if test="scheduleAutoRespond = 'true'"> 
    1311                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1312               </xsl:if> 
    1313               true 
    1314             </input> 
    1315             <input type="radio" name="scheduleAutoRespond" value="false" onclick="toggleAutoRespondFields(this.value)"> 
    1316               <xsl:if test="scheduleAutoRespond = 'false'"> 
    1317                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1318               </xsl:if> 
    1319               false 
    1320             </input> 
    1321           </td> 
    1322         </tr> 
    1323         <tr class="subField"> 
    1324           <td class="fieldname"> 
    1325             Accept double-bookings: 
    1326           </td> 
    1327           <td> 
    1328             <input type="radio" name="scheduleDoubleBook" value="true" id="scheduleDoubleBookTrue"> 
    1329               <xsl:if test="scheduleAutoRespond = 'false'"> 
    1330                 <xsl:attribute name="disabled">disabled</xsl:attribute> 
    1331               </xsl:if> 
    1332               <xsl:if test="scheduleDoubleBook = 'true'"> 
    1333                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1334               </xsl:if> 
    1335               true 
    1336             </input> 
    1337             <input type="radio" name="scheduleDoubleBook" value="false" id="scheduleDoubleBookFalse"> 
    1338               <xsl:if test="scheduleAutoRespond = 'false'"> 
    1339                 <xsl:attribute name="disabled">disabled</xsl:attribute> 
    1340               </xsl:if> 
    1341               <xsl:if test="scheduleDoubleBook = 'false'"> 
    1342                 <xsl:attribute name="checked">checked</xsl:attribute> 
    1343               </xsl:if> 
    1344               false 
    1345             </input> 
    1346           </td> 
    1347         </tr> 
    1348         <tr class="subField"> 
    1349           <td class="fieldname"> 
    1350             Cancel processing: 
    1351           </td> 
    1352           <td> 
    1353             <select name="scheduleAutoCancelAction" id="scheduleAutoCancelAction"> 
    1354               <xsl:if test="scheduleAutoRespond = 'false'"> 
    1355                 <xsl:attribute name="disabled">disabled</xsl:attribute> 
    1356               </xsl:if> 
    1357               <option value="0"> 
    1358                 <xsl:if test="scheduleAutoCancelAction = '0'"> 
    1359                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1360                 </xsl:if> 
    1361                 do nothing 
    1362               </option> 
    1363               <option value="1"> 
    1364                 <xsl:if test="scheduleAutoCancelAction = '1'"> 
    1365                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1366                 </xsl:if> 
    1367                 set event status to CANCELLED 
    1368               </option> 
    1369               <option value="2"> 
    1370                 <xsl:if test="scheduleAutoCancelAction = '2'"> 
    1371                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1372                 </xsl:if> 
    1373                 delete the event 
    1374               </option> 
    1375             </select> 
    1376           </td> 
    1377         </tr> 
    1378         <tr> 
    1379           <td colspan="2">&#160;</td> 
    1380         </tr> 
    1381         <tr> 
    1382           <td class="fieldname"> 
    1383             Response processing: 
    1384           </td> 
    1385           <td> 
    1386             <select name="scheduleAutoProcessResponses"> 
    1387               <option value="0"> 
    1388                 <xsl:if test="scheduleAutoProcessResponses = '0'"> 
    1389                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1390                 </xsl:if> 
    1391                 leave in Inbox for manual processing 
    1392               </option> 
    1393               <option value="1"> 
    1394                 <xsl:if test="scheduleAutoProcessResponses = '1'"> 
    1395                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1396                 </xsl:if> 
    1397                 process "Accept" responses - leave the rest in Inbox 
    1398               </option> 
    1399               <option value="2"> 
    1400                 <xsl:if test="scheduleAutoProcessResponses = '2'"> 
    1401                   <xsl:attribute name="selected">selected</xsl:attribute> 
    1402                 </xsl:if> 
    1403                 try to process all responses 
    1404               </option> 
    1405             </select> 
    1406           </td> 
    1407         </tr> 
    1408       </table> 
    1409       <input type="submit" name="modPrefs" value="Update scheduling auto-processing"/> 
    1410       <input type="reset" value="Reset"/> 
    1411       <input type="submit" name="cancelled" value="cancel"/> 
    1412     </form> 
    1413   </xsl:template> 
    1414  
    1415   <!-- construct the workDay times options listings from minute 0 to less than 
    1416        minute 1440 (midnight inclusive); initialize the template with the currently 
    1417        selected value. Change the default value for "increment" here. minTime 
    1418        and maxTime are constants. --> 
    1419   <xsl:template name="buildWorkdayOptionsList"> 
    1420     <xsl:param name="selectedVal"/> 
    1421     <xsl:param name="increment" select="number(30)"/> 
    1422     <xsl:param name="currentTime" select="number(0)"/> 
    1423     <xsl:variable name="minTime" select="number(0)"/> 
    1424     <xsl:variable name="maxTime" select="number(1440)"/> 
    1425     <xsl:if test="$currentTime &lt; $maxTime"> 
    1426       <option value="{$currentTime}"> 
    1427         <xsl:if test="$currentTime = $selectedVal"><xsl:attribute name="selected">selected</xsl:attribute></xsl:if> 
    1428         <xsl:if test="floor($currentTime div 60) &lt; 10">0</xsl:if><xsl:value-of select="floor($currentTime div 60)"/>:<xsl:if test="string-length($currentTime mod 60)=1">0</xsl:if><xsl:value-of select="$currentTime mod 60"/> 
    1429       </option> 
    1430       <xsl:call-template name="buildWorkdayOptionsList"> 
    1431         <xsl:with-param name="selectedVal" select="$selectedVal"/> 
    1432         <xsl:with-param name="currentTime" select="$currentTime + $increment"/> 
    1433       </xsl:call-template> 
    1434     </xsl:if> 
    1435   </xsl:template> 
    1436  
    1437  
    1438   <!--==== ACCESS CONTROL TEMPLATES ====--> 
    1439  
    1440   <xsl:template name="schedulingAccessForm"> 
    1441     <xsl:param name="what"/> 
    1442     <input type="hidden" name="what"> 
    1443       <xsl:attribute name="value"><xsl:value-of select="$what"/></xsl:attribute> 
    1444     </input> 
    1445     <p> 
    1446       <input type="text" name="who" width="40"/> 
    1447       <span class="nowrap"><input type="radio" name="whoType" value="user" checked="checked"/>user</span> 
    1448       <span class="nowrap"><input type="radio" name="whoType" value="group"/>group</span> 
    1449     </p> 
    1450     <p> 
    1451       <strong>or</strong> 
    1452       <span class="nowrap"><input type="radio" name="whoType" value="owner"/>owner</span> 
    1453       <span class="nowrap"><input type="radio" name="whoType" value="auth"/>authenticated users</span> 
    1454       <span class="nowrap"><input type="radio" name="whoType" value="other"/>anyone</span> 
    1455     </p> 
    1456  
    1457     <input type="hidden" name="how" value="S"/> 
    1458     <dl> 
    1459       <dt> 
    1460         <input type="checkbox" name="howSetter" value="S" checked="checked" onchange="toggleScheduleHow(this.form,this)"/>all scheduling 
    1461       </dt> 
    1462       <dd> 
    1463         <input type="checkbox" name="howSetter" value="t" checked="checked" disabled="disabled"/>scheduling requests<br/> 
    1464         <input type="checkbox" name="howSetter" value="y" checked="checked" disabled="disabled"/>scheduling replies<br/> 
    1465         <input type="checkbox" name="howSetter" value="s" checked="checked" disabled="disabled"/>free-busy requests 
    1466       </dd> 
    1467     </dl> 
    1468  
    1469     <input type="submit" name="modPrefs" value="Update"/> 
    1470     <input type="reset" value="Reset"/> 
    1471     <input type="submit" name="cancelled" value="cancel"/> 
    1472   </xsl:template> 
    1473  
    1474   <xsl:template match="acl" mode="currentAccess"> 
    1475     <xsl:param name="action"/> <!-- required --> 
    1476     <xsl:param name="calPathEncoded"/> <!-- optional (for entities) --> 
    1477     <xsl:param name="guid"/> <!-- optional (for entities) --> 
    1478     <xsl:param name="recurrenceId"/> <!-- optional (for entities) --> 
    1479     <xsl:param name="what"/> <!-- optional (for scheduling only) --> 
    1480     <xsl:param name="method">1</xsl:param> <!-- which method of access control 
    1481       are we using: 1 (one request per pricipal) or 2 (set all with 
    1482       javascript and send entire ACL to server) --> 
    1483     <h3>Current Access:</h3> 
    1484     <table class="common scheduling" id="bwCurrentAccess"> 
    1485       <thead> 
    1486         <tr> 
    1487           <th>Entry</th> 
    1488           <th>Access</th> 
    1489           <th>Inherited from</th> 
    1490           <td></td> 
    1491         </tr> 
    1492       </thead> 
    1493       <tbody> 
    1494         <xsl:for-each select="ace"> 
    1495           <xsl:variable name="who"> 
    1496             <xsl:choose> 
    1497               <xsl:when test="invert"> 
    1498                 <xsl:choose> 
    1499                   <xsl:when test="invert/principal/href"><xsl:value-of select="normalize-space(invert/principal/href)"/></xsl:when> 
    1500                   <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    1501                   <xsl:otherwise><xsl:value-of select="name(invert/principal/*)"/></xsl:otherwise> 
    1502                 </xsl:choose> 
    1503               </xsl:when> 
    1504               <xsl:otherwise> 
    1505                 <xsl:choose> 
    1506                   <xsl:when test="principal/href"><xsl:value-of select="normalize-space(principal/href)"/></xsl:when> 
    1507                   <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    1508                   <xsl:otherwise><xsl:value-of select="name(principal/*)"/></xsl:otherwise> 
    1509                 </xsl:choose> 
    1510               </xsl:otherwise> 
    1511             </xsl:choose> 
    1512           </xsl:variable> 
    1513           <xsl:variable name="whoType"> 
    1514             <xsl:choose> 
    1515               <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)">user</xsl:when> 
    1516               <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 
    1517               <xsl:when test="$who='authenticated'">auth</xsl:when> 
    1518               <xsl:when test="$who='unauthenticated'">unauth</xsl:when> 
    1519               <xsl:when test="$who='all'">all</xsl:when> 
    1520               <xsl:when test="invert/principal/property/owner">other</xsl:when> 
    1521               <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    1522               <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    1523               <xsl:otherwise></xsl:otherwise> 
    1524             </xsl:choose> 
    1525           </xsl:variable> 
    1526           <xsl:variable name="shortWho"> 
    1527             <xsl:choose> 
    1528               <xsl:when test="$whoType='user'"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/userPrincipalRoot)),'/')"/></xsl:when> 
    1529               <xsl:when test="$whoType='group'"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/groupPrincipalRoot)),'/')"/></xsl:when> 
    1530               <xsl:otherwise></xsl:otherwise> <!-- if not user or group, send no who --> 
    1531             </xsl:choose> 
    1532           </xsl:variable> 
    1533           <tr> 
    1534             <td> 
    1535               <xsl:choose> 
    1536                 <xsl:when test="$whoType = 'user' or ($who = 'owner' and $whoType != 'other')"> 
    1537                   <img src="{$resourcesRoot}/resources/userIcon.gif" width="13" height="13" border="0" alt="user"/> 
    1538                 </xsl:when> 
    1539                 <xsl:otherwise> 
    1540                   <img src="{$resourcesRoot}/resources/groupIcon.gif" width="13" height="13" border="0" alt="group"/> 
    1541                 </xsl:otherwise> 
    1542               </xsl:choose> 
    1543               <xsl:text> </xsl:text> 
    1544               <xsl:choose> 
    1545                 <xsl:when test="$whoType = 'other'"> 
    1546                   anyone (other) 
    1547                 </xsl:when> 
    1548                 <xsl:when test="$shortWho != ''"> 
    1549                   <xsl:value-of select="$shortWho"/> 
    1550                 </xsl:when> 
    1551                 <xsl:otherwise> 
    1552                   <xsl:value-of select="$who"/> 
    1553                 </xsl:otherwise> 
    1554               </xsl:choose> 
    1555             </td> 
    1556             <td class="acls"> 
    1557               <xsl:if test="grant"> 
    1558                 grant: 
    1559                 <span class="grant"> 
    1560                   <xsl:for-each select="grant/*"> 
    1561                     <xsl:value-of select="name(.)"/> 
    1562                     <xsl:if test="position() != last()">, </xsl:if> 
    1563                   </xsl:for-each> 
    1564                 </span><br/> 
    1565               </xsl:if> 
    1566               <xsl:if test="deny"> 
    1567                 deny: 
    1568                 <span class="deny"> 
    1569                   <xsl:for-each select="deny/*"> 
    1570                     <xsl:value-of select="name(.)"/> 
    1571                     <xsl:if test="position() != last()">, </xsl:if> 
    1572                   </xsl:for-each> 
    1573                 </span> 
    1574               </xsl:if> 
    1575             </td> 
    1576             <td> 
    1577               <xsl:choose> 
    1578                 <xsl:when test="inherited"> 
    1579                   <xsl:value-of select="inherited/href"/> 
    1580                 </xsl:when> 
    1581                 <xsl:otherwise> 
    1582                   Not inherited 
    1583                 </xsl:otherwise> 
    1584               </xsl:choose> 
    1585             </td> 
    1586             <td> 
    1587               <xsl:if test="not(inherited)"> 
    1588                 <xsl:choose> 
    1589                   <xsl:when test="$method = '2'"> 
    1590                     <!-- we are using javascript to update the form --> 
    1591                     <xsl:variable name="rowPos" select="position()-1"/> 
    1592                     <a href="javascript:bwAcl.deleteAce({$rowPos})" title="reset to default"> 
    1593                       remove 
    1594                     </a> 
    1595                   </xsl:when> 
    1596                   <xsl:otherwise> 
    1597                     <a href="{$action}&amp;how=default&amp;what={$what}&amp;who={$shortWho}&amp;whoType={$whoType}&amp;calPath={$calPathEncoded}&amp;guid={$guid}&amp;recurrenceId={$recurrenceId}" title="reset to default"> 
    1598                       <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="reset to default"/> 
    1599                     </a> 
    1600                   </xsl:otherwise> 
    1601                 </xsl:choose> 
    1602               </xsl:if> 
    1603             </td> 
    1604           </tr> 
    1605         </xsl:for-each> 
    1606       </tbody> 
    1607     </table> 
    1608   </xsl:template> 
    1609  
    1610958  <!--==== SIDE CALENDAR MENU ====--> 
    1611959  <xsl:template match="calendar" mode="sideList">