Changeset 1995

Show
Ignore:
Timestamp:
12/23/08 22:39:09
Author:
johnsa
Message:

admin client: further updates to new subscription UI

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/deployment/resources/xsl/default/default/messages.xsl

    r1730 r1995  
    7272      </xsl:when> 
    7373      <xsl:when test="id='org.bedework.client.message.deleted.calendar'"> 
    74         Calendar/folder deleted. 
     74        Item deleted. 
    7575      </xsl:when> 
    7676      <xsl:when test="id='org.bedework.client.message.deleted.category'"> 
  • trunk/deployment/webadmin/webapp/resources/default/default/default.xsl

    r1994 r1995  
    150150  <xsl:variable name="subscriptions-fetchForUpdate" select="/bedework/urlPrefixes/subscriptions/fetchForUpdate/a/@href"/> 
    151151  <xsl:variable name="subscriptions-initAdd" select="/bedework/urlPrefixes/subscriptions/initAdd/a/@href"/> 
    152   <xsl:variable name="subscriptions-subscribe" select="/bedework/urlPrefixes/subscriptions/subscribe/a/@href"/> 
     152  <xsl:variable name="subscriptions-update" select="/bedework/urlPrefixes/subscriptions/update/a/@href"/> 
    153153  <xsl:variable name="subscriptions-openCloseMod" select="/bedework/urlPrefixes/subscriptions/subOpenCloseMod/a/@href"/> 
    154154  <!-- views --> 
     
    33953395 
    33963396  <xsl:template match="currentCalendar" mode="addCalendar"> 
    3397     <h3>Add Calendar / Folder</h3> 
    3398     <form name="addCalForm" method="post" action="{$calendar-update}"
    3399       <table class="eventFormTable"> 
     3397    <h3>Add Calendar, Folder, or Subscription</h3> 
     3398    <form name="addCalForm" method="post" action="{$calendar-update}" onsubmit="setCalendarAlias(this)"
     3399      <table class="common"> 
    34003400        <tr> 
    34013401          <th>Name:</th> 
     
    34153415          <th>Description:</th> 
    34163416          <td> 
     3417            <textarea name="calendar.description" cols="30" rows="4"> 
     3418              <xsl:value-of select="desc"/> 
     3419              <xsl:if test="normalize-space(desc) = ''"> 
     3420                <xsl:text> </xsl:text> 
     3421                <!-- keep this non-breaking space to avoid browser 
     3422                rendering errors when the text area is empty --> 
     3423              </xsl:if> 
     3424            </textarea> 
     3425          </td> 
     3426        </tr> 
     3427        <tr> 
     3428          <th>Color:</th> 
     3429          <td> 
     3430            <select name="calendar.color"> 
     3431              <option value="">default</option> 
     3432              <xsl:for-each select="document('subColors.xml')/subscriptionColors/color"> 
     3433                <xsl:variable name="subColor" select="@rgb"/> 
     3434                <xsl:variable name="subColorClass" select="."/> 
     3435                <option value="{$subColor}" class="{$subColorClass}"> 
     3436                  <xsl:value-of select="@name"/> 
     3437                </option> 
     3438              </xsl:for-each> 
     3439            </select> 
     3440          </td> 
     3441        </tr> 
     3442        <tr> 
     3443          <th>Filter Expression:</th> 
     3444          <td> 
     3445            <input type="text" name="calendar.fexpr" value="" size="40"/> 
     3446          </td> 
     3447        </tr> 
     3448        <tr> 
     3449          <th>Type:</th> 
     3450          <td> 
     3451            <!-- we will set the value of "calendarCollection on submit. 
     3452                 Value is false only for folders, so we default it to true here.  --> 
     3453            <input type="hidden" value="true" name="calendarCollection"/> 
     3454            <!-- type is defaulted to calendar.  It is changed when a typeSwitch is clicked. --> 
     3455            <input type="hidden" value="calendar" name="type" id="bwCalType"/> 
     3456            <input type="radio" value="calendar" name="typeSwitch" checked="checked" onclick="changeClass('subscriptionTypes','invisible');setField('bwCalType',this.value);"/> Calendar 
     3457            <input type="radio" value="folder" name="typeSwitch" onclick="changeClass('subscriptionTypes','invisible');setField('bwCalType',this.value);"/> Folder 
     3458            <input type="radio" value="subscription" name="typeSwitch" onclick="changeClass('subscriptionTypes','visible');setField('bwCalType',this.value);"/> Subscription 
     3459          </td> 
     3460        </tr> 
     3461      </table> 
     3462      <div class="submitButtons"> 
     3463        <input type="submit" name="addCalendar" value="Add"/> 
     3464        <input type="submit" name="cancelled" value="cancel"/> 
     3465      </div> 
     3466      <div id="subscriptionTypes" class="invisible"> 
     3467        <!-- If we are making a subscription, we will set the hidden value of "aliasUri" based 
     3468             on the subscription type. --> 
     3469        <input type="hidden" name="aliasUri" value=""/> 
     3470        <p> 
     3471          <strong>Subscription Type:</strong><br/> 
     3472          <!-- subType is defaulted to public.  It is changed when a subTypeSwitch is clicked. --> 
     3473          <input type="hidden" value="public" name="subType" id="bwSubType"/> 
     3474          <input type="radio" name="subTypeSwitch" value="public" checked="checked" onclick="changeClass('subscriptionTypePublic','visible');changeClass('subscriptionTypeExternal','invisible');changeClass('subscriptionTypeUser','invisible');setField('bwSubType',this.value);"/> Public calendar (alias) 
     3475          <!-- input type="radio" name="subTypeSwitch" value="user" onclick="changeClass('subscriptionTypePublic','invisible');changeClass('subscriptionTypeExternal','invisible');changeClass('subscriptionTypeUser','visible');setField('bwSubType',this.value);"/> User calendar--> 
     3476          <input type="radio" name="subTypeSwitch" value="external" onclick="changeClass('subscriptionTypePublic','invisible');changeClass('subscriptionTypeExternal','visible');changeClass('subscriptionTypeUser','invisible');setField('bwSubType',this.value);"/> URL 
     3477        </p> 
     3478 
     3479        <div id="subscriptionTypePublic"> 
     3480          <input type="hidden" value="" name="publicAliasHolder" id="publicAliasHolder"/> 
     3481          <div id="bwPublicCalDisplay"> 
     3482            Select the public calendar or folder: 
     3483          </div> 
     3484          <ul id="publicSubscriptionTree"> 
     3485            <xsl:apply-templates select="/bedework/publicCalendars/calendar" mode="selectCalForPublicAliasCalTree"/> 
     3486          </ul> 
     3487        </div> 
     3488 
     3489        <div id="subscriptionTypeUser" class="invisible"> 
     3490          <table class="common"> 
     3491            <tr> 
     3492              <th>User's ID:</th> 
     3493              <td> 
     3494                <input type="text" name="userIdHolder" value="" size="40"/> 
     3495              </td> 
     3496            </tr> 
     3497            <tr> 
     3498              <th>Calendar Path:</th> 
     3499              <td> 
     3500                <input type="text" name="userCalHolder" value="calendar" size="40"/><br/> 
     3501                <span class="note">E.g. "calendar" (default) or "someFolder/someCalendar"</span> 
     3502              </td> 
     3503            </tr> 
     3504          </table> 
     3505        </div> 
     3506 
     3507 
     3508        <div class="invisible" id="subscriptionTypeExternal"> 
     3509          <table class="common"> 
     3510            <tr> 
     3511              <th>URL to calendar:</th> 
     3512              <td> 
     3513                <input type="text" name="aliasUriHolder" id="aliasUriHolder" value="" size="40"/> 
     3514              </td> 
     3515            </tr> 
     3516            <tr> 
     3517              <th>ID (if required):</th> 
     3518              <td> 
     3519                <input type="text" name="remoteId" value="" size="40"/> 
     3520              </td> 
     3521            </tr> 
     3522            <tr> 
     3523              <th>Password (if required):</th> 
     3524              <td> 
     3525                <input type="password" name="remotePw" value="" size="40"/> 
     3526              </td> 
     3527            </tr> 
     3528          </table> 
     3529        </div> 
     3530      </div> 
     3531 
     3532    </form> 
     3533 
     3534    <div id="sharingBox"> 
     3535      <h3>Current Access:</h3> 
     3536      Sharing may be added to a calendar once created. 
     3537    </div> 
     3538  </xsl:template> 
     3539 
     3540  <xsl:template match="currentCalendar" mode="modCalendar"> 
     3541    <xsl:variable name="calPath" select="path"/> 
     3542    <xsl:variable name="calPathEncoded" select="encodedPath"/> 
     3543 
     3544    <form name="modCalForm" method="post" action="{$calendar-update}"> 
     3545      <xsl:choose> 
     3546        <xsl:when test="isSubscription='true'"> 
     3547          <h3>Modify Subscription</h3> 
     3548          <input type="hidden" value="true" name="calendarCollection"/> 
     3549        </xsl:when> 
     3550        <xsl:when test="calendarCollection='true'"> 
     3551          <h3>Modify Calendar</h3> 
     3552          <input type="hidden" value="true" name="calendarCollection"/> 
     3553        </xsl:when> 
     3554        <xsl:otherwise> 
     3555          <h3>Modify Folder</h3> 
     3556          <input type="hidden" value="false" name="calendarCollection"/> 
     3557        </xsl:otherwise> 
     3558      </xsl:choose> 
     3559      <table class="common"> 
     3560        <tr> 
     3561          <th class="commonHeader" colspan="2"> 
     3562            <xsl:value-of select="path"/> 
     3563          </th> 
     3564        </tr> 
     3565        <tr> 
     3566          <th>Name:</th> 
     3567          <td> 
     3568            <xsl:value-of select="name"/> 
     3569          </td> 
     3570        </tr> 
     3571        <!-- tr> 
     3572          <th>Mailing List ID:</th> 
     3573          <td> 
     3574            <xsl:value-of select="mailListId"/> 
     3575          </td> 
     3576        </tr --> 
     3577        <tr> 
     3578          <th>Summary:</th> 
     3579          <td> 
     3580            <xsl:variable name="curCalSummary" select="summary"/> 
     3581            <input type="text" name="calendar.summary" value="{$curCalSummary}" size="40"/> 
     3582          </td> 
     3583        </tr> 
     3584        <tr> 
     3585          <th>Description:</th> 
     3586          <td> 
    34173587            <textarea name="calendar.description" cols="40" rows="4"> 
    34183588              <xsl:value-of select="desc"/> 
     3589              <xsl:if test="normalize-space(desc) = ''"> 
     3590                <xsl:text> </xsl:text> 
     3591                <!-- keep this non-breaking space to avoid browser 
     3592                rendering errors when the text area is empty --> 
     3593              </xsl:if> 
    34193594            </textarea> 
    34203595          </td> 
    34213596        </tr> 
    34223597        <tr> 
    3423           <th>Calendar/Folder:</th> 
     3598          <th>Color:</th> 
     3599          <td> 
     3600            <input type="text" name="calendar.color" value="" size="40"> 
     3601              <xsl:attribute name="value"><xsl:value-of select="color"/></xsl:attribute> 
     3602            </input> 
     3603          </td> 
     3604        </tr> 
     3605        <tr> 
     3606          <th>Filter Expression:</th> 
     3607          <td> 
     3608            <input type="text" name="calendar.fexpr" value="" size="40"> 
     3609              <xsl:attribute name="value"><xsl:value-of select="filterExpr"/></xsl:attribute> 
     3610            </input> 
     3611          </td> 
     3612        </tr> 
     3613        <xsl:if test="isSubscription = 'true'"> 
     3614          <tr> 
     3615            <th>URL:</th> 
     3616            <td> 
     3617              <input name="aliasUri" value="" size="40"> 
     3618                <xsl:attribute name="value"><xsl:value-of select="aliasUri"/></xsl:attribute> 
     3619              </input> 
     3620            </td> 
     3621          </tr> 
     3622          <xsl:if test="externalSub = 'true'"> 
     3623            <tr> 
     3624              <th>Id (if required):</th> 
     3625              <td> 
     3626                <input name="remoteId" value="" size="40"/> 
     3627              </td> 
     3628            </tr> 
     3629            <tr> 
     3630              <th>Password (if required):</th> 
     3631              <td> 
     3632                <input type="password" name="remotePw" value="" size="40"/> 
     3633              </td> 
     3634            </tr> 
     3635          </xsl:if> 
     3636        </xsl:if> 
     3637      </table> 
     3638 
     3639      <table border="0" id="submitTable"> 
     3640        <tr> 
    34243641          <td> 
    34253642            <xsl:choose> 
    3426               <xsl:when test="calendarCollection='true'"> 
    3427                 <input type="radio" value="true" name="calendarCollection" checked="checked"/> Calendar 
    3428                 <input type="radio" value="false" name="calendarCollection"/> Folder 
     3643              <xsl:when test="isSubscription='true'"> 
     3644                <input type="submit" name="updateCalendar" value="Update Subscription"/> 
    34293645              </xsl:when> 
    3430               <xsl:otherwise> 
    3431                 <input type="radio" value="true" name="calendarCollection"/> Calendar 
    3432                 <input type="radio" value="false" name="calendarCollection" checked="checked"/> Folder 
    3433               </xsl:otherwise> 
    3434             </xsl:choose> 
    3435           </td> 
    3436         </tr> 
    3437       </table> 
    3438  
    3439       <table border="0" id="submitTable"> 
    3440         <tr> 
    3441           <td> 
    3442             <input type="submit" name="addCalendar" value="Add Calendar/Folder"/> 
    3443             <input type="submit" name="cancelled" value="Cancel"/> 
    3444           </td> 
    3445         </tr> 
    3446       </table> 
    3447     </form> 
    3448     <div id="sharingBox"> 
    3449       <h3>Sharing</h3> 
    3450       Sharing may be added to a calendar once created. 
    3451     </div> 
    3452   </xsl:template> 
    3453  
    3454   <xsl:template match="currentCalendar" mode="modCalendar"> 
    3455     <xsl:choose> 
    3456       <xsl:when test="calendarCollection='true'"> 
    3457         <h3>Modify Calendar</h3> 
    3458       </xsl:when> 
    3459       <xsl:otherwise> 
    3460         <h3>Modify Folder</h3> 
    3461       </xsl:otherwise> 
    3462     </xsl:choose> 
    3463     <form name="modCalForm" action="{$calendar-update}" method="post"> 
    3464       <table class="eventFormTable"> 
    3465         <tr> 
    3466           <th>Path:</th> 
    3467           <td> 
    3468             <xsl:value-of select="path"/> 
    3469             <xsl:text> </xsl:text> 
    3470             <a href="{$calendar-move}">move</a> 
    3471           </td> 
    3472         </tr> 
    3473         <tr> 
    3474           <th>Name:</th> 
    3475           <td> 
    3476             <xsl:value-of select="name"/> 
    3477           </td> 
    3478         </tr> 
    3479         <tr> 
    3480           <th>Mailing List ID:</th> 
    3481           <td> 
    3482             <xsl:value-of select="mailListId"/> 
    3483           </td> 
    3484         </tr> 
    3485         <tr> 
    3486           <th>Summary:</th> 
    3487           <td> 
    3488             <xsl:variable name="curCalSummary" select="summary"/> 
    3489             <input type="text" name="calendar.summary" value="{$curCalSummary}" size="40"/> 
    3490           </td> 
    3491         </tr> 
    3492         <tr> 
    3493           <th>Description:</th> 
    3494           <td> 
    3495             <textarea name="calendar.description" cols="40" rows="4"> 
    3496               <xsl:value-of select="desc"/> 
    3497             </textarea> 
    3498           </td> 
    3499         </tr> 
    3500         <tr> 
    3501           <th>Calendar/Folder:</th> 
    3502           <td> 
    3503             <xsl:choose> 
    3504               <xsl:when test="calendarCollection='true'"> 
    3505                 <input type="radio" value="true" name="calendarCollection" checked="checked"/> Calendar 
    3506                 <input type="radio" value="false" name="calendarCollection"/> Folder 
    3507               </xsl:when> 
    3508               <xsl:otherwise> 
    3509                 <input type="radio" value="true" name="calendarCollection"/> Calendar 
    3510                 <input type="radio" value="false" name="calendarCollection" checked="checked"/> Folder 
    3511               </xsl:otherwise> 
    3512             </xsl:choose> 
    3513           </td> 
    3514         </tr> 
    3515       </table> 
    3516  
    3517       <table border="0" id="submitTable"> 
    3518         <tr> 
    3519           <td> 
    3520             <xsl:choose> 
    35213646              <xsl:when test="calendarCollection='true'"> 
    35223647                <input type="submit" name="updateCalendar" value="Update Calendar"/> 
     
    35263651              </xsl:otherwise> 
    35273652            </xsl:choose> 
    3528             <input type="submit" name="cancelled" value="Cancel"/> 
     3653            <input type="submit" name="cancelled" value="cancel"/> 
    35293654          </td> 
    35303655          <td align="right"> 
    35313656            <xsl:choose> 
     3657              <xsl:when test="isSubscription='true'"> 
     3658                <input type="submit" name="delete" value="Delete Subscription"/> 
     3659              </xsl:when> 
    35323660              <xsl:when test="calendarCollection='true'"> 
    35333661                <input type="submit" name="delete" value="Delete Calendar"/> 
     
    35413669      </table> 
    35423670    </form> 
    3543  
    3544  
    35453671    <div id="sharingBox"> 
    35463672      <xsl:apply-templates select="acl" mode="currentAccess"> 
    35473673        <xsl:with-param name="action" select="$calendar-setAccess"/> 
    3548         <xsl:with-param name="calPathEncoded" select="encodedPath"/> 
     3674        <xsl:with-param name="calPathEncoded" select="$calPathEncoded"/> 
    35493675      </xsl:apply-templates> 
    3550       <form name="calendarShareForm" action="{$calendar-setAccess}" id="shareForm" onsubmit="setAccessHow(this)" method="post"> 
    3551         <input type="hidden" name="calPath"> 
    3552           <xsl:attribute name="value"><xsl:value-of select="path"/></xsl:attribute> 
    3553         </input> 
     3676      <form name="calendarShareForm" method="post" action="{$calendar-setAccess}" id="shareForm" onsubmit="setAccessHow(this)"> 
     3677        <input type="hidden" name="calPath" value="{$calPath}"/> 
    35543678        <xsl:call-template name="entityAccessForm"> 
    35553679          <xsl:with-param name="type"> 
     
    35633687      </form> 
    35643688    </div> 
    3565  
    3566     <!--<div id="sharingBox"> 
    3567       <xsl:variable name="calPath" select="path"/> 
    3568       <xsl:variable name="encodedCalPath" select="encodedPath"/> 
    3569       <xsl:if test="currentAccess/current-user-privilege-set/privilege/read-acl or /bedework/userInfo/superUser='true'"> 
    3570         <h3>Sharing</h3> 
    3571         <table class="common" id="sharing"> 
    3572           <tr> 
    3573             <th class="commonHeader">Who:</th> 
    3574             <th class="commonHeader">Current access:</th> 
    3575             <th class="commonHeader">Source:</th> 
    3576           </tr> 
    3577           <xsl:for-each select="acl/ace"> 
    3578             <xsl:variable name="who"> 
    3579               <xsl:choose> 
    3580                 <xsl:when test="invert"> 
    3581                   <xsl:choose> 
    3582                     <xsl:when test="invert/principal/href"><xsl:value-of select="normalize-space(invert/principal/href)"/></xsl:when> 
    3583                     <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    3584                     <xsl:otherwise><xsl:value-of select="name(invert/principal/*)"/></xsl:otherwise> 
    3585                   </xsl:choose> 
    3586                 </xsl:when> 
    3587                 <xsl:otherwise> 
    3588                   <xsl:choose> 
    3589                     <xsl:when test="principal/href"><xsl:value-of select="normalize-space(principal/href)"/></xsl:when> 
    3590                     <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    3591                     <xsl:otherwise><xsl:value-of select="name(principal/*)"/></xsl:otherwise> 
    3592                   </xsl:choose> 
    3593                 </xsl:otherwise> 
    3594               </xsl:choose> 
    3595             </xsl:variable> 
    3596             <tr> 
    3597             <th class="thin"> 
    3598                 <xsl:if test="invert"> 
    3599                   Not 
    3600                 </xsl:if> 
    3601                 <xsl:choose> 
    3602                   <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)"> 
    3603                     <img src="{$resourcesRoot}/resources/userIcon.gif" width="13" height="13" border="0" alt="user"/> 
    3604                     <xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/userPrincipalRoot)),'/')"/> 
    3605                   </xsl:when> 
    3606                   <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)"> 
    3607                     <img src="{$resourcesRoot}/resources/groupIcon.gif" width="13" height="13" border="0" alt="group"/> 
    3608                     <xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/groupPrincipalRoot)),'/')"/> 
    3609                   </xsl:when> 
    3610                   <xsl:when test="invert and $who='owner'"> 
    3611                     <xsl:value-of select="$who"/> (other) 
    3612                   </xsl:when> 
    3613                   <xsl:otherwise> 
    3614                     <xsl:value-of select="$who"/> 
    3615                   </xsl:otherwise> 
    3616                 </xsl:choose> 
    3617               </th> 
    3618               <td> 
    3619                 <xsl:for-each select="grant/privilege/node()"> 
    3620                   <xsl:value-of select="name(.)"/>&#160;&#160; 
    3621                 </xsl:for-each> 
    3622                 <xsl:for-each select="deny/privilege/node()"> 
    3623                   <xsl:choose> 
    3624                     <xsl:when test="name(.)='all'"> 
    3625                       none 
    3626                     </xsl:when> 
    3627                     <xsl:otherwise> 
    3628                       deny-<xsl:value-of select="name(.)"/> 
    3629                     </xsl:otherwise> 
    3630                   </xsl:choose> 
    3631                   &#160;&#160; 
    3632                 </xsl:for-each> 
    3633               </td> 
    3634               <td> 
    3635                 <xsl:choose> 
    3636                   <xsl:when test="inherited"> 
    3637                     inherited from: 
    3638                     <a> 
    3639                       <xsl:attribute name="href"><xsl:value-of select="$calendar-fetchForUpdate"/>&amp;calPath=<xsl:value-of select="inherited/href"/></xsl:attribute> 
    3640                       <xsl:value-of select="inherited/href"/> 
    3641                     </a> 
    3642                   </xsl:when> 
    3643                   <xsl:otherwise> 
    3644                     local: 
    3645                     <xsl:variable name="whoType"> 
    3646                       <xsl:choose> 
    3647                         <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)">user</xsl:when> 
    3648                         <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 
    3649                         <xsl:when test="$who='authenticated'">auth</xsl:when> 
    3650                         <xsl:when test="$who='unauthenticated'">unauth</xsl:when> 
    3651                         <xsl:when test="invert/principal/property/owner">other</xsl:when> 
    3652                         <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    3653                         <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    3654                         <xsl:otherwise></xsl:otherwise> 
    3655                       </xsl:choose> 
    3656                     </xsl:variable> 
    3657                     <xsl:variable name="shortWho"> 
    3658                       <xsl:choose> 
    3659                         <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/userPrincipalRoot)),'/')"/></xsl:when> 
    3660                         <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/groupPrincipalRoot)),'/')"/></xsl:when> 
    3661                         <xsl:otherwise></xsl:otherwise>--> <!-- if not user or group, send no who --> 
    3662         <!--              </xsl:choose> 
    3663                     </xsl:variable> 
    3664                     <xsl:choose> 
    3665                       <xsl:when test="invert"> 
    3666                         <a href="{$calendar-setAccess}&amp;calPath={$encodedCalPath}&amp;how=default&amp;who={$shortWho}&amp;whoType={$whoType}&amp;notWho=yes"> 
    3667                           reset to default 
    3668                         </a> 
    3669                       </xsl:when> 
    3670                       <xsl:otherwise> 
    3671                         <a href="{$calendar-setAccess}&amp;calPath={$encodedCalPath}&amp;how=default&amp;who={$shortWho}&amp;whoType={$whoType}"> 
    3672                           reset to default 
    3673                         </a> 
    3674                       </xsl:otherwise> 
    3675                     </xsl:choose> 
    3676                   </xsl:otherwise> 
    3677                 </xsl:choose> 
    3678               </td> 
    3679             </tr> 
    3680           </xsl:for-each> 
    3681         </table> 
    3682       </xsl:if> 
    3683  
    3684       <xsl:if test="currentAccess/current-user-privilege-set/privilege/write-acl or /bedework/userInfo/superUser='true'"> 
    3685         <form name="calendarShareForm" action="{$calendar-setAccess}" id="shareForm" method="post"> 
    3686           <input type="hidden" name="calPath" value="{$calPath}"/> 
    3687           <table cellspacing="0" id="shareFormTable" class="common"> 
    3688             <tr> 
    3689               <th colspan="2" class="commonHeader">Set access:</th> 
    3690             </tr> 
    3691             <tr class="subhead"> 
    3692               <th>Who:</th> 
    3693               <th>Rights:</th> 
    3694             </tr> 
    3695             <tr> 
    3696               <td> 
    3697                 <input type="text" name="who" size="20"/> 
    3698                 <br/> 
    3699                 <input type="radio" value="user" name="whoType" checked="checked"/> user 
    3700                 <input type="radio" value="group" name="whoType"/> group 
    3701                 <p>OR</p> 
    3702                 <p> 
    3703                   <input type="radio" value="auth" name="whoType"/> all authorized users<br/> 
    3704                   <input type="radio" value="other" name="whoType"/> other users<br/> 
    3705                   <input type="radio" value="owner" name="whoType"/> owner 
    3706                 </p>--> 
    3707                 <!-- we may never use the invert action ...it is probably 
    3708                      too confusing, and can be achieved in other ways --> 
    3709                 <!-- 
    3710                 <p class="padTop"> 
    3711                   <input type="checkbox" value="yes" name="notWho"/> invert (deny) 
    3712                 </p>--> 
    3713               <!--</td> 
    3714               <td> 
    3715                 <ul id="howList"> 
    3716                   <li> 
    3717                     <input type="radio" value="A" name="how"/> 
    3718                     <strong>All</strong> (read, write, delete)</li> 
    3719                   <li class="padTop"> 
    3720                     <input type="radio" value="R" name="how" checked="checked"/> 
    3721                     <strong>Read</strong> (content, access, freebusy) 
    3722                   </li> 
    3723                   <li> 
    3724                     <input type="radio" value="f" name="how"/> Read freebusy only 
    3725                   </li> 
    3726                   <li class="padTop"> 
    3727                     <input type="radio" value="Rc" name="how"/> 
    3728                     <strong>Read</strong> and <strong>Write content only</strong> 
    3729                   </li> 
    3730                   <li class="padTop"> 
    3731                     <input type="radio" value="W" name="how"/> 
    3732                     <strong>Write and delete</strong> (content, access, properties) 
    3733                   </li> 
    3734                   <li> 
    3735                     <input type="radio" value="c" name="how"/> Write content only 
    3736                   </li> 
    3737                   <li> 
    3738                     <input type="radio" value="u" name="how"/> Delete only 
    3739                   </li> 
    3740                   <li class="padTop"> 
    3741                     <input type="radio" value="N" name="how"/> 
    3742                     <strong>None</strong> 
    3743                   </li>--> 
    3744                   <!-- 
    3745                   <li class="padTop"> 
    3746                     <input type="radio" value="default" name="how"/> 
    3747                     <strong>Restore default access</strong> 
    3748                   </li>--> 
    3749                 <!--</ul> 
    3750               </td> 
    3751             </tr> 
    3752           </table> 
    3753           <input type="submit" name="submit" value="Submit"/> 
    3754         </form> 
    3755       </xsl:if> 
    3756     </div>--> 
    37573689  </xsl:template> 
    37583690 
     
    45534485  </xsl:template> 
    45544486 
    4555   <xsl:template match="calendar" mode="subscribe"> 
    4556     <xsl:variable name="calPath" select="encodedPath"/> 
    4557     <xsl:variable name="itemClass"> 
     4487  <xsl:template match="currentCalendar" mode="addSubscription"> 
     4488    <h3>Add Subscription or Folder</h3> 
     4489    <form name="addCalForm" method="post" action="{$subscriptions-update}" onsubmit="setCalendarAlias(this)"> 
     4490      <table class="common"> 
     4491        <tr> 
     4492          <th>Name:</th> 
     4493          <td> 
     4494            <xsl:variable name="curCalName" select="name"/> 
     4495            <input name="calendar.name" value="{$curCalName}" size="40"/> 
     4496          </td> 
     4497        </tr> 
     4498        <tr> 
     4499          <th>Summary:</th> 
     4500          <td> 
     4501            <xsl:variable name="curCalSummary" select="summary"/> 
     4502            <input type="text" name="calendar.summary" value="{$curCalSummary}" size="40"/> 
     4503          </td> 
     4504        </tr> 
     4505        <tr> 
     4506          <th>Description:</th> 
     4507          <td> 
     4508            <textarea name="calendar.description" cols="30" rows="4"> 
     4509              <xsl:value-of select="desc"/> 
     4510              <xsl:if test="normalize-space(desc) = ''"> 
     4511                <xsl:text> </xsl:text> 
     4512                <!-- keep this non-breaking space to avoid browser 
     4513                rendering errors when the text area is empty --> 
     4514              </xsl:if> 
     4515            </textarea> 
     4516          </td> 
     4517        </tr> 
     4518        <tr> 
     4519          <th>Color:</th> 
     4520          <td> 
     4521            <select name="calendar.color"> 
     4522              <option value="">default</option> 
     4523              <xsl:for-each select="document('subColors.xml')/subscriptionColors/color"> 
     4524                <xsl:variable name="subColor" select="@rgb"/> 
     4525                <xsl:variable name="subColorClass" select="."/> 
     4526                <option value="{$subColor}" class="{$subColorClass}"> 
     4527                  <xsl:value-of select="@name"/> 
     4528                </option> 
     4529              </xsl:for-each> 
     4530            </select> 
     4531          </td> 
     4532        </tr> 
     4533        <tr> 
     4534          <th>Filter Expression:</th> 
     4535          <td> 
     4536            <input type="text" name="calendar.fexpr" value="" size="40"/> 
     4537          </td> 
     4538        </tr> 
     4539        <tr> 
     4540          <th>Type:</th> 
     4541          <td> 
     4542            <!-- we will set the value of "calendarCollection on submit. 
     4543                 Value is false only for folders, so we default it to true here.  --> 
     4544            <input type="hidden" value="true" name="calendarCollection"/> 
     4545            <!-- type is defaulted to calendar.  It is changed when a typeSwitch is clicked. --> 
     4546            <input type="hidden" value="calendar" name="type" id="bwCalType"/> 
     4547            <!-- input type="radio" value="calendar" name="typeSwitch" checked="checked" onclick="changeClass('subscriptionTypes','invisible');setField('bwCalType',this.value);"/> Calendar--> 
     4548            <input type="radio" value="folder" name="typeSwitch" onclick="changeClass('subscriptionTypes','invisible');setField('bwCalType',this.value);"/> Folder 
     4549            <input type="radio" value="subscription" name="typeSwitch" onclick="changeClass('subscriptionTypes','visible');setField('bwCalType',this.value);"/> Subscription 
     4550          </td> 
     4551        </tr> 
     4552      </table> 
     4553      <div class="submitButtons"> 
     4554        <input type="submit" name="addCalendar" value="Add"/> 
     4555        <input type="submit" name="cancelled" value="cancel"/> 
     4556      </div> 
     4557      <div id="subscriptionTypes" class="invisible"> 
     4558        <!-- If we are making a subscription, we will set the hidden value of "aliasUri" based 
     4559             on the subscription type. --> 
     4560        <input type="hidden" name="aliasUri" value=""/> 
     4561        <p> 
     4562          <strong>Subscription Type:</strong><br/> 
     4563          <!-- subType is defaulted to public.  It is changed when a subTypeSwitch is clicked. --> 
     4564          <input type="hidden" value="public" name="subType" id="bwSubType"/> 
     4565          <input type="radio" name="subTypeSwitch" value="public" checked="checked" onclick="changeClass('subscriptionTypePublic','visible');changeClass('subscriptionTypeExternal','invisible');changeClass('subscriptionTypeUser','invisible');setField('bwSubType',this.value);"/> Public calendar (alias) 
     4566          <!-- input type="radio" name="subTypeSwitch" value="user" onclick="changeClass('subscriptionTypePublic','invisible');changeClass('subscriptionTypeExternal','invisible');changeClass('subscriptionTypeUser','visible');setField('bwSubType',this.value);"/> User calendar--> 
     4567          <input type="radio" name="subTypeSwitch" value="external" onclick="changeClass('subscriptionTypePublic','invisible');changeClass('subscriptionTypeExternal','visible');changeClass('subscriptionTypeUser','invisible');setField('bwSubType',this.value);"/> URL 
     4568        </p> 
     4569 
     4570        <div id="subscriptionTypePublic"> 
     4571          <input type="hidden" value="" name="publicAliasHolder" id="publicAliasHolder"/> 
     4572          <div id="bwPublicCalDisplay"> 
     4573            Select the public calendar or folder: 
     4574          </div> 
     4575          <ul id="publicSubscriptionTree"> 
     4576            <xsl:apply-templates select="/bedework/publicCalendars/calendar" mode="selectCalForPublicAliasCalTree"/> 
     4577          </ul> 
     4578        </div> 
     4579 
     4580        <div id="subscriptionTypeUser" class="invisible"> 
     4581          <table class="common"> 
     4582            <tr> 
     4583              <th>User's ID:</th> 
     4584              <td> 
     4585                <input type="text" name="userIdHolder" value="" size="40"/> 
     4586              </td> 
     4587            </tr> 
     4588            <tr> 
     4589              <th>Calendar Path:</th> 
     4590              <td> 
     4591                <input type="text" name="userCalHolder" value="calendar" size="40"/><br/> 
     4592                <span class="note">E.g. "calendar" (default) or "someFolder/someCalendar"</span> 
     4593              </td> 
     4594            </tr> 
     4595          </table> 
     4596        </div> 
     4597 
     4598 
     4599        <div class="invisible" id="subscriptionTypeExternal"> 
     4600          <table class="common"> 
     4601            <tr> 
     4602              <th>URL to calendar:</th> 
     4603              <td> 
     4604                <input type="text" name="aliasUriHolder" id="aliasUriHolder" value="" size="40"/> 
     4605              </td> 
     4606            </tr> 
     4607            <tr> 
     4608              <th>ID (if required):</th> 
     4609              <td> 
     4610                <input type="text" name="remoteId" value="" size="40"/> 
     4611              </td> 
     4612            </tr> 
     4613            <tr> 
     4614              <th>Password (if required):</th> 
     4615              <td> 
     4616                <input type="password" name="remotePw" value="" size="40"/> 
     4617              </td> 
     4618            </tr> 
     4619          </table> 
     4620        </div> 
     4621      </div> 
     4622 
     4623    </form> 
     4624 
     4625    <div id="sharingBox"> 
     4626      <h3>Current Access:</h3> 
     4627      Sharing may be added to a calendar once created. 
     4628    </div> 
     4629  </xsl:template> 
     4630 
     4631  <xsl:template match="currentCalendar" mode="modSubscription"> 
     4632    <xsl:variable name="calPath" select="path"/> 
     4633    <xsl:variable name="calPathEncoded" select="encodedPath"/> 
     4634 
     4635    <form name="modCalForm" method="post" action="{$subscriptions-update}"> 
    45584636      <xsl:choose> 
    4559         <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    4560         <xsl:otherwise>calendar</xsl:otherwise> 
     4637        <xsl:when test="isSubscription='true'"> 
     4638          <h3>Modify Subscription</h3> 
     4639          <input type="hidden" value="true" name="calendarCollection"/> 
     4640        </xsl:when> 
     4641        <xsl:when test="calendarCollection='true'"> 
     4642          <h3>Modify Calendar</h3> 
     4643          <input type="hidden" value="true" name="calendarCollection"/> 
     4644        </xsl:when> 
     4645        <xsl:otherwise> 
     4646          <h3>Modify Folder</h3> 
     4647          <input type="hidden" value="false" name="calendarCollection"/> 
     4648        </xsl:otherwise> 
    45614649      </xsl:choose> 
    4562     </xsl:variable> 
    4563     <li class="{$itemClass}"> 
    4564       <xsl:if test="calendarCollection='false'"> 
    4565         <!-- test the open state of the folder; if it's open, 
    4566              build a URL to close it and vice versa --> 
    4567         <xsl:choose> 
    4568           <xsl:when test="open = 'true'"> 
    4569             <a href="{$subscriptions-openCloseMod}&amp;calPath={$calPath}&amp;open=false"> 
    4570               <img src="{$resourcesRoot}/resources/minus.gif" width="9" height="9" alt="close" border="0" class="bwPlusMinusIcon"/> 
    4571             </a> 
    4572           </xsl:when> 
    4573           <xsl:otherwise> 
    4574             <a href="{$subscriptions-openCloseMod}&amp;calPath={$calPath}&amp;open=true"> 
    4575               <img src="{$resourcesRoot}/resources/plus.gif" width="9" height="9" alt="open" border="0" class="bwPlusMinusIcon"/> 
    4576             </a> 
    4577           </xsl:otherwise> 
    4578         </xsl:choose> 
    4579       </xsl:if> 
    4580       <a href="{$subscriptions-initAdd}&amp;calPath={$calPath}"> 
    4581         <xsl:value-of select="name"/> 
    4582       </a> 
    4583       <xsl:if test="calendar"> 
    4584         <ul> 
    4585           <xsl:apply-templates select="calendar" mode="subscribe"> 
    4586             <!--<xsl:sort select="title" order="ascending" case-order="upper-first"/>--></xsl:apply-templates> 
    4587         </ul> 
    4588       </xsl:if> 
    4589     </li> 
    4590   </xsl:template> 
    4591  
    4592   <xsl:template match="subscription" mode="addSubscription"> 
    4593     <h2>Add New Subscription</h2> 
    4594     <p class="note">*the subsciption name must be unique</p> 
    4595     <form name="subscribeForm" action="{$subscriptions-subscribe}" method="post"> 
    4596       <table class="eventFormTable"> 
    4597         <tr> 
    4598           <th>Name*:</th> 
    4599           <td> 
    4600             <xsl:variable name="subName" select="name"/> 
    4601             <input type="text" value="{$subName}" name="subscription.name" size="60"/> 
    4602           </td> 
    4603         </tr> 
    4604         <xsl:if test="internal='false'"> 
     4650      <table class="common"> 
     4651        <tr> 
     4652          <th class="commonHeader" colspan="2"> 
     4653            <xsl:value-of select="path"/> 
     4654          </th> 
     4655        </tr> 
     4656        <tr> 
     4657          <th>Name:</th> 
     4658          <td> 
     4659            <xsl:value-of select="name"/> 
     4660          </td> 
     4661        </tr> 
     4662        <!-- tr> 
     4663          <th>Mailing List ID:</th> 
     4664          <td> 
     4665            <xsl:value-of select="mailListId"/> 
     4666          </td> 
     4667        </tr --> 
     4668        <tr> 
     4669          <th>Summary:</th> 
     4670          <td> 
     4671            <xsl:variable name="curCalSummary" select="summary"/> 
     4672            <input type="text" name="calendar.summary" value="{$curCalSummary}" size="40"/> 
     4673          </td> 
     4674        </tr> 
     4675        <tr> 
     4676          <th>Description:</th> 
     4677          <td> 
     4678            <textarea name="calendar.description" cols="40" rows="4"> 
     4679              <xsl:value-of select="desc"/> 
     4680              <xsl:if test="normalize-space(desc) = ''"> 
     4681                <xsl:text> </xsl:text> 
     4682                <!-- keep this non-breaking space to avoid browser 
     4683                rendering errors when the text area is empty --> 
     4684              </xsl:if> 
     4685            </textarea> 
     4686          </td> 
     4687        </tr> 
     4688        <tr> 
     4689          <th>Color:</th> 
     4690          <td> 
     4691            <input type="text" name="calendar.color" value="" size="40"> 
     4692              <xsl:attribute name="value"><xsl:value-of select="color"/></xsl:attribute> 
     4693            </input> 
     4694          </td> 
     4695        </tr> 
     4696        <tr> 
     4697          <th>Filter Expression:</th> 
     4698          <td> 
     4699            <input type="text" name="calendar.fexpr" value="" size="40"> 
     4700              <xsl:attribute name="value"><xsl:value-of select="filterExpr"/></xsl:attribute> 
     4701            </input> 
     4702          </td> 
     4703        </tr> 
     4704        <xsl:if test="isSubscription = 'true'"> 
    46054705          <tr> 
    4606             <th>Uri:</th> 
     4706            <th>URL:</th> 
    46074707            <td> 
    4608               <xsl:variable name="subUri" select="uri"/> 
    4609               <input type="text" value="{$subUri}" name="subscription.uri" size="60"/> 
     4708              <input name="aliasUri" value="" size="40"> 
     4709                <xsl:attribute name="value"><xsl:value-of select="aliasUri"/></xsl:attribute> 
     4710              </input> 
    46104711            </td> 
    46114712          </tr> 
     4713          <xsl:if test="externalSub = 'true'"> 
     4714            <tr> 
     4715              <th>Id (if required):</th> 
     4716              <td> 
     4717                <input name="remoteId" value="" size="40"/> 
     4718              </td> 
     4719            </tr> 
     4720            <tr> 
     4721              <th>Password (if required):</th> 
     4722              <td> 
     4723                <input type="password" name="remotePw" value="" size="40"/> 
     4724              </td> 
     4725            </tr> 
     4726          </xsl:if> 
    46124727        </xsl:if> 
    4613         <tr> 
    4614           <th>Display:</th> 
    4615           <td> 
    4616             <input type="radio" value="true" name="subscription.display" checked="checked"/> yes 
    4617             <input type="radio" value="false" name="subscription.display"/> no 
    4618           </td> 
    4619         </tr> 
    4620         <xsl:if test="/bedework/userInfo/superUser='true'"> 
    4621           <tr> 
    4622             <th>Unremovable:</th> 
    4623             <td> 
    4624               <input type="radio" value="true" name="unremoveable" size="60"/> true 
    4625               <input type="radio" value="false" name="unremoveable" size="60" checked="checked"/> false 
    4626             </td> 
    4627           </tr> 
    4628         </xsl:if> 
    4629         <tr> 
    4630           <th>Style:</th> 
    4631           <td> 
    4632             <xsl:variable name="subStyle" select="style"/> 
    4633             <input type="text" value="{$subStyle}" name="subscription.style" size="50"/> 
    4634             <div style="width: 400px"> 
    4635               Enter a css class to style events rendered in the list and grid 
    4636               views.  Leave blank to render with the default colors, or select from 
    4637               one of the system-wide choices: 
    4638               <select name="bwColors" onchange="document.subscribeForm['subscription.style'].value = this.value"> 
    4639                 <option value="">default</option> 
    4640                 <xsl:for-each select="document('subColors.xml')/subscriptionColors/color"> 
    4641                   <xsl:variable name="subColor" select="."/> 
    4642                   <option value="{$subColor}" class="{$subColor}"> 
    4643                     <xsl:value-of select="@name"/> 
    4644                   </option> 
    4645                 </xsl:for-each> 
    4646               </select> 
    4647               <p class="note">Note: This class is added alongside the default class used 
    4648               in the list and grid views.  It does not replace it, so create your 
    4649               style appropriately.</p> 
    4650             </div> 
    4651           </td> 
    4652         </tr> 
    46534728      </table> 
     4729 
    46544730      <table border="0" id="submitTable"> 
    46554731        <tr> 
    46564732          <td> 
    4657             <input type="submit" name="addSubscription" value="Add Subscription"/> 
    4658             <input type="submit" name="cancelled" value="Cancel"/> 
     4733            <xsl:choose> 
     4734              <xsl:when test="isSubscription='true'"> 
     4735                <input type="submit" name="updateCalendar" value="Update Subscription"/> 
     4736              </xsl:when> 
     4737              <xsl:when test="calendarCollection='true'"> 
     4738                <input type="submit" name="updateCalendar" value="Update Calendar"/> 
     4739              </xsl:when> 
     4740              <xsl:otherwise> 
     4741                <input type="submit" name="updateCalendar" value="Update Folder"/> 
     4742              </xsl:otherwise> 
     4743            </xsl:choose> 
     4744            <input type="submit" name="cancelled" value="cancel"/> 
     4745          </td> 
     4746          <td align="right"> 
     4747            <xsl:choose> 
     4748              <xsl:when test="isSubscription='true'"> 
     4749                <input type="submit" name="delete" value="Delete Subscription"/> 
     4750              </xsl:when> 
     4751              <xsl:when test="calendarCollection='true'"> 
     4752                <input type="submit" name="delete" value="Delete Calendar"/> 
     4753              </xsl:when> 
     4754              <xsl:otherwise> 
     4755                <input type="submit" name="delete" value="Delete Folder"/> 
     4756              </xsl:otherwise> 
     4757            </xsl:choose> 
    46594758          </td> 
    46604759        </tr> 
    46614760      </table> 
    46624761    </form> 
    4663   </xsl:template> 
    4664  
    4665   <xsl:template match="subscription" mode="modSubscription"> 
    4666     <h2>Modify Subscription</h2> 
    4667     <form name="subscribeForm" action="{$subscriptions-subscribe}" method="post"> 
    4668       <table class="eventFormTable"> 
    4669         <tr> 
    4670           <th>Name*:</th> 
    4671           <td> 
    4672             <xsl:value-of select="name"/> 
    4673             <xsl:variable name="subName" select="name"/> 
    4674             <input type="hidden" value="{$subName}" name="name"/> 
    4675           </td> 
    4676         </tr> 
    4677         <xsl:choose> 
    4678           <xsl:when test="internal='false'"> 
    4679             <tr> 
    4680               <th>Uri:</th> 
    4681               <td> 
    4682                 <xsl:variable name="subUri" select="uri"/> 
    4683                 <input type="text" value="{$subUri}" name="subscription.uri" size="60"/> 
    4684               </td> 
    4685             </tr> 
    4686           </xsl:when> 
    4687           <xsl:otherwise> 
    4688             <tr> 
    4689               <th>Uri:</th> 
    4690               <td> 
    4691                 <xsl:value-of select="uri"/> 
    4692               </td> 
    4693             </tr> 
    4694           </xsl:otherwise> 
    4695         </xsl:choose> 
    4696         <tr> 
    4697           <th>Display:</th> 
    4698           <td> 
     4762    <div id="sharingBox"> 
     4763      <xsl:apply-templates select="acl" mode="currentAccess"> 
     4764        <xsl:with-param name="action" select="$calendar-setAccess"/> 
     4765        <xsl:with-param name="calPathEncoded" select="$calPathEncoded"/> 
     4766      </xsl:apply-templates> 
     4767      <form name="calendarShareForm" method="post" action="{$calendar-setAccess}" id="shareForm" onsubmit="setAccessHow(this)"> 
     4768        <input type="hidden" name="calPath" value="{$calPath}"/> 
     4769        <xsl:call-template name="entityAccessForm"> 
     4770          <xsl:with-param name="type"> 
    46994771            <xsl:choose> 
    4700               <xsl:when test="display='true'"> 
    4701                 <input type="radio" value="true" name="subscription.display" checked="checked"/> yes 
    4702                 <input type="radio" value="false" name="subscription.display"/> no 
    4703               </xsl:when> 
    4704               <xsl:otherwise> 
    4705                 <input type="radio" value="true" name="subscription.display"/> yes 
    4706                 <input type="radio" value="false" name="subscription.display" checked="checked"/> no 
    4707               </xsl:otherwise> 
     4772              <xsl:when test="calType = '5'">inbox</xsl:when> 
     4773              <xsl:when test="calType = '6'">outbox</xsl:when> 
     4774              <xsl:otherwise>normal</xsl:otherwise> 
    47084775            </xsl:choose> 
    4709           </td> 
    4710         </tr> 
    4711         <xsl:if test="/bedework/userInfo/superUser='true'"> 
    4712           <tr> 
    4713             <th>Unremovable:</th> 
    4714             <td> 
    4715               <xsl:choose> 
    4716                 <xsl:when test="unremoveable='true'"> 
    4717                   <input type="radio" value="true" name="unremoveable" size="60" checked="checked"/> true 
    4718                   <input type="radio" value="false" name="unremoveable" size="60"/> false 
    4719                 </xsl:when> 
    4720                 <xsl:otherwise> 
    4721                   <input type="radio" value="true" name="unremoveable" size="60"/> true 
    4722                   <input type="radio" value="false" name="unremoveable" size="60" checked="checked"/> false 
    4723                 </xsl:otherwise> 
    4724               </xsl:choose> 
    4725             </td> 
    4726           </tr> 
    4727         </xsl:if> 
    4728         <tr> 
    4729           <th>Style:</th> 
    4730           <td> 
    4731             <xsl:variable name="subStyle" select="style"/> 
    4732             <input type="text" value="{$subStyle}" name="subscription.style" size="60"/> 
    4733             <div style="width: 400px"> 
    4734               Enter a css class to style events rendered in the list and grid 
    4735               views.  Leave blank to render with the default colors, or select from 
    4736               one of the system-wide choices: 
    4737               <select name="bwColors" onchange="document.subscribeForm['subscription.style'].value = this.value"> 
    4738                 <option value="">default</option> 
    4739                 <xsl:for-each select="document('subColors.xml')/subscriptionColors/color"> 
    4740                   <xsl:variable name="subColor" select="."/> 
    4741                   <option value="{$subColor}" class="{$subColor}"> 
    4742                     <xsl:value-of select="@name"/> 
    4743                   </option> 
    4744                 </xsl:for-each> 
    4745               </select> 
    4746               <p class="note">Note: This class is added alongside the default class used 
    4747               in the list and grid views.  It does not replace it, so create your 
    4748               style appropriately.</p> 
    4749             </div> 
    4750           </td> 
    4751         </tr> 
    4752       </table> 
    4753       <table border="0" id="submitTable"> 
    4754         <tr> 
    4755           <td> 
    4756             <input type="submit" name="updateSubscription" value="Update Subscription"/> 
    4757             <input type="submit" name="cancelled" value="Cancel"/> 
    4758           </td> 
    4759           <td align="right"> 
    4760             <input type="submit" name="delete" value="Delete Subscription"/> 
    4761           </td> 
    4762         </tr> 
    4763       </table> 
    4764     </form> 
    4765   </xsl:template> 
    4766  
    4767   <xsl:template name="subscriptionList"> 
    4768     <h3>Current subscriptions</h3> 
    4769     <table id="commonListTable"> 
    4770       <tr> 
    4771         <th>Name</th> 
    4772         <th>URI</th> 
    4773         <th>Style</th> 
    4774         <th>Display</th> 
    4775         <th>Unremovable</th> 
    4776         <th>External</th> 
    4777         <th>Deleted?</th> 
    4778       </tr> 
    4779       <xsl:for-each select="subscription"> 
    4780         <!--<xsl:sort select="name" order="ascending" case-order="upper-first"/>--> 
    4781         <tr> 
    4782           <td> 
    4783             <xsl:variable name="subname" select="name"/> 
    4784             <a href="{$subscriptions-fetchForUpdate}&amp;subname={$subname}"> 
    4785               <xsl:value-of select="name"/> 
    4786             </a> 
    4787           </td> 
    4788           <td> 
    4789             <xsl:value-of select="uri"/> 
    4790           </td> 
    4791           <td> 
    4792             <xsl:value-of select="style"/> 
    4793           </td> 
    4794           <td class="center"> 
    4795             <xsl:if test="display='true'"> 
    4796               <img src="{$resourcesRoot}/resources/greenCheckIcon.gif" width="13" height="13" alt="true" border="0"/> 
    4797             </xsl:if> 
    4798           </td> 
    4799           <td class="center"> 
    4800             <xsl:if test="unremoveable='true'"> 
    4801               <img src="{$resourcesRoot}/resources/redCheckIcon.gif" width="13" height="13" alt="true" border="0"/> 
    4802             </xsl:if> 
    4803           </td> 
    4804           <td class="center"> 
    4805             <xsl:if test="internal='false'"> 
    4806               <img src="{$resourcesRoot}/resources/greenCheckIcon.gif" width="13" height="13" alt="true" border="0"/> 
    4807             </xsl:if> 
    4808           </td> 
    4809           <td class="center"> 
    4810             <xsl:if test="calendarDeleted='true'"> 
    4811               <img src="{$resourcesRoot}/resources/redCheckIcon.gif" width="13" height="13" alt="true" border="0"/> 
    4812             </xsl:if> 
    4813           </td> 
    4814         </tr> 
    4815       </xsl:for-each> 
    4816     </table> 
    4817     <!--<h4><a href="{$subscriptions-initAdd}&amp;calUri=please enter a calendar uri">Subscribe to a remote calendar</a> (by URI)</h4>--> 
     4776          </xsl:with-param> 
     4777        </xsl:call-template> 
     4778      </form> 
     4779    </div> 
    48184780  </xsl:template> 
    48194781