From d897c8bcfa2f3b55fca72e556d30d7e9ceac8fe7 Mon Sep 17 00:00:00 2001 From: skygo Date: Mon, 27 Aug 2012 22:41:57 +0000 Subject: [PATCH] change to repository browsing webdav side date filesize color. git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1377897 13f79535-47bb-0310-9956-ffa450edef68 --- .../archiva/webdav/util/IndexWriter.java | 51 ++++++++++++++++--- 1 file changed, 43 insertions(+), 8 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/util/IndexWriter.java b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/util/IndexWriter.java index 5fa185335..bf5d92d9c 100644 --- a/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/util/IndexWriter.java +++ b/archiva-modules/archiva-web/archiva-webdav/src/main/java/org/apache/archiva/webdav/util/IndexWriter.java @@ -25,12 +25,15 @@ import org.apache.jackrabbit.webdav.io.OutputContext; import java.io.File; import java.io.PrintWriter; +import java.text.DateFormat; +import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.List; +import java.util.Locale; import java.util.Map; /** @@ -62,7 +65,7 @@ public class IndexWriter { outputContext.setModificationTime( new Date().getTime() ); outputContext.setContentType( "text/html" ); - outputContext.setETag( "" ); + outputContext.setETag( "" ); // skygo ETag MRM-1127 seems to be fixed if ( outputContext.hasStream() ) { PrintWriter writer = new PrintWriter( outputContext.getOutputStream() ); @@ -76,9 +79,28 @@ public class IndexWriter private void writeDocumentStart( PrintWriter writer ) { + writer.println(""); writer.println( "" ); writer.println( "" ); writer.println( "Collection: /" + logicalResource + "" ); + writer.println( "" ); writer.println( "" ); writer.println( "" ); writer.println( "

Collection: /" + logicalResource + "

" ); @@ -93,11 +115,11 @@ public class IndexWriter parentName = StringUtils.replace( parentName, "\\", "/" ); writer.println( "" ); } - writer.println( "