Changeset 1626

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

refactoring of default.xsl

Files:

Legend:

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

    r1625 r1626  
    11<?xml version="1.0" encoding="UTF-8"?> 
     2 
    23<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
    34<xsl:output 
     
    4041 
    4142  <!-- DEFINE INCLUDES --> 
    42   <xsl:include href="../../../bedework-common/default/default/errors.xsl"/> 
    43   <xsl:include href="../../../bedework-common/default/default/messages.xsl"/> 
    44  
     43  <xsl:include href="../../../bedework-common/default/default/navigation.xsl" /> 
     44  <xsl:include href="../../../bedework-common/default/default/misc.xsl" /> 
    4545  <xsl:include href="../../../bedework-common/default/default/views.xsl"/> 
    4646  <xsl:include href="../../../bedework-common/default/default/category-location.xsl"/> 
     
    353353    </html> 
    354354  </xsl:template> 
    355  
    356   <!--==== HEAD SECTION  ====--> 
    357   <xsl:template name="headSection"> 
    358     <title>Bedework: Personal Calendar Client</title> 
    359     <meta name="robots" content="noindex,nofollow"/> 
    360     <meta content="text/html;charset=utf-8" http-equiv="Content-Type" /> 
    361     <link rel="stylesheet" href="{$resourcesRoot}/default/default/default.css"/> 
    362     <link rel="stylesheet" href="{$resourcesRoot}/default/default/subColors.css"/> 
    363     <link rel="stylesheet" type="text/css" media="print" href="{$resourcesRoot}/default/default/print.css" /> 
    364     <link rel="icon" type="image/ico" href="{$resourcesRoot}/resources/bedework.ico" /> 
    365     <!-- note: the non-breaking spaces in the script bodies below are to avoid 
    366          losing the script closing tags (which avoids browser problems) --> 
    367     <script type="text/javascript" src="{$resourcesRoot}/resources/bedework.js">&#160;</script> 
    368     <xsl:if test="/bedework/page='modSchedulingPrefs' or 
    369                   /bedework/page='modPrefs' or 
    370                   /bedework/page='attendeeRespond'"> 
    371       <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkPrefs.js">&#160;</script> 
    372     </xsl:if> 
    373     <xsl:if test="/bedework/page='modCalendar' or 
    374                   /bedework/page='eventAccess'"> 
    375       <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkAccess.js">&#160;</script> 
    376     </xsl:if> 
    377     <xsl:if test="/bedework/page='addEvent' or 
    378                   /bedework/page='editEvent' or 
    379                   /bedework/page='rdates' or 
    380                   /bedework/page='calendarListForExport'"> 
    381       <script type="text/javascript" src="{$resourcesRoot}/resources/bwClock.js">&#160;</script> 
    382       <link rel="stylesheet" href="{$resourcesRoot}/resources/bwClock.css"/> 
    383       <script type="text/javascript" src="/bedework-common/javascript/dojo/dojo.js">&#160;</script> 
    384       <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkEventForm.js">&#160;</script> 
    385       <script type="text/javascript" src="{$resourcesRoot}/resources/bedeworkAccess.js">&#160;</script> 
    386       <xsl:if test="$portalFriendly = 'true'"> 
    387         <script type="text/javascript" src="{$resourcesRoot}/resources/dynCalendarWidget.js">&#160;</script> 
    388         <link rel="stylesheet" href="{$resourcesRoot}/resources/dynCalendarWidget.css"/> 
    389       </xsl:if> 
    390     </xsl:if> 
    391     <xsl:if test="/bedework/editableAccess/access/acl/ace"> 
    392       <script type="text/javascript"> 
    393         <xsl:apply-templates select="/bedework/editableAccess/access/acl/ace" mode="initJS"/> 
    394       </script> 
    395     </xsl:if> 
    396     <script type="text/javascript"> 
    397       <xsl:comment> 
    398       <![CDATA[ 
    399       function checkStatus(inboxCount,changed,url) { 
    400       // Check status of inbox and outbox and alert user appropriately. 
    401       // Just take care of inbox for now. 
    402         if (inboxCount && changed) { 
    403           var itemStr = "item"; 
    404           if (inboxCount > 1) { 
    405             itemStr = "items"; 
    406           } 
    407           if (confirm("You have " + inboxCount + " pending " + itemStr + " in your inbox.\nGo to inbox?")) { 
    408             window.location.replace(url); 
    409           } 
    410         } 
    411       } 
    412       function focusElement(id) { 
    413       // focuses element by id 
    414         document.getElementById(id).focus(); 
    415       } 
    416       ]]> 
    417       </xsl:comment> 
    418     </script> 
    419   </xsl:template> 
    420  
    421   <!--==== HEADER TEMPLATES and NAVIGATION  ====--> 
    422  
    423   <xsl:template name="messagesAndErrors"> 
    424     <xsl:if test="/bedework/message"> 
    425       <ul id="messages"> 
    426         <xsl:for-each select="/bedework/message"> 
    427           <li><xsl:apply-templates select="."/></li> 
    428         </xsl:for-each> 
    429       </ul> 
    430     </xsl:if> 
    431     <xsl:if test="/bedework/error"> 
    432       <ul id="errors"> 
    433         <xsl:for-each select="/bedework/error"> 
    434           <li><xsl:apply-templates select="."/></li> 
    435         </xsl:for-each> 
    436       </ul> 
    437     </xsl:if> 
    438   </xsl:template> 
    439  
    440   <xsl:template name="headBar"> 
    441     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="logoTable"> 
    442       <tr> 
    443         <td colspan="3" id="logoCell"><a href="/bedework/"><img src="{$resourcesRoot}/resources/bedeworkLogo.gif" width="292" height="75" border="0" alt="Bedework"/></a></td> 
    444         <td colspan="2" id="schoolLinksCell"> 
    445           <h2>Personal Calendar</h2> 
    446           <a href="{$publicCal}">Public Calendar</a> | 
    447           <a href="http://www.yourschoolhere.edu">School Home</a> | 
    448           <a href="http://www.bedework.org/">Other Link</a> | 
    449           <a href="http://helpdesk.rpi.edu/update.do?catcenterkey=51"> 
    450             Example Calendar Help 
    451           </a> 
    452         </td> 
    453       </tr> 
    454     </table> 
    455     <table id="curDateRangeTable"  cellspacing="0"> 
    456       <tr> 
    457         <td class="sideBarOpenCloseIcon"> 
    458           <xsl:choose> 
    459             <xsl:when test="/bedework/appvar[key='sidebar']/value='closed'"> 
    460               <a href="?setappvar=sidebar(opened)"> 
    461                 <img alt="open sidebar" src="{$resourcesRoot}/resources/sideBarArrowOpen.gif" width="21" height="16" border="0" align="left"/> 
    462               </a> 
    463             </xsl:when> 
    464             <xsl:otherwise> 
    465               <a href="?setappvar=sidebar(closed)"> 
    466                 <img alt="close sidebar" src="{$resourcesRoot}/resources/sideBarArrowClose.gif" width="21" height="16" border="0" align="left"/> 
    467               </a> 
    468             </xsl:otherwise> 
    469           </xsl:choose> 
    470         </td> 
    471         <td class="date"> 
    472           <xsl:value-of select="/bedework/firstday/longdate"/> 
    473           <xsl:if test="/bedework/periodname!='Day'"> 
    474             - 
    475             <xsl:value-of select="/bedework/lastday/longdate"/> 
    476           </xsl:if> 
    477         </td> 
    478         <td class="rssPrint"> 
    479           <a href="javascript:window.print()" title="print this view"> 
    480             <img alt="print this view" src="{$resourcesRoot}/resources/std-print-icon.gif" width="20" height="14" border="0"/> print 
    481           </a> 
    482           <a class="rss" href="{$setup}&amp;setappvar=summaryMode(details)&amp;skinName=rss" title="RSS feed">RSS</a> 
    483         </td> 
    484       </tr> 
    485     </table> 
    486   </xsl:template> 
    487  
    488   <xsl:template name="sideBar"> 
    489     <h3> 
    490       <!--<img alt="manage views" src="{$resourcesRoot}/resources/glassFill-icon-menuButton.gif" width="12" height="11" border="0"/>--> 
    491       views 
    492     </h3> 
    493     <ul id="myViews"> 
    494       <xsl:choose> 
    495         <xsl:when test="/bedework/views/view"> 
    496           <xsl:for-each select="/bedework/views/view"> 
    497             <xsl:variable name="viewName" select="name"/> 
    498             <xsl:choose> 
    499               <xsl:when test="/bedework/selectionState/selectionType = 'view' 
    500                               and name=/bedework/selectionState/view/name"> 
    501                 <li class="selected"><a href="{$setSelection}&amp;viewName={$viewName}"><xsl:value-of select="name"/></a></li> 
    502               </xsl:when> 
    503               <xsl:otherwise> 
    504                 <li><a href="{$setSelection}&amp;viewName={$viewName}"><xsl:value-of select="name"/></a></li> 
    505               </xsl:otherwise> 
    506             </xsl:choose> 
    507           </xsl:for-each> 
    508         </xsl:when> 
    509         <xsl:otherwise> 
    510           <li class="none">no views</li> 
    511         </xsl:otherwise> 
    512       </xsl:choose> 
    513     </ul> 
    514  
    515     <h3> 
    516       <a href="{$calendar-fetch}" title="manage calendars"> 
    517         manage 
    518       </a> 
    519       calendars 
    520     </h3> 
    521     <!-- normal calendars --> 
    522     <ul class="calendarTree"> 
    523       <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar/calendar[calType &lt; 2]" mode="myCalendars"/> 
    524     </ul> 
    525     <!-- special calendars: inbox, outbox, and trash --> 
    526     <ul class="calendarTree"> 
    527       <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar/calendar[calType = 5]" mode="mySpecialCalendars"/> <!-- inbox --> 
    528       <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar/calendar[calType = 6]" mode="mySpecialCalendars"/> <!-- outbox --> 
    529       <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar/calendar[calType = 2]" mode="mySpecialCalendars"/> <!-- trash --> 
    530       <xsl:apply-templates select="/bedework/myCalendars/calendars/calendar/calendar[calType = 3]" mode="mySpecialCalendars"/> <!-- deleted --> 
    531     </ul> 
    532  
    533     <h3> 
    534       <a href="{$subscriptions-fetch}" title="manage subscriptions"> 
    535         manage 
    536       </a> 
    537       subscriptions 
    538     </h3> 
    539     <ul class="calendarTree"> 
    540       <xsl:variable name="userPath">user/<xsl:value-of select="/bedework/userid"/></xsl:variable> 
    541       <xsl:choose> 
    542         <xsl:when test="/bedework/mySubscriptions/subscription[not(contains(uri,$userPath))]"> 
    543           <xsl:apply-templates select="/bedework/mySubscriptions/subscription[not(contains(uri,$userPath))]" mode="mySubscriptions"/> 
    544         </xsl:when> 
    545         <xsl:otherwise> 
    546           <li class="none">no subscriptions</li> 
    547         </xsl:otherwise> 
    548       </xsl:choose> 
    549     </ul> 
    550  
    551     <h3>options</h3> 
    552     <ul id="sideBarMenu"> 
    553       <li><a href="{$category-initUpdate}">Manage Categories</a></li> 
    554       <li><a href="{$location-initUpdate}">Manage Locations</a></li> 
    555       <li><a href="{$prefs-fetchForUpdate}">Preferences</a></li> 
    556       <li><a href="{$initUpload}" title="upload event">Upload iCAL</a></li> 
    557       <li><a href="{$calendar-listForExport}" title="upload event">Export Calendars</a></li> 
    558     </ul> 
    559   </xsl:template> 
    560  
    561   <xsl:template name="tabs"> 
    562     <xsl:variable name="navAction"> 
    563       <xsl:choose> 
    564         <xsl:when test="/bedework/page='attendees'"><xsl:value-of select="$event-attendeesForEvent"/></xsl:when> 
    565         <xsl:when test="/bedework/page='freeBusy'"><xsl:value-of select="$freeBusy-fetch"/></xsl:when> 
    566         <xsl:otherwise><xsl:value-of select="$setViewPeriod"/></xsl:otherwise> 
    567       </xsl:choose> 
    568     </xsl:variable> 
    569     <table cellspacing="0" id="tabsTable"> 
    570       <tr> 
    571         <td> 
    572           <xsl:choose> 
    573             <xsl:when test="/bedework/periodname='Day'"> 
    574               <a href="{$navAction}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-day-on.gif" width="90" height="20" border="0" alt="DAY"/></a> 
    575             </xsl:when> 
    576             <xsl:otherwise> 
    577               <a href="{$navAction}&amp;viewType=dayView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-day-off.gif" width="90" height="20" border="0" alt="DAY"/></a> 
    578             </xsl:otherwise> 
    579           </xsl:choose> 
    580         </td> 
    581         <td> 
    582           <xsl:choose> 
    583             <xsl:when test="/bedework/periodname='Week' or /bedework/periodname=''"> 
    584               <a href="{$navAction}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-week-on.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
    585              </xsl:when> 
    586             <xsl:otherwise> 
    587               <a href="{$navAction}&amp;viewType=weekView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-week-off.gif" width="92" height="20" border="0" alt="WEEK"/></a> 
    588              </xsl:otherwise> 
    589           </xsl:choose> 
    590         </td> 
    591         <td> 
    592           <xsl:choose> 
    593             <xsl:when test="/bedework/periodname='Month'"> 
    594               <a href="{$navAction}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-month-on.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
    595             </xsl:when> 
    596             <xsl:otherwise> 
    597               <a href="{$navAction}&amp;viewType=monthView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-month-off.gif" width="90" height="20" border="0" alt="MONTH"/></a> 
    598             </xsl:otherwise> 
    599           </xsl:choose> 
    600         </td> 
    601         <td> 
    602           <xsl:choose> 
    603             <!-- don't allow switching to year for free busy view, so only use setViewPeriod action --> 
    604             <xsl:when test="/bedework/periodname='Year'"> 
    605               <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-year-on.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
    606             </xsl:when> 
    607             <xsl:otherwise> 
    608               <xsl:choose> 
    609                 <xsl:when test="/bedework/page='attendees' or /bedework/page='freeBusy'"> 
    610                   <img src="{$resourcesRoot}/resources/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/> 
    611                 </xsl:when> 
    612                 <xsl:otherwise> 
    613                   <a href="{$setViewPeriod}&amp;viewType=yearView&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-tab-year-off.gif" width="92" height="20" border="0" alt="YEAR"/></a> 
    614                 </xsl:otherwise> 
    615               </xsl:choose> 
    616             </xsl:otherwise> 
    617           </xsl:choose> 
    618         </td> 
    619         <td class="rightCell"> 
    620           logged in as 
    621           <xsl:text> </xsl:text> 
    622           <strong><xsl:value-of select="/bedework/userid"/></strong> 
    623           <xsl:text> </xsl:text> 
    624           <span class="logout"><a href="{$setup}&amp;logout=true">logout</a></span> 
    625         </td> 
    626       </tr> 
    627     </table> 
    628   </xsl:template> 
    629  
    630   <xsl:template name="navigation"> 
    631     <xsl:variable name="navAction"> 
    632       <xsl:choose> 
    633         <xsl:when test="/bedework/page='attendees'"><xsl:value-of select="$event-attendeesForEvent"/></xsl:when> 
    634         <xsl:when test="/bedework/page='freeBusy'"><xsl:value-of select="$freeBusy-fetch"/></xsl:when> 
    635         <xsl:otherwise><xsl:value-of select="$setViewPeriod"/></xsl:otherwise> 
    636       </xsl:choose> 
    637     </xsl:variable> 
    638     <table border="0" cellpadding="0" cellspacing="0" id="navigationBarTable"> 
    639       <tr> 
    640         <td class="leftCell"> 
    641           <a href="{$navAction}&amp;date={$prevdate}"><img src="{$resourcesRoot}/resources/std-arrow-left.gif" alt="previous" width="13" height="16" class="prevImg" border="0"/></a> 
    642           <a href="{$navAction}&amp;date={$nextdate}"><img src="{$resourcesRoot}/resources/std-arrow-right.gif" alt="next" width="13" height="16" class="nextImg" border="0"/></a> 
    643           <xsl:choose> 
    644             <xsl:when test="/bedework/periodname='Year'"> 
    645               <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
    646             </xsl:when> 
    647             <xsl:when test="/bedework/periodname='Month'"> 
    648               <xsl:value-of select="/bedework/firstday/monthname"/>, <xsl:value-of select="substring(/bedework/firstday/date,1,4)"/> 
    649             </xsl:when> 
    650             <xsl:when test="/bedework/periodname='Week'"> 
    651               Week of <xsl:value-of select="substring-after(/bedework/firstday/longdate,', ')"/> 
    652             </xsl:when> 
    653             <xsl:otherwise> 
    654               <xsl:value-of select="/bedework/firstday/longdate"/> 
    655             </xsl:otherwise> 
    656           </xsl:choose> 
    657         </td> 
    658         <td class="todayButton"> 
    659           <a href="{$navAction}&amp;viewType=todayView&amp;date={$curdate}"> 
    660             <img src="{$resourcesRoot}/resources/std-button-today-off.gif" width="54" height="22" border="0" alt="Go to Today" align="left"/> 
    661           </a> 
    662         </td> 
    663         <td align="right" class="gotoForm"> 
    664           <form name="calForm" method="post" action="{$navAction}"> 
    665              <table border="0" cellpadding="0" cellspacing="0"> 
    666               <tr> 
    667                 <xsl:if test="/bedework/periodname!='Year'"> 
    668                   <td> 
    669                     <select name="viewStartDate.month"> 
    670                       <xsl:for-each select="/bedework/monthvalues/val"> 
    671                         <xsl:variable name="temp" select="."/> 
    672                         <xsl:variable name="pos" select="position()"/> 
    673                         <xsl:choose> 
    674                           <xsl:when test="/bedework/monthvalues[start=$temp]"> 
    675                             <option value="{$temp}" selected="selected"> 
    676                               <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
    677                             </option> 
    678                           </xsl:when> 
    679                           <xsl:otherwise> 
    680                             <option value="{$temp}"> 
    681                               <xsl:value-of select="/bedework/monthlabels/val[position()=$pos]"/> 
    682                             </option> 
    683                           </xsl:otherwise> 
    684                         </xsl:choose> 
    685                       </xsl:for-each> 
    686                     </select> 
    687                   </td> 
    688                   <xsl:if test="/bedework/periodname!='Month'"> 
    689                     <td> 
    690                       <select name="viewStartDate.day"> 
    691                         <xsl:for-each select="/bedework/dayvalues/val"> 
    692                           <xsl:variable name="temp" select="."/> 
    693                           <xsl:variable name="pos" select="position()"/> 
    694                           <xsl:choose> 
    695                             <xsl:when test="/bedework/dayvalues[start=$temp]"> 
    696                               <option value="{$temp}" selected="selected"> 
    697                                 <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
    698                               </option> 
    699                             </xsl:when> 
    700                             <xsl:otherwise> 
    701                               <option value="{$temp}"> 
    702                                 <xsl:value-of select="/bedework/daylabels/val[position()=$pos]"/> 
    703                               </option> 
    704                             </xsl:otherwise> 
    705                           </xsl:choose> 
    706                         </xsl:for-each> 
    707                       </select> 
    708                     </td> 
    709                   </xsl:if> 
    710                 </xsl:if> 
    711                 <td> 
    712                   <xsl:variable name="temp" select="/bedework/yearvalues/start"/> 
    713                   <input type="text" name="viewStartDate.year" maxlength="4" size="4" value="{$temp}"/> 
    714                 </td> 
    715                 <td> 
    716                   <input name="submit" type="submit" value="go"/> 
    717                 </td> 
    718               </tr> 
    719             </table> 
    720           </form> 
    721         </td> 
    722       </tr> 
    723     </table> 
    724   </xsl:template> 
    725  
    726   <xsl:template name="utilBar"> 
    727     <table width="100%" border="0" cellpadding="0" cellspacing="0" id="utilBarTable"> 
    728        <tr> 
    729          <td class="leftCell"> 
    730            <xsl:if test="/bedework/page != 'addEvent' or /bedework/page='editEvent'"> 
    731              <input type="button" value="add..." onclick="toggleActionIcons('bwActionIcons-0','bwActionIcons')"/> 
    732              <xsl:call-template name="actionIcons"> 
    733                <xsl:with-param name="actionIconsId">bwActionIcons-0</xsl:with-param> 
    734                <xsl:with-param name="startDate"> 
    735                  <xsl:choose> 
    736                    <xsl:when test="/bedework/periodname = 'day'"><xsl:value-of select="/bedework/firstday/date"/></xsl:when> 
    737                    <xsl:otherwise><xsl:value-of select="/bedework/now/date"/></xsl:otherwise> 
    738                  </xsl:choose> 
    739                </xsl:with-param> 
    740              </xsl:call-template> 
    741            </xsl:if> 
    742          </td> 
    743          <td class="rightCell"> 
    744  
    745            <!-- search --> 
    746            <xsl:if test="/bedework/page!='searchResult'"> 
    747              <form name="searchForm" method="post" action="{$search}"> 
    748                Search: 
    749                <input type="text" name="query" size="15"> 
    750                  <xsl:attribute name="value"><xsl:value-of select="/bedework/searchResults/query"/></xsl:attribute> 
    751                </input> 
    752                <input type="submit" name="submit" value="go"/> 
    753              </form> 
    754            </xsl:if> 
    755  
    756            <!-- show free / busy --> 
    757            <xsl:choose> 
    758              <xsl:when test="/bedework/periodname!='Year'"> 
    759                <xsl:choose> 
    760                  <xsl:when test="/bedework/page='freeBusy'"> 
    761                    <a href="{$setViewPeriod}&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-button-events.gif" width="70" height="21" border="0" alt="show events"/></a> 
    762                  </xsl:when> 
    763                  <xsl:otherwise> 
    764                    <a href="{$freeBusy-fetch}&amp;date={$curdate}"><img src="{$resourcesRoot}/resources/std-button-freebusy.gif" width="70" height="21" border="0" alt="show free/busy"/></a> 
    765                  </xsl:otherwise> 
    766                </xsl:choose> 
    767              </xsl:when> 
    768              <xsl:otherwise> 
    769                <img src="{$resourcesRoot}/resources/std-button-freebusy-off.gif" width="70" height="21" border="0" alt="show free/busy"/> 
    770              </xsl:otherwise> 
    771            </xsl:choose> 
    772  
    773            <!-- toggle list / calendar view --> 
    774            <xsl:choose> 
    775              <xsl:when test="/bedework/periodname='Day'"> 
    776                <img src="{$resourcesRoot}/resources/std-button-listview-off.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    777              </xsl:when> 
    778              <xsl:when test="/bedework/periodname='Year'"> 
    779                <img src="{$resourcesRoot}/resources/std-button-calview-off.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    780              </xsl:when> 
    781              <xsl:when test="/bedework/periodname='Month'"> 
    782                <xsl:choose> 
    783                  <xsl:when test="/bedework/appvar[key='monthViewMode']/value='list'"> 
    784                    <a href="{$setup}&amp;setappvar=monthViewMode(cal)" title="toggle list/calendar view"> 
    785                      <img src="{$resourcesRoot}/resources/std-button-calview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    786                    </a> 
    787                  </xsl:when> 
    788                  <xsl:otherwise> 
    789                    <a href="{$setup}&amp;setappvar=monthViewMode(list)" title="toggle list/calendar view"> 
    790                      <img src="{$resourcesRoot}/resources/std-button-listview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    791                    </a> 
    792                  </xsl:otherwise> 
    793                </xsl:choose> 
    794              </xsl:when> 
    795              <xsl:otherwise> 
    796                <xsl:choose> 
    797                  <xsl:when test="/bedework/appvar[key='weekViewMode']/value='list'"> 
    798                    <a href="{$setup}&amp;setappvar=weekViewMode(cal)" title="toggle list/calendar view"> 
    799                      <img src="{$resourcesRoot}/resources/std-button-calview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    800                    </a> 
    801                  </xsl:when> 
    802                  <xsl:otherwise> 
    803                    <a href="{$setup}&amp;setappvar=weekViewMode(list)" title="toggle list/calendar view"> 
    804                      <img src="{$resourcesRoot}/resources/std-button-listview.gif" width="46" height="21" border="0" alt="toggle list/calendar view"/> 
    805                    </a> 
    806                  </xsl:otherwise> 
    807                </xsl:choose> 
    808              </xsl:otherwise> 
    809            </xsl:choose> 
    810  
    811            <!-- summary / detailed mode toggle --> 
    812            <xsl:choose> 
    813              <xsl:when test="/bedework/periodname='Year' or 
    814                               (/bedework/periodname='Month' and 
    815                               (/bedework/appvar[key='monthViewMode']/value='cal' or 
    816                                not(/bedework/appvar[key='monthViewMode']))) or 
    817                               (/bedework/periodname='Week' and 
    818                               (/bedework/appvar[key='weekViewMode']/value='cal' or 
    819                                not(/bedework/appvar[key='weekViewMode'])))"> 
    820                <xsl:choose> 
    821                  <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    822                    <img src="{$resourcesRoot}/resources/std-button-summary-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
    823                  </xsl:when> 
    824                  <xsl:otherwise> 
    825                    <img src="{$resourcesRoot}/resources/std-button-details-off.gif" width="62" height="21" border="0" alt="only summaries of events supported in this view"/> 
    826                  </xsl:otherwise> 
    827                </xsl:choose> 
    828              </xsl:when> 
    829              <xsl:otherwise> 
    830                <xsl:choose> 
    831                  <xsl:when test="/bedework/appvar[key='summaryMode']/value='details'"> 
    832                    <a href="{$setup}&amp;setappvar=summaryMode(summary)" title="toggle summary/detailed view"> 
    833                      <img src="{$resourcesRoot}/resources/std-button-summary.gif" width="62" height="21" border="0" alt="toggle summary/detailed view"/> 
    834                    </a> 
    835                  </xsl:when> 
    836                  <xsl:otherwise> 
    837                    <a href="{$setup}&amp;setappvar=summaryMode(details)" title="toggle summary/detailed view"> 
    838                      <img src="{$resourcesRoot}/resources/std-button-details.gif" width="62" height="21" border="0" alt="toggle summary/detailed view"/> 
    839                    </a> 
    840                  </xsl:otherwise> 
    841                </xsl:choose> 
    842              </xsl:otherwise> 
    843            </xsl:choose> 
    844  
    845            <!-- refresh button --> 
    846            <a href="{$setup}"><img src="{$resourcesRoot}/resources/std-button-refresh.gif" width="70" height="21" border="0" alt="refresh view"/></a> 
    847          </td> 
    848        </tr> 
    849     </table> 
    850   </xsl:template> 
    851  
    852   <xsl:template name="actionIcons"> 
    853     <xsl:param name="startDate"/> 
    854     <xsl:param name="actionIconsId"/> 
    855     <br/> 
    856     <div id="{$actionIconsId}" class="invisible"> 
    857        <a href="{$initEvent}&amp;entityType=event&amp;startdate={$startDate}" title="add event" onclick="javascript:changeClass('{$actionIconsId}','invisible')"> 
    858           <img src="{$resourcesRoot}/resources/add2mycal-icon-small.gif" width="12" height="16" border="0" alt="add event"/> 
    859           add event 
    860        </a> 
    861        <a href="{$event-initMeeting}&amp;entityType=event&amp;schedule=request&amp;startdate={$startDate}" title="schedule a meeting" onclick="javascript:changeClass('{$actionIconsId}','invisible')"> 
    862           <img src="{$resourcesRoot}/resources/std-icalMeeting-icon-small.gif" width="12" height="16" border="0" alt="schedule meeting"/> 
    863           schedule meeting 
    864        </a> 
    865        <a href="{$initEvent}&amp;entityType=task&amp;startdate={$startDate}" title="add task" onclick="javascript:changeClass('{$actionIconsId}','invisible')"> 
    866           <img src="{$resourcesRoot}/resources/std-icalTask-icon-small.gif" width="12" height="16" border="0" alt="add task"/> 
    867           add task 
    868        </a> 
    869        <a href="{$event-initMeeting}&amp;entityType=task&amp;schedule=request&amp;startdate={$startDate}" title="schedule a task" onclick="javascript:changeClass('{$actionIconsId}','invisible')"> 
    870           <img src="{$resourcesRoot}/resources/std-icalSchTask-icon-small.gif" width="12" height="16" border="0" alt="schedule task"/> 
    871           schedule task 
    872        </a> 
    873        <a href="{$initUpload}" title="upload event" onclick="javascript:changeClass('{$actionIconsId}','invisible')"> 
    874           <img src="{$resourcesRoot}/resources/std-icalUpload-icon-small.gif" width="12" height="16" border="0" alt="upload event"/> 
    875           upload 
    876        </a> 
    877      </div> 
    878   </xsl:template> 
    879  
    880355 
    881356  <!--==== SINGLE EVENT ====--> 
     
    18211296  </xsl:template> 
    18221297 
    1823   <xsl:template match="calendar" mode="myCalendars"> 
    1824     <xsl:variable name="id" select="id"/> 
    1825     <li> 
    1826       <xsl:attribute name="class"> 
    1827         <xsl:choose> 
    1828           <xsl:when test="/bedework/selectionState/selectionType = 'calendar' 
    1829                           and path = /bedework/selectionState/subscriptions/subscription/calendar/path">selected</xsl:when> 
    1830           <xsl:when test="name='Trash'">trash</xsl:when> 
    1831           <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    1832           <xsl:otherwise>calendar</xsl:otherwise> 
    1833         </xsl:choose> 
    1834       </xsl:attribute> 
    1835       <xsl:variable name="calPath" select="path"/> 
    1836       <a href="{$setSelection}&amp;calUrl={$calPath}"> 
    1837         <xsl:value-of select="name"/> 
    1838       </a> 
    1839       <xsl:if test="calendar"> 
    1840         <ul> 
    1841           <xsl:apply-templates select="calendar" mode="myCalendars"/> 
    1842         </ul> 
    1843       </xsl:if> 
    1844       <xsl:if test="calendarCollection='true'"> 
    1845         <!-- set the start date for adding an event to the first day of the 
    1846              given period, the hour of "now", and give a duration of 60 minutes --> 
    1847         <xsl:variable name="startDate"><xsl:value-of select="/bedework/firstday/date"/>T<xsl:value-of select="substring(/bedework/now/time,1,2)"/>0000</xsl:variable> 
    1848         <!-- skip setting duration for now; this should be set in the user's prefs--> 
    1849         <!-- <a href="{$initEvent}&amp;startdate={$startDate}&amp;newCalPath={$calPath}&amp;minutes=60" class="calendarAdd" title="add event"> --> 
    1850         <a href="{$initEvent}&amp;startdate={$startDate}&amp;newCalPath={$calPath}" class="calendarAdd" title="add event"> 
    1851           <img src="{$resourcesRoot}/resources/addEvent-forCals-icon.gif" width="9" height="12" border="0" alt="add event"/> 
    1852         </a> 
    1853       </xsl:if> 
    1854     </li> 
    1855   </xsl:template> 
    1856  
    1857   <xsl:template match="calendar" mode="mySpecialCalendars"> 
    1858     <!-- calTypes: Trash = 2, Deleted = 3, Busy = 4, Inbox = 5, Outbox = 6  --> 
    1859     <xsl:variable name="id" select="id"/> 
    1860     <li> 
    1861       <xsl:attribute name="class"> 
    1862         <xsl:choose> 
    1863           <xsl:when test="/bedework/selectionState/selectionType = 'calendar' 
    1864                           and path = /bedework/selectionState/subscriptions/subscription/calendar/path">selected</xsl:when> 
    1865           <xsl:when test="calType='2' or calType='3'">trash</xsl:when> 
    1866           <xsl:when test="calType='5'">inbox</xsl:when> 
    1867           <xsl:when test="calType='6'">outbox</xsl:when> 
    1868           <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    1869           <xsl:otherwise>calendar</xsl:otherwise> 
    1870         </xsl:choose> 
    1871       </xsl:attribute> 
    1872       <xsl:variable name="calPath" select="path"/> 
    1873         <xsl:choose> 
    1874           <xsl:when test="calType='5'"> 
    1875             <a href="{$showInbox}" title="incoming scheduling requests"> 
    1876               <xsl:value-of select="name"/> 
    1877             </a> 
    1878             <xsl:text> </xsl:text> 
    1879             <xsl:if test="/bedework/inboxState/numActive != '0'"> 
    1880               <span class="inoutboxActive">(<xsl:value-of select="/bedework/inboxState/numActive"/>)</span> 
    1881             </xsl:if> 
    1882           </xsl:when> 
    1883           <xsl:when test="calType='6'"> 
    1884             <a href="{$showOutbox}" title="outgoing scheduling requests"> 
    1885               <xsl:value-of select="name"/> 
    1886             </a> 
    1887             <xsl:text> </xsl:text> 
    1888             <xsl:if test="/bedework/outboxState/numActive != '0'"> 
    1889               <span class="inoutboxActive">(<xsl:value-of select="/bedework/outboxState/numActive"/>)</span> 
    1890             </xsl:if> 
    1891           </xsl:when> 
    1892           <xsl:otherwise> 
    1893             <a href="{$setSelection}&amp;calUrl={$calPath}"> 
    1894               <xsl:attribute name="title"> 
    1895                 <xsl:choose> 
    1896                   <xsl:when test="calType = 2">Contains items you have access to delete.</xsl:when> 
    1897                   <xsl:when test="calType = 3">Used to mask items you do not have access to truly delete, such as many subscribed events.</xsl:when> 
    1898                 </xsl:choose> 
    1899               </xsl:attribute> 
    1900               <xsl:value-of select="name"/> 
    1901             </a> 
    1902           </xsl:otherwise> 
    1903         </xsl:choose> 
    1904       <xsl:if test="calendar"> 
    1905         <ul> 
    1906           <xsl:apply-templates select="calendar" mode="myCalendars"/> 
    1907         </ul> 
    1908       </xsl:if> 
    1909     </li> 
    1910   </xsl:template> 
    1911  
    1912  
    1913  
    19141298  <xsl:template match="calendars" mode="exportCalendars"> 
    19151299    <h2>Export Calendars as iCal</h2> 
     
    20411425              </xsl:for-each> 
    20421426            </ul> 
    2043           </td> 
    2044         </tr> 
    2045       </table> 
    2046     </form> 
    2047   </xsl:template> 
    2048  
    2049   <xsl:template match="subscription" mode="mySubscriptions"> 
    2050     <li> 
    2051       <xsl:attribute name="class"> 
    2052         <xsl:choose> 
    2053           <xsl:when test="/bedework/selectionState/selectionType = 'subscription' 
    2054                           and /bedework/selectionState/subscriptions/subscription/name = name">selected</xsl:when> 
    2055           <xsl:when test="calendarDeleted = 'true'">deleted</xsl:when> 
    2056           <xsl:otherwise>calendar</xsl:otherwise> 
    2057         </xsl:choose> 
    2058       </xsl:attribute> 
    2059       <xsl:variable name="subName" select="name"/> 
    2060       <xsl:if test="style != '' and style != 'default'"> 
    2061         <!-- the spacer gif approach allows us to avoid some IE misbehavior --> 
    2062         <xsl:variable name="subStyle" select="style"/> 
    2063         <img src="{$resourcesRoot}/resources/spacer.gif" width="6" height="6" alt="subscription style" class="subStyle {$subStyle}"/> 
    2064       </xsl:if> 
    2065       <xsl:choose> 
    2066         <xsl:when test="calendarDeleted = 'true'"> 
    2067           <a href="{$subscriptions-inaccessible}" title="underlying calendar is inaccessible"> 
    2068             <xsl:value-of select="name"/> 
    2069           </a> 
    2070         </xsl:when> 
    2071         <xsl:otherwise> 
    2072           <a href="{$setSelection}&amp;subname={$subName}"> 
    2073             <xsl:value-of select="name"/> 
    2074           </a> 
    2075         </xsl:otherwise> 
    2076       </xsl:choose> 
    2077       <xsl:if test="calendars/calendar/calendarCollection='true' and 
    2078                     calendars/calendar/currentAccess/current-user-privilege-set/privilege/write-content"> 
    2079         <!-- set the start date for adding an event to the first day of the 
    2080              given period, the hour of "now", and give a duration of 60 minutes --> 
    2081         <xsl:variable name="calPath" select="calendars/calendar/encodedPath"/> 
    2082         <xsl:variable name="startDate"><xsl:value-of select="/bedework/firstday/date"/>T<xsl:value-of select="substring(/bedework/now/time,1,2)"/>0000</xsl:variable> 
    2083         <a href="{$initEvent}&amp;startdate={$startDate}&amp;newCalPath={$calPath}&amp;minutes=60" class="calendarAdd" title="add event"> 
    2084           <img src="{$resourcesRoot}/resources/addEvent-forCals-icon.gif" width="9" height="12" border="0" alt="add event"/> 
    2085         </a> 
    2086       </xsl:if> 
    2087     </li> 
    2088   </xsl:template> 
    2089  
    2090   <xsl:template name="subInaccessible"> 
    2091     <h2 class="bwStatusConfirmed">Inaccessible</h2> 
    2092     <div class="noEventsCell"> 
    2093       <p> 
    2094         <strong>This subscription cannot be displayed.</strong><br/> 
    2095         The underlying calendar 
    2096         is inaccessible. 
    2097       </p> 
    2098       <p> 
    2099         Possible causes: 
    2100       </p> 
    2101       <ol> 
    2102         <li>Access control was changed, and you may no longer access the underlying calendar.</li> 
    2103         <li>The underlying calendar was deleted.</li> 
    2104       </ol> 
    2105     </div> 
    2106   </xsl:template> 
    2107  
    2108   <!--==== ALARM OPTIONS ====--> 
    2109   <xsl:template name="alarmOptions"> 
    2110     <form method="post" action="{$setAlarm}" id="standardForm"> 
    2111       <input type="hidden" name="updateAlarmOptions" value="true"/> 
    2112       <table class="common" cellspacing="0"> 
    2113         <tr> 
    2114           <th colspan="2" class="commonHeader">Alarm options</th> 
    2115         </tr> 
    2116         <tr> 
    2117           <td class="fieldname"> 
    2118             Alarm Date/Time: 
    2119             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmTriggerSelectorDate/*"/> 
    2120           </td> 
    2121           <td class="fieldval"> 
    2122             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmdate/*"/> 
    2123             <span class="std-text">at  </span> 
    2124             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmtime/*"/> 
    2125           </td> 
    2126         </tr> 
    2127         <tr> 
    2128           <td class="fieldname"> 
    2129             or Before/After event: 
    2130             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmTriggerSelectorDuration/*"/> 
    2131           </td> 
    2132           <td align="left"> 
    2133             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmduration/days/*"/> 
    2134             days 
    2135             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmduration/hours/*"/> 
    2136             hours 
    2137             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmduration/minutes/*"/> 
    2138             minutes 
    2139             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmduration/seconds/*"/> 
    2140             seconds OR: 
    2141             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmduration/weeks/*"/> 
    2142             weeks 
    2143             &#160; 
    2144             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmDurationBefore/*"/> 
    2145             before 
    2146             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmDurationAfter/*"/> 
    2147             after 
    2148             &#160; 
    2149             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmDurationRelStart/*"/> 
    2150             start 
    2151             <xsl:copy-of select="/bedework/alarmoptionsform/form/alarmDurationRelEnd/*"/> 
    2152             end 
    2153           </td> 
    2154         </tr> 
    2155         <tr> 
    2156           <td> 
    2157             Email Address: 
    2158           </td> 
    2159           <td align="left"> 
    2160             <xsl:copy-of select="/bedework/alarmoptionsform/form/email/*"/> 
    2161           </td> 
    2162         </tr> 
    2163         <tr> 
    2164           <td> 
    2165             Subject: 
    2166           </td> 
    2167           <td align="left"> 
    2168             <xsl:copy-of select="/bedework/alarmoptionsform/form/subject/*"/> 
    2169           </td> 
    2170         </tr> 
    2171         <tr> 
    2172           <td>&#160;</td> 
    2173           <td> 
    2174             <input name="submit" type="submit" value="Continue"/>&#160; 
    2175             <input name="cancelled" type="submit" value="cancel"/> 
    2176           </td> 
    2177         </tr> 
    2178       </table> 
    2179     </form> 
    2180   </xsl:template> 
    2181  
    2182   <!--==== UPLOAD ====--> 
    2183   <xsl:template name="upload"> 
    2184   <!-- The name "eventForm" is referenced by several javascript functions. Do not 
    2185     change it without modifying bedework.js --> 
    2186     <form name="eventForm" method="post" action="{$upload}" id="standardForm"  enctype="multipart/form-data"> 
    2187       <h2>Upload iCAL File</h2> 
    2188       <table class="common" cellspacing="0"> 
    2189         <tr> 
    2190           <td class="fieldname"> 
    2191             Filename: 
    2192           </td> 
    2193           <td align="left"> 
    2194             <input type="file" name="uploadFile" size="60" /> 
    2195           </td> 
    2196         </tr> 
    2197         <tr> 
    2198           <td class="fieldname padMeTop"> 
    2199             Into calendar: 
    2200           </td> 
    2201           <td align="left" class="padMeTop"> 
    2202             <input type="hidden" name="newCalPath" id="bwNewCalPathField" value=""/> 
    2203             <span id="bwEventCalDisplay"> 
    2204               <em>default calendar</em> 
    2205             </span> 
    2206             <xsl:call-template name="selectCalForEvent"/> 
    2207           </td> 
    2208         </tr> 
    2209         <tr> 
    2210           <td class="fieldname padMeTop"> 
    2211             Effects free/busy: 
    2212           </td> 
    2213           <td align="left" class="padMeTop"> 
    2214             <input type="radio" value="" name="transparency" checked="checked"/> accept event's settings<br/> 
    2215             <input type="radio" value="OPAQUE" name="transparency"/> yes <span class="note">(opaque: event status affects your free/busy)</span><br/> 
    2216             <input type="radio" value="TRANSPARENT" name="transparency"/> no <span class="note">(transparent: event status does not affect your free/busy)</span><br/> 
    2217           </td> 
    2218         </tr> 
    2219         <tr> 
    2220           <td class="fieldname padMeTop"> 
    2221             Status: 
    2222           </td> 
    2223           <td align="left" class="padMeTop"> 
    2224             <input type="radio" value="" name="status" checked="checked"/> accept event's status<br/> 
    2225             <input type="radio" value="CONFIRMED" name="status"/> confirmed<br/> 
    2226             <input type="radio" value="TENTATIVE" name="status"/> tentative<br/> 
    2227             <input type="radio" value="CANCELLED" name="status"/> cancelled<br/> 
    2228           </td> 
    2229         </tr> 
    2230       </table> 
    2231       <table border="0" id="submitTable"> 
    2232         <tr> 
    2233           <td> 
    2234             <input name="submit" type="submit" value="Continue"/> 
    2235             <input name="cancelled" type="submit" value="cancel"/> 
    22361427          </td> 
    22371428        </tr> 
     
    36572848  </xsl:template> 
    36582849 
    3659   <!--==== STAND-ALONE PAGES ====--> 
    3660   <!-- not currently in use --> 
    3661   <xsl:template name="selectPage"> 
    3662     <!-- <xsl:choose> 
    3663       <xsl:when test="/bedework/appvar[key='page']"> 
    3664         <xsl:choose> 
    3665           <xsl:otherwise> 
    3666             <xsl:call-template name="noPage"/> 
    3667           </xsl:otherwise> 
    3668         </xsl:choose> 
    3669       </xsl:when> 
    3670       <xsl:otherwise> --> 
    3671         <xsl:call-template name="noPage"/> 
    3672       <!--</xsl:otherwise> 
    3673     </xsl:choose>--> 
    3674   </xsl:template> 
    3675  
    3676   <xsl:template name="noPage"> 
    3677     <p> 
    3678       Error: there is no page with that name.  Please select a navigational 
    3679       link to continue. 
    3680     </p> 
    3681   </xsl:template> 
    3682  
    36832850  <!--==== UTILITY TEMPLATES ====--> 
    36842851 
     
    37172884  </xsl:template> 
    37182885 
    3719   <!-- return string values to be loaded into javascript for access control 
    3720        forms, method 2 --> 
    3721   <xsl:template match="ace" mode="initJS"><!-- 
    3722   --><xsl:variable name="who"><!-- 
    3723    --><xsl:choose> 
    3724         <xsl:when test="invert"> 
    3725           <xsl:choose> 
    3726             <xsl:when test="invert/principal/href"><xsl:value-of select="normalize-space(invert/principal/href)"/></xsl:when> 
    3727             <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    3728             <xsl:otherwise><xsl:value-of select="name(invert/principal/*)"/></xsl:otherwise> 
    3729           </xsl:choose> 
    3730         </xsl:when> 
    3731         <xsl:otherwise> 
    3732           <xsl:choose> 
    3733             <xsl:when test="principal/href"><xsl:value-of select="normalize-space(principal/href)"/></xsl:when> 
    3734             <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    3735             <xsl:otherwise><xsl:value-of select="name(principal/*)"/></xsl:otherwise> 
    3736           </xsl:choose> 
    3737         </xsl:otherwise> 
    3738       </xsl:choose><!-- 
    3739   --></xsl:variable><!-- 
    3740   --><xsl:variable name="whoType"><!-- 
    3741    --><xsl:choose> 
    3742         <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)">user</xsl:when> 
    3743         <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 
    3744         <xsl:when test="$who='authenticated'">auth</xsl:when> 
    3745         <xsl:when test="$who='unauthenticated'">unauth</xsl:when> 
    3746         <xsl:when test="$who='all'">all</xsl:when> 
    3747         <xsl:when test="invert/principal/property/owner">other</xsl:when> 
    3748         <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    3749         <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    3750         <xsl:otherwise></xsl:otherwise> 
    3751       </xsl:choose><!-- 
    3752  --></xsl:variable><!-- 
    3753  --><xsl:variable name="aclString"><!-- 
    3754    --><xsl:if test="grant"><!-- 
    3755      --><xsl:for-each select="grant/*"><xsl:call-template name="grantDenyToInternal"><xsl:with-param name="name"><xsl:value-of select="name(.)"/></xsl:with-param></xsl:call-template></xsl:for-each><!-- 
    3756    --></xsl:if><!-- 
    3757    --><xsl:if test="deny"><!-- 
    3758      --><xsl:for-each select="deny/*">-<xsl:call-template name="grantDenyToInternal"><xsl:with-param name="name"><xsl:value-of select="name(.)"/></xsl:with-param></xsl:call-template></xsl:for-each><!-- 
    3759    --></xsl:if><!-- 
    3760  --></xsl:variable><!-- 
    3761  --><xsl:variable name="inherited"><!-- 
    3762    --><xsl:choose> 
    3763        <xsl:when test="inherited"><xsl:value-of select="inherited/href"/></xsl:when> 
    3764        <xsl:otherwise></xsl:otherwise> 
    3765      </xsl:choose><!-- 
    3766   --></xsl:variable><!-- 
    3767   --><xsl:variable name="invert"><!-- 
    3768     --><xsl:choose> 
    3769          <xsl:when test="invert">true</xsl:when> 
    3770          <xsl:otherwise>false</xsl:otherwise> 
    3771        </xsl:choose><!-- 
    3772   --></xsl:variable> 
    3773   <!-- now initialize the object:--> 
    3774     bwAcl.init('<xsl:value-of select="$who"/>','<xsl:value-of select="$whoType"/>','<xsl:value-of select="$aclString"/>','<xsl:value-of select="$inherited"/>','<xsl:value-of select="$invert"/>'); 
    3775   </xsl:template> 
    3776  
    3777   <xsl:template name="grantDenyToInternal"><!-- 
    3778   --><xsl:param name="name"/><!-- 
    3779   --><xsl:choose> 
    3780        <xsl:when test="$name = 'all'">A</xsl:when> 
    3781        <xsl:when test="$name = 'read'">R</xsl:when> 
    3782        <xsl:when test="$name = 'read-acl'">r</xsl:when> 
    3783        <xsl:when test="$name = 'read-cuurrent-user-privilege-set'">P</xsl:when> 
    3784        <xsl:when test="$name = 'read-free-busy'">F</xsl:when> 
    3785        <xsl:when test="$name = 'write'">W</xsl:when> 
    3786        <xsl:when test="$name = 'write-acl'">a</xsl:when> 
    3787        <xsl:when test="$name = 'write-properties'">p</xsl:when> 
    3788        <xsl:when test="$name = 'write-content'">c</xsl:when> 
    3789        <xsl:when test="$name = 'bind'">b</xsl:when> 
    3790        <xsl:when test="$name = 'schedule'">S</xsl:when> 
    3791        <xsl:when test="$name = 'schedule-request'">t</xsl:when> 
    3792        <xsl:when test="$name = 'schedule-reply'">y</xsl:when> 
    3793        <xsl:when test="$name = 'schedule-free-busy'">s</xsl:when> 
    3794        <xsl:when test="$name = 'unbind'">u</xsl:when> 
    3795        <xsl:when test="$name = 'unlock'">U</xsl:when> 
    3796        <xsl:when test="$name = 'none'">N</xsl:when> 
    3797      </xsl:choose><!-- 
    3798 --></xsl:template> 
    37992886 
    38002887  <!-- search and replace template taken from 
     
    38202907  </xsl:template> 
    38212908 
    3822   <!--==== FOOTER ====--> 
    3823   <xsl:template name="footer"> 
    3824     <div id="footer"> 
    3825       Demonstration calendar; place footer information here. 
    3826     </div> 
    3827     <table id="skinSelectorTable" border="0" cellpadding="0" cellspacing="0"> 
    3828       <tr> 
    3829         <td class="leftCell"> 
    3830           <a href="http://www.bedework.org/">Bedework Website</a> | 
    3831           <a href="?noxslt=yes">show XML</a> | 
    3832           <a href="?refreshXslt=yes">refresh XSLT</a> 
    3833         </td> 
    3834         <td class="rightCell"> 
    3835           <!--<form name="skinSelectForm" method="post" action="{$setup}"> 
    3836             skin selector: 
    3837             <select name="skinNameSticky" onchange="submit()"> 
    3838               <option>select a skin</option> 
    3839               <option value="default">Demo Calendar</option> 
    3840               <option value="rensselaer">Rensselaer</option> 
    3841               <option value="washington">Washington</option> 
    3842             </select> 
    3843           </form>--> 
    3844         </td> 
    3845       </tr> 
    3846     </table> 
    3847   </xsl:template> 
    38482909</xsl:stylesheet>