You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lenya.apache.org by eg...@apache.org on 2003/11/25 11:01:25 UTC
cvs commit: cocoon-lenya/src/webapp/lenya/content/info assets.xsp
egli 2003/11/25 02:01:25
Modified: src/webapp/lenya/xslt/info info.xsl
src/webapp/lenya/content/info assets.xsp
Log:
Added some more information to the asset screen such as file size and creation date.
Revision Changes Path
1.48 +10 -5 cocoon-lenya/src/webapp/lenya/xslt/info/info.xsl
Index: info.xsl
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/xslt/info/info.xsl,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- info.xsl 13 Oct 2003 13:12:54 -0000 1.47
+++ info.xsl 25 Nov 2003 10:01:25 -0000 1.48
@@ -155,11 +155,16 @@
<xsl:template match="lenya-info:assets">
<table class="lenya-table">
<tr>
- <th colspan="2">Assets</th>
+ <th>Assets</th>
+ <th>File Size</th>
+ <th>Creation Date</th>
+ <th></th>
</tr>
<xsl:for-each select="lenya-info:asset">
<tr>
- <td><xsl:value-of select="."/></td>
+ <td><xsl:value-of select="dc:title"/></td>
+ <td align="right"><xsl:value-of select="dc:extent"/> kB</td>
+ <td align="right"><xsl:value-of select="dc:date"/></td>
<td>
<form>
<input type="hidden" name="lenya.usecase" value="asset"/>
@@ -172,7 +177,7 @@
</input>
<input type="hidden" name="properties.remove.asset.name">
<xsl:attribute name="value">
- <xsl:value-of select="."/>
+ <xsl:value-of select="dc:title"/>
</xsl:attribute>
</input>
<input type="submit" value="Delete"/>
@@ -414,4 +419,4 @@
<xsl:copy-of select="node()"/>
</xsl:template>
-</xsl:stylesheet>
\ No newline at end of file
+</xsl:stylesheet>
1.3 +8 -2 cocoon-lenya/src/webapp/lenya/content/info/assets.xsp
Index: assets.xsp
===================================================================
RCS file: /home/cvs/cocoon-lenya/src/webapp/lenya/content/info/assets.xsp,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- assets.xsp 19 Aug 2003 15:30:22 -0000 1.2
+++ assets.xsp 25 Nov 2003 10:01:25 -0000 1.3
@@ -16,6 +16,8 @@
<xsp:structure>
<xsp:include>org.apache.lenya.cms.publication.Document</xsp:include>
<xsp:include>org.apache.lenya.cms.publication.ResourcesManager</xsp:include>
+ <xsp:include>java.util.Date</xsp:include>
+ <xsp:include>java.text.SimpleDateFormat</xsp:include>
</xsp:structure>
<lenya-info:info>
@@ -29,7 +31,11 @@
if (resources != null) {
for(int i = 0; i < resources.length; i++) {
<xsp:content>
- <lenya-info:asset><xsp:expr>resources[i].getName()</xsp:expr></lenya-info:asset>
+ <lenya-info:asset>
+ <dc:title><xsp:expr>resources[i].getName()</xsp:expr></dc:title>
+ <dc:date><xsp:expr>SimpleDateFormat.getDateInstance().format(new Date(resources[i].lastModified()))</xsp:expr></dc:date>
+ <dc:extent><xsp:expr>resources[i].length()/1024</xsp:expr></dc:extent>
+ </lenya-info:asset>
</xsp:content>
}
}
@@ -38,4 +44,4 @@
</lenya-info:assets>
</lenya-info:info>
-</xsp:page>
\ No newline at end of file
+</xsp:page>
---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-cvs-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-cvs-help@cocoon.apache.org