stephan 2002/08/19 01:08:12 Modified: src/scratchpad/webapp/samples/slide description2html4content.xsl description2html4locks.xsl description2html4permissions.xsl description2html4properties.xsl Log: Improved navigation. Add support for delete of source and the creation of folders. Revision Changes Path 1.3 +79 -48 xml-cocoon2/src/scratchpad/webapp/samples/slide/description2html4content.xsl Index: description2html4content.xsl =================================================================== RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/samples/slide/description2html4content.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- description2html4content.xsl 14 Aug 2002 09:07:56 -0000 1.2 +++ description2html4content.xsl 19 Aug 2002 08:08:11 -0000 1.3 @@ -130,57 +130,88 @@ <tr> <td width="100%" bgcolor="#ffffff" align="left"> - <table width="100%" cellspacing="0" cellpadding="5" align="center"> - <font size="+0" face="arial,helvetica,sanserif" color="#000000"> - <tr> - <td align="left"><b>Filename</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"></td> - </tr> - - <xsl:for-each select="source:children/source:source"> - <tr> - <td align="left">   - <a href="/cocoon/samples/slide/content/{substring-after(@source:systemid,'://')}" - ><xsl:value-of select="@source:name"/></a> - </td> - <xsl:variable name="location"><xsl:value-of select="@"/></xsl:variable> - <td align="left"><xsl:value-of - select="@source:mime-type"/></td> - <td align="left"><xsl:value-of - select="@source:contentlength"/></td> - <td align="left"><xsl:value-of - select="source:properties/dav:getlastmodified"/></td> - <td align="right"> + <xsl:choose> + <xsl:when test="@source:collection='true'"> + + <table width="100%" cellspacing="0" cellpadding="5" align="center"> + <font size="+0" face="arial,helvetica,sanserif" color="#000000"> + <tr> + <td align="left"><b>Filename</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"></td> + </tr> + + <xsl:for-each select="source:children/source:source"> + <tr> + <td align="left">   + <a href="/cocoon/samples/slide/content/{substring-after(@source:systemid,'://')}" + ><xsl:value-of select="@source:name"/></a> + </td> + <xsl:variable name="location"><xsl:value-of select="@"/></xsl:variable> + <td align="left"><xsl:value-of + select="@source:mime-type"/></td> + <td align="left"><xsl:value-of + select="@source:contentlength"/></td> + <td align="left"><xsl:value-of + select="source:properties/dav:getlastmodified"/></td> + <td align="right"> + <form action="" method="post"> + <input type="hidden" name="method" value="doDeleteSource"/> + <input type="hidden" name="cocoon-source-uri" value="{@source:systemid}"/> + <input type="submit" name="cocoon-action-deletesource" value="Delete"/> + </form> + </td> + </tr> + </xsl:for-each> + + <tr> + <form action="" method="post" enctype="multipart/form-data"> + <input type="hidden" name="method" value="doUploadSource"/> + <input type="hidden" name="cocoon-source-uri" value="{@source:systemid}"/> + <td align="left"> + <input type="text" name="cocoon-source-name" size="15" maxlength="40"/> + </td> + <td align="left" colspan="3"> + File: + <input type="file" name="cocoon-upload-file" size="15" maxlength="40"/> + </td> + <td align="right"> + <input type="submit" name="cocoon-action-upload" value="Upload File" /> + </td> + </form> + </tr> + + <tr> <form action="" method="post"> - <input type="hidden" name="method" value="doDeleteSource"/> + <input type="hidden" name="method" value="doCreateCollection"/> <input type="hidden" name="cocoon-source-uri" value="{@source:systemid}"/> - <input type="submit" name="cocoon-action-deletesource" value="Delete"/> + <td align="left" colspan="4"> + <input type="text" name="cocoon-source-name" size="15" maxlength="40"/> + </td> + <td align="right"> + <input type="submit" name="doCreateCollection" value="Create collection" /> + </td> </form> - </td> - </tr> - </xsl:for-each> - - <tr> - <form method="post" enctype="multipart/form-data"> - <input type="hidden" name="method" value="doUploadSource"/> - <input type="hidden" name="cocoon-source-uri" value="{@source:systemid}"/> - <td align="left"> - <input type="text" name="cocoon-source-filename" size="25" maxlength="40"/> - </td> - <td align="left" colspan="3"> - File: - <input type="file" name="cocoon-upload-file" size="25" maxlength="40"/> - </td> - <td align="right"> - <input type="submit" name="cocoon-action-upload" value="Upload File" /> - </td> - </form> - </tr> - </font> - </table> + </tr> + </font> + </table> + </xsl:when> + + <xsl:when test="@source:mime-type='image/gif'"> + <img src="/cocoon/samples/slide/view/{substring-after(@source:systemid,'://')}"/> + </xsl:when> + + <xsl:when test="@source:mime-type='image/jpeg'"> + <img src="/cocoon/samples/slide/view/{substring-after(@source:systemid,'://')}"/> + </xsl:when> + + <xsl:otherwise> + <h3>Could not display content.</h3> + </xsl:otherwise> + </xsl:choose> + </td> </tr> </table> 1.3 +2 -2 xml-cocoon2/src/scratchpad/webapp/samples/slide/description2html4locks.xsl Index: description2html4locks.xsl =================================================================== RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/samples/slide/description2html4locks.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- description2html4locks.xsl 14 Aug 2002 09:07:56 -0000 1.2 +++ description2html4locks.xsl 19 Aug 2002 08:08:11 -0000 1.3 @@ -84,7 +84,7 @@ <xsl:if test="@source:parent"> <tr> <td width="100%" bgcolor="#ffffff" align="left"> - <a href="/cocoon/samples/slide/content/{substring-after(@source:parent,'://')}">Back</a> + <a href="/cocoon/samples/slide/locks/{substring-after(@source:parent,'://')}">Back</a> </td> </tr> </xsl:if> @@ -97,7 +97,7 @@ <tr> <td width="100%" bgcolor="#ffffff" align="left"> <font size="+0" face="arial,helvetica,sanserif" color="#000000"> - <a href="/cocoon/samples/slide/content/{substring-after(@source:systemid,'://')}" + <a href="/cocoon/samples/slide/locks/{substring-after(@source:systemid,'://')}" ><xsl:value-of select="@source:name"/></a> </font> </td> 1.4 +7 -7 xml-cocoon2/src/scratchpad/webapp/samples/slide/description2html4permissions.xsl Index: description2html4permissions.xsl =================================================================== RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/samples/slide/description2html4permissions.xsl,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- description2html4permissions.xsl 16 Aug 2002 12:42:56 -0000 1.3 +++ description2html4permissions.xsl 19 Aug 2002 08:08:11 -0000 1.4 @@ -24,24 +24,24 @@ <table bgcolor="#000000" border="0" cellspacing="2" cellpadding="2" align="center" width="100%"> <tr> <td width="90%" align="left" bgcolor="#0086b2"><font size="+1" face="arial,helvetica,sanserif" - color="#ffffff"><xsl:value-of select="source:source/@source:systemid"/></font></td> + color="#ffffff"><xsl:value-of select="document/source:source/@source:systemid"/></font></td> <td nowrap="nowrap" bgcolor="#ffffff"><a href="/cocoon/samples/slide/users/"> <i>users</i></a> </td> <td nowrap="nowrap" bgcolor="#ffffff"><a - href="/cocoon/samples/slide/content/{substring-after(source:source/@source:systemid,'://')}"> + href="/cocoon/samples/slide/content/{substring-after(document/source:source/@source:systemid,'://')}"> <i>content</i></a> </td> <td nowrap="nowrap" bgcolor="#ffffff"><a - href="/cocoon/samples/slide/properties/{substring-after(source:source/@source:systemid,'://')}"> + href="/cocoon/samples/slide/properties/{substring-after(document/source:source/@source:systemid,'://')}"> <i>properties</i></a> </td> <td nowrap="nowrap" bgcolor="#ffffff"><a - href="/cocoon/samples/slide/permissions/{substring-after(source:source/@source:systemid,'://')}"> + href="/cocoon/samples/slide/permissions/{substring-after(document/source:source/@source:systemid,'://')}"> <i>permissions</i></a> </td> <td nowrap="nowrap" bgcolor="#ffffff"><a - href="/cocoon/samples/slide/locks/{substring-after(source:source/@source:systemid,'://')}"> + href="/cocoon/samples/slide/locks/{substring-after(document/source:source/@source:systemid,'://')}"> <i>locks</i></a> </td> <td nowrap="nowrap" bgcolor="#ffffff"><a href="/cocoon/samples/slide/logout.html"> @@ -85,7 +85,7 @@ <xsl:if test="@source:parent"> <tr> <td width="100%" bgcolor="#ffffff" align="left"> - <a href="/cocoon/samples/slide/content/{substring-after(@source:parent,'://')}">Back</a> + <a href="/cocoon/samples/slide/permissions/{substring-after(@source:parent,'://')}">Back</a> </td> </tr> </xsl:if> @@ -98,7 +98,7 @@ <tr> <td width="100%" bgcolor="#ffffff" align="left"> <font size="+0" face="arial,helvetica,sanserif" color="#000000"> - <a href="/cocoon/samples/slide/content/{substring-after(@source:systemid,'://')}" + <a href="/cocoon/samples/slide/permissions/{substring-after(@source:systemid,'://')}" ><xsl:value-of select="@source:name"/></a> </font> </td> 1.3 +3 -3 xml-cocoon2/src/scratchpad/webapp/samples/slide/description2html4properties.xsl Index: description2html4properties.xsl =================================================================== RCS file: /home/cvs/xml-cocoon2/src/scratchpad/webapp/samples/slide/description2html4properties.xsl,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- description2html4properties.xsl 14 Aug 2002 09:07:56 -0000 1.2 +++ description2html4properties.xsl 19 Aug 2002 08:08:11 -0000 1.3 @@ -84,7 +84,7 @@ <xsl:if test="@source:parent"> <tr> <td width="100%" bgcolor="#ffffff" align="left"> - <a href="/cocoon/samples/slide/content/{substring-after(@source:parent,'://')}">Back</a> + <a href="/cocoon/samples/slide/properties/{substring-after(@source:parent,'://')}">Back</a> </td> </tr> </xsl:if> @@ -97,7 +97,7 @@ <tr> <td width="100%" bgcolor="#ffffff" align="left"> <font size="+0" face="arial,helvetica,sanserif" color="#000000"> - <a href="/cocoon/samples/slide/content/{substring-after(@source:systemid,'://')}" + <a href="/cocoon/samples/slide/properties/{substring-after(@source:systemid,'://')}" ><xsl:value-of select="@source:name"/></a> </font> </td> @@ -165,7 +165,7 @@ <input type="hidden" name="method" value="doAddProperty"/> <input type="hidden" name="cocoon-source-uri" value="{@source:systemid}"/> <td align="left"> - <input name="cocoon-source-property-namespace" type="text" size="25" maxlength="40"/> + <input name="cocoon-source-property-namespace" type="text" size="15" maxlength="40"/> </td> <td align="left"> <input name="cocoon-source-property-name" type="text" size="15" maxlength="40"/>
---------------------------------------------------------------------- In case of troubles, e-mail: [EMAIL PROTECTED] To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]