home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / xampp / xampp-cocoon-addon-1.4.9-installer.exe / permissions.jx < prev    next >
Encoding:
Extensible Markup Language  |  2004-07-12  |  5.5 KB  |  151 lines

  1. <?xml version="1.0"?>
  2. <!--
  3.   Copyright 1999-2004 The Apache Software Foundation
  4.  
  5.   Licensed under the Apache License, Version 2.0 (the "License");
  6.   you may not use this file except in compliance with the License.
  7.   You may obtain a copy of the License at
  8.  
  9.       http://www.apache.org/licenses/LICENSE-2.0
  10.  
  11.   Unless required by applicable law or agreed to in writing, software
  12.   distributed under the License is distributed on an "AS IS" BASIS,
  13.   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14.   See the License for the specific language governing permissions and
  15.   limitations under the License.
  16. -->
  17. <document xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
  18.           xmlns:xi="http://www.w3.org/2001/XInclude">
  19.   <header>
  20.     <title>Jakarta Slide example</title>
  21.     <tab title="users"       href="viewusers.do"/>
  22.     <tab title="content"     href="viewcontent.do?path=${source.path}"/>
  23.     <tab title="properties"  href="viewproperties.do?path=${source.path}"/>
  24.     <tab title="permissions" href="viewpermissions.do?path=${source.path}"/>
  25.     <tab title="locks"       href="viewlocks.do?path=${source.path}"/>
  26.     <tab title="logout"      href="logout.do"/>
  27.   </header>
  28.   <body>
  29.     <row> 
  30.       <column title="Navigation">
  31.         <table bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="2" width="100%" align="center">
  32.           <jx:forEach var="source" items="${source.children}">
  33.             <tr>
  34.               <td width="100%" align="left">
  35.                 <a href="viewpermissions.do?path=${source.path}">
  36.                   ${source.name}
  37.                 </a>
  38.               </td>
  39.             </tr>
  40.           </jx:forEach>
  41.           <jx:if test="${source.parent}">
  42.             <tr>
  43.               <td width="100%" align="left">
  44.                 <br/>
  45.                   <a href="viewpermissions.do?path=${source.parent.path}">
  46.                     ..
  47.                   </a>
  48.               </td>
  49.             </tr>
  50.           </jx:if>
  51.         </table>
  52.       </column>
  53.       <column title="Permissions">
  54.         <table bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="2" width="100%" align="center">
  55.           <tr>
  56.             <td align="left">
  57.               <b>Principal</b>
  58.             </td>
  59.             <td align="left">
  60.               <b>Privilege</b>
  61.             </td>
  62.             <td align="left">
  63.               <b>Inheritable</b>
  64.             </td>
  65.             <td align="left">
  66.               <b>Deny</b>
  67.             </td>
  68.             <td align="right"/>
  69.           </tr>
  70.           <jx:forEach var="permission" items="${source.permissions}">
  71.             <tr>
  72.               <td align="left">
  73.                 ${permission.subject}
  74.               </td>
  75.               <td align="left">
  76.                 ${permission.privilege}
  77.               </td>
  78.               <td align="left">
  79.                 ${permission.inheritable}
  80.               </td>
  81.               <td align="left">
  82.                 ${permission.negative}
  83.               </td>
  84.               <td align="right">
  85.                 <form action="removePermission.do" method="post">
  86.                   <input type="hidden" name="resourcePath" value="${source.path}"/>
  87.                   <input type="hidden" name="subject" value="${permission.subject}"/>
  88.                   <input type="hidden" name="privilege" value="{permission.privilege}"/>
  89.                   <input type="hidden" name="inheritable" value="{permission.inheritable}"/>
  90.                   <input type="hidden" name="negative" value="{permission.negative}"/>
  91.                   <input type="submit" name="doRemovePermission" value="Delete"/>
  92.                 </form>
  93.               </td>
  94.             </tr>
  95.           </jx:forEach>
  96.           <tr>
  97.             <form action="addPermission.do" method="post">
  98.               <input type="hidden" name="resourcePath" value="${source.path}"/>
  99.               <td align="left">
  100.                 <select name="subject">
  101.                   <option>self</option>
  102.                   <option>owner</option>
  103.                   <option>authenticated</option>
  104.                   <option>unauthenticated</option>
  105.                   <option>all</option>
  106.                   <jx:forEach var="role" items="${roles}">
  107.                     <option value="{$role.uri}">
  108.                       role: ${role.uri}
  109.                     </option>
  110.                   </jx:forEach>
  111.                   <jx:forEach var="user" items="${users}">
  112.                     <option value="{$user}">
  113.                       user: ${user}
  114.                     </option>
  115.                   </jx:forEach>
  116.                 </select>
  117.               </td>
  118.               <td align="left">
  119.                 <select name="action">
  120.                   <option>all</option>
  121.                   <option>default</option>
  122.                   <jx:forEach var="privilege" items="${privileges}">
  123.                     <option value="{$privilege}">
  124.                       ${privilege}
  125.                     </option>
  126.                   </jx:forEach>
  127.                 </select>
  128.               </td>
  129.               <td align="left">
  130.                 <select name="inheritable">
  131.                   <option>false</option>
  132.                   <option>true</option>
  133.                 </select>
  134.               </td>
  135.               <td align="left">
  136.                 <select name="negative">
  137.                   <option>false</option>
  138.                   <option>true</option>
  139.                 </select>
  140.               </td>
  141.               <td align="right">
  142.                 <input type="submit" name="doAddPermission" value="Add/Modify"/>
  143.               </td>
  144.             </form>
  145.           </tr>
  146.         </table>
  147.       </column>
  148.     </row>
  149.   </body>
  150. </document>  
  151.