From 5c0605d5665196b3726cc64bfd80b45ec963417b Mon Sep 17 00:00:00 2001
From: James Moger <james.moger@gitblit.com>
Date: Thu, 23 May 2013 23:10:43 -0400
Subject: [PATCH] Support relative links in commitdiff page and polish css

---
 src/main/java/com/gitblit/utils/GitBlitDiffFormatter.java |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/gitblit/utils/GitBlitDiffFormatter.java b/src/main/java/com/gitblit/utils/GitBlitDiffFormatter.java
index 2966aa8..f871e77 100644
--- a/src/main/java/com/gitblit/utils/GitBlitDiffFormatter.java
+++ b/src/main/java/com/gitblit/utils/GitBlitDiffFormatter.java
@@ -20,6 +20,7 @@
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
 import java.io.OutputStream;
+import java.text.MessageFormat;
 
 import org.eclipse.jgit.diff.RawText;
 import org.eclipse.jgit.util.RawParseUtils;
@@ -150,7 +151,8 @@
 					sb.append("</tbody></table></div>\n");
 					inFile = false;
 				}
-				sb.append("<div class='header'>").append(line).append("</div>");
+				
+				sb.append(MessageFormat.format("<div class='header'><div class=\"diffHeader\" id=\"{0}\"><i class=\"icon-file\"></i> ", line)).append(line).append("</div></div>");
 				sb.append("<div class=\"diff\">");
 				sb.append("<table><tbody>");
 				inFile = true;

--
Gitblit v1.9.1