Change everything round to be /ref/ instead of /commit/ as this makes more sense
[catagits/Gitalist.git] / root / fragment / ref / diff_fancy.tt2
diff --git a/root/fragment/ref/diff_fancy.tt2 b/root/fragment/ref/diff_fancy.tt2
new file mode 100644 (file)
index 0000000..9554934
--- /dev/null
@@ -0,0 +1,20 @@
+[%
+  # In the case of merge commits there will be no diff tree.
+  IF (diff_tree.size||0) > 0;
+    INCLUDE '_diff_tree.tt2';
+  END;
+  IF (diff.size||0) > 0;
+    INCLUDE '_diff.tt2';
+  ELSE
+  %]
+  <div class='no-difference'>
+  [%
+    IF commit && commit.parents > 1;
+      'Trivial merge';
+    ELSE;
+      'No differences found';
+    END;
+  %]
+  </div>
+  [% END %]
+