Changeset 1198

Show
Ignore:
Timestamp:
01/04/07 12:40:27
Author:
johnsa
Message:

user client: scheduling preferences now fixed up, properly represented, and working

Files:

Legend:

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

    r1179 r1198  
    636636table.common .padMe { 
    637637  padding: 1em !important; 
     638} 
     639table.scheduling td { 
     640  white-space: nowrap; 
    638641} 
    639642table#manage td { 
  • trunk/deployment/webuser/webapp/resources/demoskins/default/default/default.xsl

    r1197 r1198  
    60936093            </form> 
    60946094            <h3>Current Access:</h3> 
    6095             <table class="common"> 
     6095            <table class="common scheduling"> 
    60966096              <tr> 
    60976097                <th>Entry</th> 
    60986098                <th>Access</th> 
     6099                <th>Inherited from</th> 
    60996100                <td></td> 
    61006101              </tr> 
    6101               <xsl:for-each select="inbox/acl/ace"> 
    6102                 <tr> 
    6103                   <td> 
    6104                     <xsl:choose> 
    6105                       <xsl:when test="principal/href"> 
    6106                         <xsl:value-of select="principal/href"/> 
    6107                       </xsl:when> 
    6108                       <xsl:when test="principal/property"> 
    6109                         <xsl:value-of select="name(principal/property/*)"/> 
    6110                       </xsl:when> 
    6111                       <xsl:when test="invert/principal/property/owner"> 
    6112                         anyone (other) 
    6113                       </xsl:when> 
    6114                       <xsl:otherwise> 
    6115                          <xsl:value-of select="name(principal/*)"/> 
    6116                       </xsl:otherwise> 
    6117                     </xsl:choose> 
    6118                   </td> 
    6119                   <td> 
    6120                     <xsl:value-of select="name(grant/*)"/> 
    6121                   </td> 
    6122                   <td> 
    6123                     <xsl:variable name="who"> 
    6124                       <xsl:choose> 
    6125                         <xsl:when test="invert"> 
    6126                           <xsl:choose> 
    6127                             <xsl:when test="invert/principal/href"><xsl:value-of select="normalize-space(invert/principal/href)"/></xsl:when> 
    6128                             <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    6129                             <xsl:otherwise><xsl:value-of select="name(invert/principal/*)"/></xsl:otherwise> 
    6130                           </xsl:choose> 
    6131                         </xsl:when> 
    6132                         <xsl:otherwise> 
    6133                           <xsl:choose> 
    6134                             <xsl:when test="principal/href"><xsl:value-of select="normalize-space(principal/href)"/></xsl:when> 
    6135                             <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    6136                             <xsl:otherwise><xsl:value-of select="name(principal/*)"/></xsl:otherwise> 
    6137                           </xsl:choose> 
    6138                         </xsl:otherwise> 
    6139                       </xsl:choose> 
    6140                     </xsl:variable> 
    6141                     <xsl:variable name="whoType"> 
    6142                       <xsl:choose> 
    6143                         <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)">user</xsl:when> 
    6144                         <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 
    6145                         <xsl:when test="$who='authenticated'">auth</xsl:when> 
    6146                         <xsl:when test="invert/principal/property/owner">other</xsl:when> 
    6147                         <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    6148                         <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    6149                         <xsl:otherwise></xsl:otherwise> 
    6150                       </xsl:choose> 
    6151                     </xsl:variable> 
    6152                     <xsl:variable name="shortWho"> 
    6153                       <xsl:choose> 
    6154                         <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedeworkadmin/syspars/userPrincipalRoot)),'/')"/></xsl:when> 
    6155                         <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedeworkadmin/syspars/groupPrincipalRoot)),'/')"/></xsl:when> 
    6156                         <xsl:otherwise></xsl:otherwise> <!-- if not user or group, send no who --> 
    6157                       </xsl:choose> 
    6158                     </xsl:variable> 
    6159                     <xsl:choose> 
    6160                       <xsl:when test="invert"> 
    6161                         <a href="{$prefs-setAccess}&amp;how=default&amp;what=in&amp;who={$shortWho}&amp;whoType={$whoType}&amp;notWho=yes" title="reset to default"> 
    6162  
    6163                           <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="reset to default"/> 
    6164                         </a> 
    6165                       </xsl:when> 
    6166                       <xsl:otherwise> 
    6167                         <a href="{$prefs-setAccess}&amp;how=default&amp;what=in&amp;who={$shortWho}&amp;whoType={$whoType}" title="reset to default"> 
    6168  
    6169                           <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="reset to default"/> 
    6170                         </a> 
    6171                       </xsl:otherwise> 
    6172                     </xsl:choose> 
    6173                   </td> 
    6174                 </tr> 
    6175               </xsl:for-each> 
     6102              <xsl:apply-templates select="inbox/acl/ace" mode="scheduling"> 
     6103                <xsl:with-param name="what">in</xsl:with-param> 
     6104              </xsl:apply-templates> 
    61766105            </table> 
    61776106          </td> 
     
    62106139            </form> 
    62116140            <h3>Current Access:</h3> 
    6212             <table class="common"> 
     6141            <table class="common scheduling"> 
    62136142              <tr> 
    62146143                <th>Entry</th> 
    62156144                <th>Access</th> 
     6145                <th>Inherited from</th> 
    62166146                <td></td> 
    62176147              </tr> 
    6218               <xsl:for-each select="outbox/acl/ace"> 
    6219                 <tr> 
    6220                   <td> 
    6221                     <xsl:choose> 
    6222                       <xsl:when test="principal/href"> 
    6223                         <xsl:value-of select="principal/href"/> 
    6224                       </xsl:when> 
    6225                       <xsl:when test="principal/property"> 
    6226                         <xsl:value-of select="name(principal/property/*)"/> 
    6227                       </xsl:when> 
    6228                       <xsl:when test="invert/principal/property/owner"> 
    6229                         anyone (other) 
    6230                       </xsl:when> 
    6231                       <xsl:otherwise> 
    6232                          <xsl:value-of select="name(principal/*)"/> 
    6233                       </xsl:otherwise> 
    6234                     </xsl:choose> 
    6235                   </td> 
    6236                   <td> 
    6237                     <xsl:value-of select="name(grant/*)"/> 
    6238                   </td> 
    6239                   <td> 
    6240                     <xsl:variable name="who"> 
    6241                       <xsl:choose> 
    6242                         <xsl:when test="invert"> 
    6243                           <xsl:choose> 
    6244                             <xsl:when test="invert/principal/href"><xsl:value-of select="normalize-space(invert/principal/href)"/></xsl:when> 
    6245                             <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    6246                             <xsl:otherwise><xsl:value-of select="name(invert/principal/*)"/></xsl:otherwise> 
    6247                           </xsl:choose> 
    6248                         </xsl:when> 
    6249                         <xsl:otherwise> 
    6250                           <xsl:choose> 
    6251                             <xsl:when test="principal/href"><xsl:value-of select="normalize-space(principal/href)"/></xsl:when> 
    6252                             <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    6253                             <xsl:otherwise><xsl:value-of select="name(principal/*)"/></xsl:otherwise> 
    6254                           </xsl:choose> 
    6255                         </xsl:otherwise> 
    6256                       </xsl:choose> 
    6257                     </xsl:variable> 
    6258                     <xsl:variable name="whoType"> 
    6259                       <xsl:choose> 
    6260                         <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)">user</xsl:when> 
    6261                         <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 
    6262                         <xsl:when test="$who='authenticated'">auth</xsl:when> 
    6263                         <xsl:when test="invert/principal/property/owner">other</xsl:when> 
    6264                         <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
    6265                         <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
    6266                         <xsl:otherwise></xsl:otherwise> 
    6267                       </xsl:choose> 
    6268                     </xsl:variable> 
    6269                     <xsl:variable name="shortWho"> 
    6270                       <xsl:choose> 
    6271                         <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedeworkadmin/syspars/userPrincipalRoot)),'/')"/></xsl:when> 
    6272                         <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedeworkadmin/syspars/groupPrincipalRoot)),'/')"/></xsl:when> 
    6273                         <xsl:otherwise></xsl:otherwise> <!-- if not user or group, send no who --> 
    6274                       </xsl:choose> 
    6275                     </xsl:variable> 
    6276                     <xsl:choose> 
    6277                       <xsl:when test="invert"> 
    6278                         <a href="{$prefs-setAccess}&amp;how=default&amp;what=out&amp;who={$shortWho}&amp;whoType={$whoType}&amp;notWho=yes" title="reset to default"> 
    6279                           <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="reset to default"/> 
    6280                         </a> 
    6281                       </xsl:when> 
    6282                       <xsl:otherwise> 
    6283                         <a href="{$prefs-setAccess}&amp;how=default&amp;what=out&amp;who={$shortWho}&amp;whoType={$whoType}" title="reset to default"> 
    6284                           <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="reset to default"/> 
    6285                         </a> 
    6286                       </xsl:otherwise> 
    6287                     </xsl:choose> 
    6288                   </td> 
    6289                 </tr> 
    6290               </xsl:for-each> 
     6148              <xsl:apply-templates select="outbox/acl/ace" mode="scheduling"> 
     6149                <xsl:with-param name="what">out</xsl:with-param> 
     6150              </xsl:apply-templates> 
    62916151            </table> 
    62926152          </td> 
    62936153        </tr> 
    62946154      </table> 
     6155  </xsl:template> 
     6156 
     6157  <xsl:template match="ace" mode="scheduling"> 
     6158    <xsl:param name="what"/> 
     6159    <xsl:variable name="who"> 
     6160      <xsl:choose> 
     6161        <xsl:when test="invert"> 
     6162          <xsl:choose> 
     6163            <xsl:when test="invert/principal/href"><xsl:value-of select="normalize-space(invert/principal/href)"/></xsl:when> 
     6164            <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
     6165            <xsl:otherwise><xsl:value-of select="name(invert/principal/*)"/></xsl:otherwise> 
     6166          </xsl:choose> 
     6167        </xsl:when> 
     6168        <xsl:otherwise> 
     6169          <xsl:choose> 
     6170            <xsl:when test="principal/href"><xsl:value-of select="normalize-space(principal/href)"/></xsl:when> 
     6171            <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
     6172            <xsl:otherwise><xsl:value-of select="name(principal/*)"/></xsl:otherwise> 
     6173          </xsl:choose> 
     6174        </xsl:otherwise> 
     6175      </xsl:choose> 
     6176    </xsl:variable> 
     6177    <xsl:variable name="whoType"> 
     6178      <xsl:choose> 
     6179        <xsl:when test="contains($who,/bedework/syspars/userPrincipalRoot)">user</xsl:when> 
     6180        <xsl:when test="contains($who,/bedework/syspars/groupPrincipalRoot)">group</xsl:when> 
     6181        <xsl:when test="$who='authenticated'">auth</xsl:when> 
     6182        <xsl:when test="invert/principal/property/owner">other</xsl:when> 
     6183        <xsl:when test="principal/property"><xsl:value-of select="name(principal/property/*)"/></xsl:when> 
     6184        <xsl:when test="invert/principal/property"><xsl:value-of select="name(invert/principal/property/*)"/></xsl:when> 
     6185        <xsl:otherwise></xsl:otherwise> 
     6186      </xsl:choose> 
     6187    </xsl:variable> 
     6188    <xsl:variable name="shortWho"> 
     6189      <xsl:choose> 
     6190        <xsl:when test="$whoType='user'"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/userPrincipalRoot)),'/')"/></xsl:when> 
     6191        <xsl:when test="$whoType='group'"><xsl:value-of select="substring-after(substring-after($who,normalize-space(/bedework/syspars/groupPrincipalRoot)),'/')"/></xsl:when> 
     6192        <xsl:otherwise></xsl:otherwise> <!-- if not user or group, send no who --> 
     6193      </xsl:choose> 
     6194    </xsl:variable> 
     6195    <tr> 
     6196      <td> 
     6197        <xsl:choose> 
     6198          <xsl:when test="$whoType = 'user' or ($who = 'owner' and $whoType != 'other')"> 
     6199            <img src="{$resourcesRoot}/resources/userIcon.gif" width="13" height="13" border="0" alt="user"/> 
     6200          </xsl:when> 
     6201          <xsl:otherwise> 
     6202            <img src="{$resourcesRoot}/resources/groupIcon.gif" width="13" height="13" border="0" alt="group"/> 
     6203          </xsl:otherwise> 
     6204        </xsl:choose> 
     6205        <xsl:text> </xsl:text> 
     6206        <xsl:choose> 
     6207          <xsl:when test="$whoType = 'other'"> 
     6208            anyone (other) 
     6209          </xsl:when> 
     6210          <xsl:when test="$shortWho != ''"> 
     6211            <xsl:value-of select="$shortWho"/> 
     6212          </xsl:when> 
     6213          <xsl:otherwise> 
     6214            <xsl:value-of select="$who"/> 
     6215          </xsl:otherwise> 
     6216        </xsl:choose> 
     6217      </td> 
     6218      <td> 
     6219        <xsl:value-of select="name(grant/*)"/> 
     6220      </td> 
     6221      <td> 
     6222        <xsl:choose> 
     6223          <xsl:when test="inherited"> 
     6224            <xsl:value-of select="inherited/href"/> 
     6225          </xsl:when> 
     6226          <xsl:otherwise> 
     6227            local 
     6228          </xsl:otherwise> 
     6229        </xsl:choose> 
     6230      </td> 
     6231      <td> 
     6232        <xsl:choose> 
     6233          <xsl:when test="invert"> 
     6234            <a href="{$prefs-setAccess}&amp;how=default&amp;what={$what}&amp;who={$shortWho}&amp;whoType={$whoType}&amp;notWho=yes" title="reset to default"> 
     6235              <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="reset to default"/> 
     6236            </a> 
     6237          </xsl:when> 
     6238          <xsl:otherwise> 
     6239            <a href="{$prefs-setAccess}&amp;how=default&amp;what={$what}&amp;who={$shortWho}&amp;whoType={$whoType}" title="reset to default"> 
     6240              <img src="{$resourcesRoot}/resources/trashIcon.gif" width="13" height="13" border="0" alt="reset to default"/> 
     6241            </a> 
     6242          </xsl:otherwise> 
     6243        </xsl:choose> 
     6244      </td> 
     6245    </tr> 
    62956246  </xsl:template> 
    62966247