Make diff action work nicely
[catagits/Gitalist.git] / root / commitdiff.tt2
1 [% PROCESS 'nav/actions.tt2' object = commit %]
2
3 <div class='content'>
4   <div class='commit-message'>
5   [% # XXX Wah, stuff like this doesn't work because end() isn't called as we forward to View::SyntaxHighlight
6   short_cmt(commit.comment) | html %]
7   </div>
8
9   <div class='author'>
10     [% commit.author.name | html %] [[% commit.authored_time %]]
11   </div>
12
13
14   [%
15   # In the case of merge commits there will be no diff tree.
16   IF diff_tree.size > 0;
17     INCLUDE '_diff_tree.tt2';
18   END;
19   IF diff.size > 0;
20     INCLUDE '_diff.tt2';
21   ELSE
22   %]
23   <div class='no-difference'>
24   [%
25     IF commit.parents > 1;
26       'Trivial merge';
27     ELSE;
28       'No differences found';
29     END;
30   %]
31   </div>
32   [% END %]
33 </div>