-<link rel="stylesheet" type="text/css" href="[% c.uri_for('/static/css/syntax/' _ language _ '.css') %]"/>
+[% INCLUDE inc/syntax_highlight_css.tt2 %]
+
+<h2>Differences</h2>
+
+<div class="differences">
+
[% FOREACH item IN diff %]
-<div class='diff-head'>
- diff --git
- <a href='[% c.uri_for("blob", {h=item.src, f=item.file}) %]'>[% item.a %]</a>
- <a href='[% c.uri_for("blob", {h=item.dst, f=item.file}) %]'>[% item.b %]</a>
+
+<h4 id="diff[% loop.count %]" class='diff-head'>diff --git [%# FIXME %]
+ [% IF !item.src.match('^0+$') %]
+ <a href='[% c.uri_for_action("/ref/blob", [Repository.name, item.src]) %]' title="Blob">[% item.a %]</a>
+ [% ELSE %]
+ [% item.a %]
+ [% END %]
+ [% IF !item.dst.match('^0+$') %]
+ <a href='[% c.uri_for_action("/ref/blob", [Repository.name, item.dst]) %]' title="Blob">[% item.b %]</a>
+ [% ELSE %]
+ [% item.b %]
+ [% END %]
+</h4>
+
+
+<div class='diff-patch'>
+ <pre>[% blobs.${loop.index} %]</pre>
</div>
+
<div class='diff-index'>
- [% item.index %]
-</div>
-<div class='diff-patch'>
- <pre>[% blobs.${loop.index} %]</pre>
+ [% item.index.replace("index","<b>Index</b>") %]
</div>
+
[% END %]
+
+</div>
\ No newline at end of file