home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
- <!--
- Copyright 1999-2004 The Apache Software Foundation
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
- -->
- <document xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
- xmlns:xi="http://www.w3.org/2001/XInclude">
- <header>
- <title>Jakarta Slide example</title>
- <tab title="users" href="viewusers.do"/>
- <tab title="content" href="viewcontent.do?path=${source.path}"/>
- <tab title="properties" href="viewproperties.do?path=${source.path}"/>
- <tab title="permissions" href="viewpermissions.do?path=${source.path}"/>
- <tab title="locks" href="viewlocks.do?path=${source.path}"/>
- <tab title="logout" href="logout.do"/>
- </header>
- <body>
- <row>
- <column title="Navigation">
- <table bgcolor="#ffffff" border="0" cellspacing="0" cellpadding="2" width="100%" align="center">
- <jx:forEach var="source" items="${source.children}">
- <tr>
- <td width="100%" align="left">
- <a href="viewcontent.do?path=${source.path}">
- ${source.name}
- </a>
- </td>
- </tr>
- </jx:forEach>
- <jx:if test="${source.parent}">
- <tr>
- <td width="100%" align="left">
- <br/>
- <a href="viewcontent.do?path=${source.parent.path}">
- ..
- </a>
- </td>
- </tr>
- </jx:if>
- </table>
- </column>
- <column title="Content">
- <jx:choose>
- <jx:when test="${source.collection}">
- <table width="100%" cellspacing="0" cellpadding="5" align="center">
- <tr>
- <td align="left">
- <b>Filename</b>
- </td>
- <td align="left">
- <b>Version</b>
- </td>
- <td align="left">
- <b>Type</b>
- </td>
- <td align="left">
- <b>Size</b>
- </td>
- <td align="left">
- <b>Last Modified</b>
- </td>
- <td align="right"/>
- </tr>
- <jx:forEach var="source" items="${source.children}">
- <tr>
- <td align="left">
- <jx:choose>
- <jx:when test="$path != ''">
- <a href="viewcontent.do?path=${source.path}">
- ${source.name}
- </a>
- </jx:when>
- <jx:otherwise>
- <a href="viewcontent.do?path=${source.path}">
- ${source.name}
- </a>
- </jx:otherwise>
- </jx:choose>
- </td>
- <td align="left">
- ${source.sourceRevision}
- </td>
- <td align="left">
- ${source.mimeType}
- </td>
- <td align="left">
- ${source.contentLength}
- </td>
- <td align="left">
- ${source.lastModified}
- </td>
- <td align="right">
- <form action="deletesource.do" method="post">
- <input type="hidden" name="parentPath" value="${source.parent.path}" />
- <input type="hidden" name="resourceName" value="${source.name}"/>
- <input type="submit" name="doDeleteSource" value="Delete"/>
- </form>
- </td>
- </tr>
- </jx:forEach>
- <tr>
- <form action="uploadsource.do" method="post" enctype="multipart/form-data">
- <input type="hidden" name="parentPath" value="${source.path}"/>
- <td align="left"><input type="text" name="resourceName" size="15" maxlength="40"/></td>
- <td align="left" colspan="3">
- File:
- <input type="file" name="uploadFile" size="15" maxlength="40"/>
- </td>
- <td align="right">
- <input type="submit" name="doUploadSource" value="Upload File"/>
- </td>
- </form>
- </tr>
- <tr>
- <form action="makecollection.do" method="post">
- <input type="hidden" name="parentPath" value="${source.path}"/>
- <td align="left" colspan="5">
- <input type="text" name="collectionName" size="15" maxlength="40"/>
- </td>
- <td align="right">
- <input type="submit" name="doCreateCollection" value="Create collection"/>
- </td>
- </form>
- </tr>
- </table>
- </jx:when>
- <jx:when test="${source.mimeType == 'text/plain'}">
- <pre><xi:include href="${source.uRI}" parse="text"/></pre>
- </jx:when>
- <jx:when test="${source.mimeType == 'text/xml'}">
- <pre><xi:include href="${source.uRI}" parse="text"/></pre>
- </jx:when>
- <jx:when test="${source.mimeType == 'image/jpeg'}">
- <img src="/samples/blocks/slide/${source.path}"/>
- </jx:when>
- <jx:when test="${source.mimeType == 'image/gif'}">
- <img src="/samples/blocks/slide/${source.path}"/>
- </jx:when>
- <jx:otherwise>
- <h3>Could not display content(${source.mimeType}).</h3>
- </jx:otherwise>
- </jx:choose>
- </column>
- </row>
- </body>
- </document>
-