Changeset 1999

Show
Ignore:
Timestamp:
12/30/08 17:37:27
Author:
johnsa
Message:

admin client: more updates for new subscription model, views, cleanup of deprecated code

Files:

Legend:

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

    r1997 r1999  
    165165th { 
    166166  text-align: left; 
     167  font-size: 0.9em; 
    167168} 
    168169/* mainMenuTable is deprecated */ 
     
    362363#commonListTable td.calcat { 
    363364  white-space: nowrap; 
     365} 
     366#commonListTable tr.highlight td { 
     367  background-color: #ffd; 
    364368} 
    365369.recurrenceEditLinks { 
     
    942946  list-style-image: url(../../resources/calIcon-sm.gif); 
    943947} 
     948#calendarTree  li.trash { 
     949  list-style-image: url(../../resources/trashIcon.gif); 
     950} 
     951#calendarTree  li.inbox { 
     952  list-style-image: url(../../resources/inboxIcon.gif); 
     953} 
     954#calendarTree  li.outbox { 
     955  list-style-image: url(../../resources/outboxIcon.gif); 
     956} 
     957#calendarTree  li.deleted { 
     958  list-style-image: url(../../resources/calIconDeleted-sm.gif); 
     959} 
     960#calendarTree  li.selected { 
     961  list-style-image: url(../../resources/glassFill-icon-view.gif); 
     962  font-weight: bold; 
     963} 
     964#calendarTree  li.alias { 
     965  list-style-image: url(../../resources/calIconAlias-sm.gif); 
     966  font-style: italic; 
     967  margin-left: 0; 
     968  padding-left: 0; 
     969} 
     970#calendarTree  li.aliasFolder { 
     971  list-style-image: url(../../resources/catIconAlias.gif); 
     972  font-style: italic; 
     973  margin-left: 0; 
     974  padding-left: 0; 
     975} 
     976#calendarTree  li.subscription li { 
     977  font-style: normal; 
     978} 
    944979#calendarTree a:link, 
    945980#calendarTree a:active, 
  • trunk/deployment/webadmin/webapp/resources/default/default/default.xsl

    r1997 r1999  
    32503250  <xsl:template match="calendar" mode="listForUpdate"> 
    32513251    <xsl:variable name="calPath" select="encodedPath"/> 
    3252     <xsl:variable name="itemClass"> 
    3253       <xsl:choose> 
    3254         <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    3255         <xsl:otherwise>calendar</xsl:otherwise> 
    3256       </xsl:choose> 
    3257     </xsl:variable> 
    3258     <li class="{$itemClass}"> 
    3259       <xsl:if test="calendarCollection='false'"> 
     3252    <li> 
     3253      <xsl:attribute name="class"> 
     3254        <xsl:choose> 
     3255          <xsl:when test="isSubscription = 'true'"> 
     3256            <xsl:choose> 
     3257              <xsl:when test="calType = '0'">aliasFolder</xsl:when> 
     3258              <xsl:otherwise>alias</xsl:otherwise> 
     3259            </xsl:choose> 
     3260          </xsl:when> 
     3261          <xsl:when test="calType = '0'">folder</xsl:when> 
     3262          <xsl:otherwise>calendar</xsl:otherwise> 
     3263        </xsl:choose> 
     3264      </xsl:attribute> 
     3265      <xsl:if test="calType = '0'"> 
    32603266        <!-- test the open state of the folder; if it's open, 
    32613267             build a URL to close it and vice versa --> 
     
    32763282        <xsl:value-of select="name"/> 
    32773283      </a> 
    3278       <xsl:if test="calendarCollection='false'"> 
     3284      <xsl:if test="calType = '0' and isSubscription = 'false'"> 
    32793285        <xsl:text> </xsl:text> 
    32803286        <a href="{$calendar-initAdd}&amp;calPath={$calPath}" title="add a calendar or folder"> 
     
    32823288        </a> 
    32833289      </xsl:if> 
    3284       <xsl:if test="calendar"> 
     3290      <xsl:if test="calendar and isSubscription='false'"> 
    32853291        <ul> 
    32863292          <xsl:apply-templates select="calendar" mode="listForUpdate"> 
    3287             <!--<xsl:sort select="title" order="ascending" case-order="upper-first"/>--></xsl:apply-templates> 
     3293            <xsl:sort select="name" order="ascending" case-order="upper-first"/> 
     3294          </xsl:apply-templates> 
    32883295        </ul> 
    32893296      </xsl:if> 
     
    32933300  <xsl:template match="calendar" mode="listForDisplay"> 
    32943301    <xsl:variable name="calPath" select="encodedPath"/> 
    3295     <xsl:variable name="itemClass"> 
    3296       <xsl:choose> 
    3297         <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    3298         <xsl:otherwise>calendar</xsl:otherwise> 
    3299       </xsl:choose> 
    3300     </xsl:variable> 
    3301     <li class="{$itemClass}"> 
    3302       <xsl:if test="calendarCollection='false'"> 
     3302    <li> 
     3303      <xsl:attribute name="class"> 
     3304        <xsl:choose> 
     3305          <xsl:when test="isSubscription = 'true'">alias</xsl:when> 
     3306          <xsl:when test="calType = '0'">folder</xsl:when> 
     3307          <xsl:otherwise>calendar</xsl:otherwise> 
     3308        </xsl:choose> 
     3309      </xsl:attribute> 
     3310      <xsl:if test="calType = '0'"> 
    33033311        <!-- test the open state of the folder; if it's open, 
    33043312             build a URL to close it and vice versa --> 
     
    33303338  <xsl:template match="calendar" mode="listForMove"> 
    33313339    <xsl:variable name="calPath" select="encodedPath"/> 
    3332     <xsl:if test="calendarCollection='false'"> 
     3340    <xsl:if test="calType = '0'"> 
    33333341      <li class="folder"> 
    33343342        <!-- test the open state of the folder; if it's open, 
     
    35063514    <xsl:variable name="calPathEncoded" select="encodedPath"/> 
    35073515 
    3508     <form name="modCalForm" method="post" action="{$calendar-update}"> 
     3516    <form name="modCalForm" method="post"> 
     3517      <xsl:attribute name="action"> 
     3518        <xsl:choose> 
     3519          <xsl:when test="/bedework/page = 'modSubscription'"> 
     3520             <xsl:value-of select="$subscriptions-update"/> 
     3521          </xsl:when> 
     3522          <xsl:otherwise> 
     3523             <xsl:value-of select="$calendar-update"/> 
     3524          </xsl:otherwise> 
     3525        </xsl:choose> 
     3526      </xsl:attribute> 
    35093527      <xsl:choose> 
    35103528        <xsl:when test="isSubscription='true'"> 
     
    35123530          <input type="hidden" value="true" name="calendarCollection"/> 
    35133531        </xsl:when> 
    3514         <xsl:when test="calendarCollection='true'"> 
     3532        <xsl:when test="calType = '0'"> 
     3533          <h3>Modify Folder</h3> 
     3534          <input type="hidden" value="false" name="calendarCollection"/> 
     3535        </xsl:when> 
     3536        <xsl:otherwise> 
    35153537          <h3>Modify Calendar</h3> 
    35163538          <input type="hidden" value="true" name="calendarCollection"/> 
    3517         </xsl:when> 
    3518         <xsl:otherwise> 
    3519           <h3>Modify Folder</h3> 
    3520           <input type="hidden" value="false" name="calendarCollection"/> 
    35213539        </xsl:otherwise> 
    35223540      </xsl:choose> 
     
    36083626                <input type="submit" name="updateCalendar" value="Update Subscription"/> 
    36093627              </xsl:when> 
    3610               <xsl:when test="calendarCollection='true'"> 
    3611                 <input type="submit" name="updateCalendar" value="Update Calendar"/> 
     3628              <xsl:when test="calType = '0'"> 
     3629                <input type="submit" name="updateCalendar" value="Update Folder"/> 
    36123630              </xsl:when> 
    36133631              <xsl:otherwise> 
    3614                 <input type="submit" name="updateCalendar" value="Update Folder"/> 
     3632                <input type="submit" name="updateCalendar" value="Update Calendar"/> 
    36153633              </xsl:otherwise> 
    36163634            </xsl:choose> 
     
    36223640                <input type="submit" name="delete" value="Delete Subscription"/> 
    36233641              </xsl:when> 
    3624               <xsl:when test="calendarCollection='true'"> 
    3625                 <input type="submit" name="delete" value="Delete Calendar"/> 
     3642              <xsl:when test="calType = '0'"> 
     3643                <input type="submit" name="delete" value="Delete Folder"/> 
    36263644              </xsl:when> 
    36273645              <xsl:otherwise> 
    3628                 <input type="submit" name="delete" value="Delete Folder"/> 
     3646                <input type="submit" name="delete" value="Delete Calendar"/> 
    36293647              </xsl:otherwise> 
    36303648            </xsl:choose> 
     
    36653683          <li>Folders may only contain calendars and subfolders.</li> 
    36663684          <li>Calendars may only contain events (and other calendar items).</li> 
    3667           <li> 
    3668             If a calendar is empty, it may be converted to a folder and vice 
    3669             versa.  If a calendar or folder are not empty, it may not be 
    3670             converted. 
    3671           </li> 
    36723685        </ul> 
    36733686      </li> 
     
    37163729  <xsl:template match="currentCalendar" mode="deleteCalendarConfirm"> 
    37173730    <xsl:choose> 
    3718       <xsl:when test="calendarCollection='true'"> 
    3719         <h3>Delete Calendar</h3> 
    3720         <p> 
    3721           The following calendar will be deleted.  Continue? 
    3722         </p> 
    3723       </xsl:when> 
    3724       <xsl:otherwise> 
     3731      <xsl:when test="calType = '0'"> 
    37253732        <h3>Delete Folder</h3> 
    37263733        <p> 
     
    37283735          Continue? 
    37293736        </p> 
     3737      </xsl:when> 
     3738      <xsl:otherwise> 
     3739        <h3>Delete Calendar</h3> 
     3740        <p> 
     3741          The following calendar will be deleted.  Continue? 
     3742        </p> 
    37303743      </xsl:otherwise> 
    37313744    </xsl:choose> 
     
    37663779          <td align="right"> 
    37673780            <xsl:choose> 
    3768               <xsl:when test="calendarCollection='true'"> 
    3769                 <input type="submit" name="delete" value="Yes: Delete Calendar!"/> 
     3781              <xsl:when test="calType = '0'"> 
     3782                <input type="submit" name="delete" value="Yes: Delete Folder!"/> 
    37703783              </xsl:when> 
    37713784              <xsl:otherwise> 
    3772                 <input type="submit" name="delete" value="Yes: Delete Folder!"/> 
     3785                <input type="submit" name="delete" value="Yes: Delete Calendar!"/> 
    37733786              </xsl:otherwise> 
    37743787            </xsl:choose> 
     
    38113824    <xsl:variable name="itemClass"> 
    38123825      <xsl:choose> 
    3813         <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     3826        <xsl:when test="calType = '0'">folder</xsl:when> 
    38143827        <xsl:otherwise>calendar</xsl:otherwise> 
    38153828      </xsl:choose> 
    38163829    </xsl:variable> 
    38173830    <li class="{$itemClass}"> 
    3818       <xsl:if test="calendarCollection='false'"> 
     3831      <xsl:if test="calType = '0'"> 
    38193832        <!-- test the open state of the folder; if it's open, 
    38203833             build a URL to close it and vice versa --> 
     
    38333846      </xsl:if> 
    38343847      <xsl:choose> 
    3835         <xsl:when test="currentAccess/current-user-privilege-set/privilege/write-content and (calendarCollection = 'true')"> 
     3848        <xsl:when test="currentAccess/current-user-privilege-set/privilege/write-content and (calType != '0')"> 
    38363849          <a href="javascript:updateEventFormCalendar('{$calPath}','{$calDisplay}')"> 
    38373850            <strong> 
     
    43754388          <h3>Subscription Tree</h3> 
    43764389          <ul id="calendarTree"> 
    4377             <xsl:apply-templates select="calendar" mode="listForUpdateSubscription"/> 
     4390            <xsl:apply-templates select="calendar" mode="listForUpdateSubscription"> 
     4391              <xsl:with-param name="root">true</xsl:with-param> 
     4392            </xsl:apply-templates> 
    43784393          </ul> 
    43794394        </td> 
     
    43874402            </xsl:when> 
    43884403            <xsl:otherwise> 
    4389               <xsl:apply-templates select="/bedework/currentCalendar" mode="modSubscription"/> 
     4404              <xsl:apply-templates select="/bedework/currentCalendar" mode="modCalendar"/> 
    43904405            </xsl:otherwise> 
    43914406          </xsl:choose> 
     
    44014416      <li>Select the 
    44024417      <img src="{$resourcesRoot}/resources/calAddIcon.gif" width="13" height="13" alt="true" border="0"/> 
    4403       icon to add a new subscription or folder to the tree. 
     4418      icon to add a new subscription to the tree. 
    44044419      </li> 
    44054420    </ul> 
     
    44074422 
    44084423  <xsl:template match="calendar" mode="listForUpdateSubscription"> 
     4424    <xsl:param name="root">false</xsl:param> 
    44094425    <xsl:variable name="calPath" select="encodedPath"/> 
    4410     <xsl:variable name="itemClass"> 
    4411       <xsl:choose> 
    4412         <xsl:when test="calendarCollection='false'">folder</xsl:when> 
    4413         <xsl:otherwise>calendar</xsl:otherwise> 
    4414       </xsl:choose> 
    4415     </xsl:variable> 
    4416     <li class="{$itemClass}"> 
    4417       <xsl:if test="calendarCollection='false'"> 
    4418         <!-- test the open state of the folder; if it's open, 
    4419              build a URL to close it and vice versa --> 
     4426    <li> 
     4427      <xsl:attribute name="class"> 
    44204428        <xsl:choose> 
     4429          <xsl:when test="isSubscription = 'true'"> 
     4430            <xsl:choose> 
     4431              <xsl:when test="calType = '0'">aliasFolder</xsl:when> 
     4432              <xsl:otherwise>alias</xsl:otherwise> 
     4433            </xsl:choose> 
     4434          </xsl:when> 
     4435          <xsl:when test="calType = '0'">folder</xsl:when> 
     4436          <xsl:otherwise>calendar</xsl:otherwise> 
     4437        </xsl:choose> 
     4438      </xsl:attribute> 
     4439      <!-- allow opening and closing in the subscription tree for now only on the root folder --> 
     4440      <xsl:if test="calType = '0' and $root = 'true'"> 
     4441         <xsl:choose> 
    44214442          <xsl:when test="open = 'true'"> 
    4422             <a href="{$subscriptions-openCloseMod}&amp;calPath={$calPath}&amp;open=false"> 
     4443            <a href="{$subscriptions-openCloseMod&amp;calPath={$calPath}&amp;open=false"> 
    44234444              <img src="{$resourcesRoot}/resources/minus.gif" width="9" height="9" alt="close" border="0" class="bwPlusMinusIcon"/> 
    44244445            </a> 
     
    44314452        </xsl:choose> 
    44324453      </xsl:if> 
    4433       <a href="{$subscriptions-fetchForUpdate}&amp;calPath={$calPath}" title="update"> 
    4434         <xsl:value-of select="name"/> 
    4435       </a> 
    4436       <xsl:if test="calendarCollection='false'"> 
     4454      <xsl:choose> 
     4455        <xsl:when test="$root = 'true'"> 
     4456          <!-- treat the root calendar as the root of calendar suite; don't allow edits --> 
     4457          <xsl:value-of select="/bedework/currentCalSuite/name"/> 
     4458        </xsl:when> 
     4459        <xsl:otherwise> 
     4460          <a href="{$subscriptions-fetchForUpdate}&amp;calPath={$calPath}" title="update"> 
     4461            <xsl:value-of select="name"/> 
     4462          </a> 
     4463        </xsl:otherwise> 
     4464      </xsl:choose> 
     4465      <xsl:if test="calType = '0' and isSubscription='false'"> 
    44374466        <xsl:text> </xsl:text> 
    4438         <a href="{$subscriptions-initAdd}&amp;calPath={$calPath}" title="add a subscription or folder"> 
    4439           <img src="{$resourcesRoot}/resources/calAddIcon.gif" width="13" height="13" alt="add a subscription or folder" border="0"/> 
     4467        <a href="{$subscriptions-initAdd}&amp;calPath={$calPath}" title="add a subscription"> 
     4468          <img src="{$resourcesRoot}/resources/calAddIcon.gif" width="13" height="13" alt="add a subscription" border="0"/> 
    44404469        </a> 
    44414470      </xsl:if> 
     
    45934622  </xsl:template> 
    45944623 
    4595   <xsl:template match="currentCalendar" mode="modSubscription"> 
    4596     <xsl:variable name="calPath" select="path"/> 
    4597     <xsl:variable name="calPathEncoded" select="encodedPath"/> 
    4598  
    4599     <form name="modCalForm" method="post" action="{$subscriptions-update}"> 
    4600       <xsl:choose> 
    4601         <xsl:when test="isSubscription='true'"> 
    4602           <h3>Modify Subscription</h3> 
    4603           <input type="hidden" value="true" name="calendarCollection"/> 
    4604         </xsl:when> 
    4605         <xsl:when test="calendarCollection='true'"> 
    4606           <h3>Modify Calendar</h3> 
    4607           <input type="hidden" value="true" name="calendarCollection"/> 
    4608         </xsl:when> 
    4609         <xsl:otherwise> 
    4610           <h3>Modify Folder</h3> 
    4611           <input type="hidden" value="false" name="calendarCollection"/> 
    4612         </xsl:otherwise> 
    4613       </xsl:choose> 
    4614       <table class="common"> 
    4615         <tr> 
    4616           <th class="commonHeader" colspan="2"> 
    4617             <xsl:value-of select="path"/> 
    4618           </th> 
    4619         </tr> 
    4620         <tr> 
    4621           <th>Name:</th> 
    4622           <td> 
    4623             <xsl:value-of select="name"/> 
    4624           </td> 
    4625         </tr> 
    4626         <!-- tr> 
    4627           <th>Mailing List ID:</th> 
    4628           <td> 
    4629             <xsl:value-of select="mailListId"/> 
    4630           </td> 
    4631         </tr --> 
    4632         <tr> 
    4633           <th>Summary:</th> 
    4634           <td> 
    4635             <xsl:variable name="curCalSummary" select="summary"/> 
    4636             <input type="text" name="calendar.summary" value="{$curCalSummary}" size="40"/> 
    4637           </td> 
    4638         </tr> 
    4639         <tr> 
    4640           <th>Description:</th> 
    4641           <td> 
    4642             <textarea name="calendar.description" cols="40" rows="4"> 
    4643               <xsl:value-of select="desc"/> 
    4644               <xsl:if test="normalize-space(desc) = ''"> 
    4645                 <xsl:text> </xsl:text> 
    4646                 <!-- keep this non-breaking space to avoid browser 
    4647                 rendering errors when the text area is empty --> 
    4648               </xsl:if> 
    4649             </textarea> 
    4650           </td> 
    4651         </tr> 
    4652         <tr> 
    4653           <th>Color:</th> 
    4654           <td> 
    4655             <input type="text" name="calendar.color" value="" size="40"> 
    4656               <xsl:attribute name="value"><xsl:value-of select="color"/></xsl:attribute> 
    4657             </input> 
    4658           </td> 
    4659         </tr> 
    4660         <tr> 
    4661           <th>Filter Expression:</th> 
    4662           <td> 
    4663             <input type="text" name="calendar.fexpr" value="" size="40"> 
    4664               <xsl:attribute name="value"><xsl:value-of select="filterExpr"/></xsl:attribute> 
    4665             </input> 
    4666           </td> 
    4667         </tr> 
    4668         <xsl:if test="isSubscription = 'true'"> 
    4669           <tr> 
    4670             <th>URL:</th> 
    4671             <td> 
    4672               <input name="aliasUri" value="" size="40"> 
    4673                 <xsl:attribute name="value"><xsl:value-of select="aliasUri"/></xsl:attribute> 
    4674               </input> 
    4675             </td> 
    4676           </tr> 
    4677           <xsl:if test="externalSub = 'true'"> 
    4678             <tr> 
    4679               <th>Id (if required):</th> 
    4680               <td> 
    4681                 <input name="remoteId" value="" size="40"/> 
    4682               </td> 
    4683             </tr> 
    4684             <tr> 
    4685               <th>Password (if required):</th> 
    4686               <td> 
    4687                 <input type="password" name="remotePw" value="" size="40"/> 
    4688               </td> 
    4689             </tr> 
    4690           </xsl:if> 
    4691         </xsl:if> 
    4692       </table> 
    4693  
    4694       <table border="0" id="submitTable"> 
    4695         <tr> 
    4696           <td> 
    4697             <xsl:choose> 
    4698               <xsl:when test="isSubscription='true'"> 
    4699                 <input type="submit" name="updateCalendar" value="Update Subscription"/> 
    4700               </xsl:when> 
    4701               <xsl:when test="calendarCollection='true'"> 
    4702                 <input type="submit" name="updateCalendar" value="Update Calendar"/> 
    4703               </xsl:when> 
    4704               <xsl:otherwise> 
    4705                 <input type="submit" name="updateCalendar" value="Update Folder"/> 
    4706               </xsl:otherwise> 
    4707             </xsl:choose> 
    4708             <input type="submit" name="cancelled" value="cancel"/> 
    4709           </td> 
    4710           <td align="right"> 
    4711             <xsl:choose> 
    4712               <xsl:when test="isSubscription='true'"> 
    4713                 <input type="submit" name="delete" value="Delete Subscription"/> 
    4714               </xsl:when> 
    4715               <xsl:when test="calendarCollection='true'"> 
    4716                 <input type="submit" name="delete" value="Delete Calendar"/> 
    4717               </xsl:when> 
    4718               <xsl:otherwise> 
    4719                 <input type="submit" name="delete" value="Delete Folder"/> 
    4720               </xsl:otherwise> 
    4721             </xsl:choose> 
    4722           </td> 
    4723         </tr> 
    4724       </table> 
    4725     </form> 
    4726     <div id="sharingBox"> 
    4727       <xsl:apply-templates select="acl" mode="currentAccess"> 
    4728         <xsl:with-param name="action" select="$calendar-setAccess"/> 
    4729         <xsl:with-param name="calPathEncoded" select="$calPathEncoded"/> 
    4730       </xsl:apply-templates> 
    4731       <form name="calendarShareForm" method="post" action="{$calendar-setAccess}" id="shareForm" onsubmit="setAccessHow(this)"> 
    4732         <input type="hidden" name="calPath" value="{$calPath}"/> 
    4733         <xsl:call-template name="entityAccessForm"> 
    4734           <xsl:with-param name="type"> 
    4735             <xsl:choose> 
    4736               <xsl:when test="calType = '5'">inbox</xsl:when> 
    4737               <xsl:when test="calType = '6'">outbox</xsl:when> 
    4738               <xsl:otherwise>normal</xsl:otherwise> 
    4739             </xsl:choose> 
    4740           </xsl:with-param> 
    4741         </xsl:call-template> 
    4742       </form> 
    4743     </div> 
    4744   </xsl:template> 
    4745  
    47464624  <!--+++++++++++++++ Views ++++++++++++++++++++--> 
    47474625  <xsl:template match="views" mode="viewList"> 
     4626    <!-- fix this: /user/ should be parameterized not hard-coded here --> 
     4627    <xsl:variable name="userPath">/user/<xsl:value-of select="/bedework/userInfo/user"/>/</xsl:variable> 
    47484628 
    47494629    <h3>Add a new view</h3> 
     
    47614641 
    47624642      <xsl:for-each select="view"> 
    4763         <!--<xsl:sort select="name" order="ascending" case-order="upper-first"/>--
     4643        <xsl:sort select="name" order="ascending" case-order="upper-first"/
    47644644        <tr> 
    47654645          <td> 
     
    47704650          </td> 
    47714651          <td> 
    4772             <xsl:for-each select="subscriptions/subscription"> 
    4773               <xsl:value-of select="name"/> 
    4774               <xsl:if test="position()!=last()">, </xsl:if> 
     4652            <xsl:for-each select="path"> 
     4653              <xsl:value-of select="substring-after(.,$userPath)"/> 
     4654              <xsl:if test="position()!=last()"><br/></xsl:if> 
    47754655            </xsl:for-each> 
    47764656          </td> 
     
    47814661 
    47824662  <xsl:template name="modView"> 
     4663    <xsl:variable name="viewName" select="/bedework/currentView/name"/> 
     4664    <!-- fix this: /user/ should be parameterized not hard-coded here --> 
     4665    <xsl:variable name="userPath">/user/<xsl:value-of select="/bedework/userInfo/user"/>/</xsl:variable> 
     4666 
    47834667    <h2>Update View</h2> 
    47844668 
     
    47894673    </p> 
    47904674 
    4791     <xsl:variable name="viewName" select="/bedework/views/view/name"/> 
    47924675    <h3 class="viewName"> 
    47934676      <xsl:value-of select="$viewName"/> 
     
    47994682 
    48004683          <table class="subscriptionsListSubs"> 
    4801             <xsl:for-each select="/bedework/subscriptions/subscription"> 
     4684            <xsl:for-each select="/bedework/calendars/calendar/calendar[isSubscription = 'true']"> 
    48024685              <xsl:sort select="name" order="ascending" case-order="upper-first"/> 
    4803               <xsl:if test="not(/bedework/views/view/subscriptions/subscription/name=name)"> 
     4686              <xsl:if test="not(/bedework/currentView//path = path)"> 
    48044687                <tr> 
    48054688                  <td> 
    4806                     <xsl:value-of select="name"/> 
     4689                    <xsl:value-of select="summary"/> 
    48074690                  </td> 
    48084691                  <td class="arrows"> 
    4809                     <xsl:variable name="subAddName" select="name"/> 
     4692                    <xsl:variable name="subAddName" select="encodedPath"/> 
    48104693                    <a href="{$view-update}&amp;name={$viewName}&amp;add={$subAddName}"> 
    48114694                      <img src="{$resourcesRoot}/resources/arrowRight.gif" 
     
    48224705          <h3>Active Subscriptions:</h3> 
    48234706          <table class="subscriptionsListView"> 
    4824             <xsl:for-each select="/bedework/views/view/subscriptions/subscription"> 
    4825               <xsl:sort select="name" order="ascending" case-order="upper-first"/> 
     4707            <xsl:for-each select="/bedework/currentView/path"> 
     4708              <xsl:sort select="." order="ascending" case-order="upper-first"/> 
    48264709              <tr> 
    48274710                <td class="arrows"> 
    4828                   <xsl:variable name="subRemoveName" select="name"/> 
     4711                  <xsl:variable name="subRemoveName" select="."/> 
    48294712                  <a href="{$view-update}&amp;name={$viewName}&amp;remove={$subRemoveName}"> 
    48304713                    <img src="{$resourcesRoot}/resources/arrowLeft.gif" 
     
    48344717                </td> 
    48354718                <td> 
    4836                   <xsl:value-of select="name"/> 
     4719                  <xsl:value-of select="substring-after(.,$userPath)"/> 
    48374720                </td> 
    48384721              </tr> 
     
    58095692    <h2>Choose Your Administrative Group</h2> 
    58105693 
     5694    <xsl:variable name="userInCalSuiteGroup"> 
     5695      <xsl:choose> 
     5696        <xsl:when test="/bedework/calSuites//calSuite/group = .//group/name">true</xsl:when> 
     5697        <xsl:otherwise>false</xsl:otherwise> 
     5698      </xsl:choose> 
     5699    </xsl:variable> 
     5700 
    58115701    <table id="commonListTable"> 
    5812  
    58135702      <tr> 
    58145703        <th>Name</th> 
    58155704        <th>Description</th> 
     5705        <xsl:if test="$userInCalSuiteGroup = 'true'"> 
     5706          <th>Calendar Suite*</th> 
     5707        </xsl:if> 
    58165708      </tr> 
    58175709 
    58185710      <xsl:for-each select="group"> 
    5819         <!--<xsl:sort select="name" order="ascending" case-order="upper-first"/>--> 
    5820         <tr> 
    5821           <td> 
    5822             <xsl:variable name="admGroupName" select="name"/> 
     5711        <xsl:sort select="name" order="ascending" case-order="upper-first"/> 
     5712        <xsl:variable name="admGroupName" select="name"/> 
     5713        <tr> 
     5714          <xsl:if test="name = /bedework/calSuites//calSuite/group"> 
     5715            <xsl:attribute name="class">highlight</xsl:attribute> 
     5716          </xsl:if> 
     5717          <td> 
    58235718            <a href="{$setup}&amp;adminGroupName={$admGroupName}"> 
    58245719              <xsl:copy-of select="name"/> 
     
    58285723            <xsl:value-of select="desc"/> 
    58295724          </td> 
     5725          <xsl:if test="$userInCalSuiteGroup = 'true'"> 
     5726            <td> 
     5727              <xsl:for-each select="/bedework/calSuites/calSuite"> 
     5728                <xsl:if test="group = $admGroupName"> 
     5729                  <xsl:value-of select="name"/> 
     5730                </xsl:if> 
     5731              </xsl:for-each> 
     5732            </td> 
     5733          </xsl:if> 
    58305734        </tr> 
    58315735      </xsl:for-each> 
    58325736    </table> 
     5737    <xsl:if test="$userInCalSuiteGroup = 'true'"> 
     5738      <p class="note"> 
     5739       *Highlighted rows indicate a group to which a Calendar Suite is attached. 
     5740       Select one of these groups to edit attributes of the associated calendar suite. 
     5741      </p> 
     5742    </xsl:if> 
    58335743  </xsl:template> 
    58345744 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/PDA/default.xsl

    r1716 r1999  
    599599    <xsl:variable name="itemClass"> 
    600600      <xsl:choose> 
    601         <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     601        <xsl:when test="calType = '0'">folder</xsl:when> 
    602602        <xsl:otherwise>calendar</xsl:otherwise> 
    603603      </xsl:choose> 
  • trunk/deployment/webpublic/webapp/resources/demoskins/MainCampus/default/default/default.xsl

    r1967 r1999  
    14891489    <xsl:variable name="itemClass"> 
    14901490      <xsl:choose> 
    1491         <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     1491        <xsl:when test="calType = '0'">folder</xsl:when> 
    14921492        <xsl:otherwise>calendar</xsl:otherwise> 
    14931493      </xsl:choose> 
     
    14961496    <li class="{$itemClass}"> 
    14971497      <a href="{$setSelection}&amp;calUrl={$url}" title="view calendar"><xsl:value-of select="name"/></a> 
    1498       <xsl:if test="calendarCollection='true'"> 
     1498      <xsl:if test="calType != '0'"> 
    14991499        <xsl:variable name="calPath" select="path"/> 
    15001500        <span class="exportCalLink"> 
    1501           <!-- To use the dojo floating widget from the template above, uncomment 
    1502                this block: 
    1503           <xsl:variable name="name" select="name"/> 
    1504           <xsl:variable name="idForCal" select="translate(translate(path,'/','S'),' ','s')"/> 
    1505           <a href="javascript:launchExportWidget('exportCalendarForm','{$export}','{$name}','{$calPath}')" id="{$idForCal}" title="export calendar as iCal"> 
    1506             <img src="{$resourcesRoot}/images/calIconExport-sm.gif" width="13" height="13" alt="export calendar" border="0"/> 
    1507           </a> --> 
    15081501          <a href="{$calendar-fetchForExport}&amp;calPath={$calPath}" title="export calendar as iCal"> 
    15091502            <img src="{$resourcesRoot}/images/calIconExport-sm.gif" width="13" height="13" alt="export calendar" border="0"/> 
  • trunk/deployment/webpublic/webapp/resources/demoskins/SoEDepartmental/default/default/default.xsl

    r1874 r1999  
    13341334    <xsl:variable name="itemClass"> 
    13351335      <xsl:choose> 
    1336         <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     1336        <xsl:when test="calType = '0'">folder</xsl:when> 
    13371337        <xsl:otherwise>calendar</xsl:otherwise> 
    13381338      </xsl:choose> 
     
    13411341    <li class="{$itemClass}"> 
    13421342      <a href="{$setSelection}&amp;calUrl={$url}" title="view calendar"><xsl:value-of select="name"/></a> 
    1343       <xsl:if test="calendarCollection='true'"> 
     1343      <xsl:if test="calType != '0'"> 
    13441344        <xsl:variable name="calPath" select="path"/> 
    13451345        <span class="exportCalLink"> 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1990 r1999  
    42784278              5 - Inbox 
    42794279              6 - Outbox 
    4280               7 - Alias 
    4281               8 - External subscription 
     4280              7 - Alias (internal - the underlying calType will be returned; check for the isSubscription property) 
     4281              8 - External subscription (internal - the underlying calType will be returned; check for the isSubscription property and check on the item's status) 
    42824282              9 - Resource collection 
    42834283  --> 
     
    45354535          <xsl:when test="isSubscription = 'true'">alias</xsl:when> 
    45364536          <xsl:when test="name='Trash'">trash</xsl:when> 
    4537           <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     4537          <xsl:when test="calType = '0'">folder</xsl:when> 
    45384538          <xsl:otherwise>calendar</xsl:otherwise> 
    45394539        </xsl:choose> 
     
    45524552      </xsl:variable> 
    45534553      <xsl:choose> 
    4554         <xsl:when test="currentAccess/current-user-privilege-set/privilege/write-content and (calendarCollection = 'true')"> 
     4554        <xsl:when test="currentAccess/current-user-privilege-set/privilege/write-content and (calType != '0')"> 
    45554555          <a href="javascript:updateEventFormCalendar('{$calPath}','{$calDisplay}')"> 
    45564556            <strong><xsl:value-of select="name"/></strong> 
     
    46084608          <xsl:when test="name='Trash'">trash</xsl:when> 
    46094609          <xsl:when test="isSubscription = 'true'">alias</xsl:when> 
    4610           <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     4610          <xsl:when test="calType = '0'">folder</xsl:when> 
    46114611          <xsl:otherwise>calendar</xsl:otherwise> 
    46124612        </xsl:choose> 
     
    47874787          <input type="hidden" value="true" name="calendarCollection"/> 
    47884788        </xsl:when> 
    4789         <xsl:when test="calendarCollection='true'"> 
     4789        <xsl:when test="calType = '0'"> 
     4790          <h3>Modify Folder</h3> 
     4791          <input type="hidden" value="false" name="calendarCollection"/> 
     4792        </xsl:when> 
     4793        <xsl:otherwise> 
    47904794          <h3>Modify Calendar</h3> 
    47914795          <input type="hidden" value="true" name="calendarCollection"/> 
    4792         </xsl:when> 
    4793         <xsl:otherwise> 
    4794           <h3>Modify Folder</h3> 
    4795           <input type="hidden" value="false" name="calendarCollection"/> 
    47964796        </xsl:otherwise> 
    47974797      </xsl:choose> 
     
    48834883                <input type="submit" name="updateCalendar" value="Update Subscription"/> 
    48844884              </xsl:when> 
    4885               <xsl:when test="calendarCollection='true'"> 
    4886                 <input type="submit" name="updateCalendar" value="Update Calendar"/> 
     4885              <xsl:when test="calType = '0'"> 
     4886                <input type="submit" name="updateCalendar" value="Update Folder"/> 
    48874887              </xsl:when> 
    48884888              <xsl:otherwise> 
    4889                 <input type="submit" name="updateCalendar" value="Update Folder"/> 
     4889                <input type="submit" name="updateCalendar" value="Update Calendar"/> 
    48904890              </xsl:otherwise> 
    48914891            </xsl:choose> 
     
    48974897                <input type="submit" name="delete" value="Delete Subscription"/> 
    48984898              </xsl:when> 
    4899               <xsl:when test="calendarCollection='true'"> 
    4900                 <input type="submit" name="delete" value="Delete Calendar"/> 
     4899              <xsl:when test="calType = '0'"> 
     4900                <input type="submit" name="delete" value="Delete Folder"/> 
    49014901              </xsl:when> 
    49024902              <xsl:otherwise> 
    4903                 <input type="submit" name="delete" value="Delete Folder"/> 
     4903                <input type="submit" name="delete" value="Delete Calendar"/> 
    49044904              </xsl:otherwise> 
    49054905            </xsl:choose> 
     
    49534953          <li>Folders may only contain calendars and subfolders.</li> 
    49544954          <li>Calendars may only contain events (and other calendar items).</li> 
    4955           <!-- li> 
    4956             An empty calendar may be converted to a folder and vice 
    4957             versa. 
    4958           </li--> 
    49594955        </ul> 
    49604956      </li> 
     
    50275023  <xsl:template match="currentCalendar" mode="deleteCalendarConfirm"> 
    50285024    <xsl:choose> 
    5029       <xsl:when test="calendarCollection='true'"> 
    5030         <h3>Delete Calendar</h3> 
    5031         <p> 
    5032           The following calendar will be deleted.  Continue? 
    5033         </p> 
    5034       </xsl:when> 
    5035       <xsl:otherwise> 
     5025      <xsl:when test="calType = '0'"> 
    50365026        <h3>Delete Folder</h3> 
    50375027        <p> 
     
    50395029          Continue? 
    50405030        </p> 
     5031      </xsl:when> 
     5032      <xsl:otherwise> 
     5033        <h3>Delete Calendar</h3> 
     5034        <p> 
     5035          The following calendar will be deleted.  Continue? 
     5036        </p> 
    50415037      </xsl:otherwise> 
    50425038    </xsl:choose> 
     
    50775073          <td align="right"> 
    50785074            <xsl:choose> 
    5079               <xsl:when test="calendarCollection='true'"> 
    5080                 <input type="submit" name="delete" value="Yes: Delete Calendar!"/> 
     5075              <xsl:when test="calType = '0'"> 
     5076                <input type="submit" name="delete" value="Yes: Delete Folder!"/> 
    50815077              </xsl:when> 
    50825078              <xsl:otherwise> 
    5083                 <input type="submit" name="delete" value="Yes: Delete Folder!"/> 
     5079                <input type="submit" name="delete" value="Yes: Delete Calendar!"/> 
    50845080              </xsl:otherwise> 
    50855081            </xsl:choose> 
     
    51375133            <ul class="calendarTree"> 
    51385134              <!-- list normal calendars first --> 
    5139               <xsl:for-each select="/bedework/myCalendars/calendars/calendar//calendar[calendarCollection='true' and calType &lt; 2]"> 
     5135              <xsl:for-each select="/bedework/myCalendars/calendars/calendar//calendar[calType = '1']"> 
    51405136                <li class="calendar"> 
    51415137                  <xsl:variable name="calPath" select="path"/> 
     
    51495145            <ul class="calendarTree"> 
    51505146              <!-- list special calendars next --> 
    5151               <xsl:for-each select="/bedework/myCalendars/calendars/calendar//calendar[calendarCollection='true' and calType &gt; 1]"> 
     5147              <xsl:for-each select="/bedework/myCalendars/calendars/calendar//calendar[calType &gt; 1]"> 
    51525148                <li class="calendar"> 
    51535149                  <xsl:variable name="calPath" select="path"/> 
     
    51725168  <xsl:template match="calendar" mode="buildExportTree"> 
    51735169    <xsl:choose> 
    5174       <xsl:when test="calendarCollection='true'"> 
    5175         <li class="calendar"> 
    5176           <xsl:variable name="calPath" select="path"/> 
    5177           <xsl:variable name="name" select="name"/> 
    5178           <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> 
    5179             <xsl:value-of select="name"/> 
    5180           </a> 
    5181         </li> 
    5182       </xsl:when> 
    5183       <xsl:otherwise> 
     5170      <xsl:when test="calType = '0'"> 
    51845171        <li class="folder"> 
    51855172          <xsl:value-of select="name"/> 
     
    51895176            </ul> 
    51905177          </xsl:if> 
     5178        </li> 
     5179      </xsl:when> 
     5180      <xsl:otherwise> 
     5181        <li class="calendar"> 
     5182          <xsl:variable name="calPath" select="path"/> 
     5183          <xsl:variable name="name" select="name"/> 
     5184          <a href="javascript:exportCalendar('exportCalendarForm','{$name}','{$calPath}')"> 
     5185            <xsl:value-of select="name"/> 
     5186          </a> 
    51915187        </li> 
    51925188      </xsl:otherwise> 
     
    53015297    <xsl:variable name="itemClass"> 
    53025298      <xsl:choose> 
    5303         <xsl:when test="calendarCollection='false'">folder</xsl:when> 
     5299        <xsl:when test="calType = '0'">folder</xsl:when> 
    53045300        <xsl:otherwise>calendar</xsl:otherwise> 
    53055301      </xsl:choose>