Fixed tree link in the case of no sha1 in the captures.
[catagits/Gitalist.git] / root / fragment / ref / commit.tt2
CommitLineData
08d8bb08 1<table class="listing">
2<thead>
3<tr>
4 <th>ID (sha1)</th>
5 <th>Last change</th>
6 <th>Message</th>
7 <th>By</th>
8 <th>Role</th>
9</tr>
10</thead>
11<tbody>
12<tr class="invert">
13 <td class='sha1' title='[% Commit.sha1 %]'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = Commit.sha1.substr(0, 7) %]</td>
14 <td class='time-since'>[% time_since(Commit.authored_time) %]</td>
15 <td rowspan="2">
16 [% Commit.comment | html%]
17 [%
18
86692bbb 19 INCLUDE '_refs.tt2' object = commit;
08d8bb08 20 %]</td>
21 <td class='author'><a href="mailto:[% Commit.author.email %]" title="Email"><img style="float: left; padding-right: 10px" src="[% uri_for_gravatar(Commit.committer.email, 21) %]">[% Commit.author.name | html %]</a></td>
22 <td class='action-list'>Author</td>
23</tr>
24<tr class="invert">
25 <td></td>
26 <td class='time-since'>[% time_since(Commit.committed_time) %]</td>
27 <!-- spanned -->
28 <td class='author'><a href="mailto:[% Commit.committer.email %]" title="Email"><img style="float: left; padding-right: 10px" src="[% uri_for_gravatar(Commit.committer.email, 21) %]">[% Commit.committer.name %]</a></td>
29 <td class='action-list'>Committer</td>
30</tr>
31</tbody>
32</table>
86692bbb 33 <!-- [% USE dumper; dumper.dump(commit.parents) %] -->
08d8bb08 34
35
36
37<table class="listing summary">
38 <tr>
39 <td class='sha1'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = Commit.sha1.substr(0, 7), hide_sha1_output = 1 %] <div class="sha1_label">Commit</div></td>
40 <td>[% Commit.sha1 %]</td>
41 <td class='action-list'></td>
42 </tr>
43 <tr>
44 <td class='sha1'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = Commit.tree_sha1.substr(0, 7), hide_sha1_output = 1 %] <div class="sha1_label">Tree</div></td>
45 <td>[% Commit.tree_sha1 %]</td>
46 <td class='action-list'><a href="[% c.uri_for_action("/ref/tree", c.req.captures) %]" title="Tree" class="button tree">tree</a></td>
47 </tr>
48 [% FOREACH parent IN Commit.parents %]
49 <tr>
50 <td class='sha1'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = parent.sha1.substr(0, 7), hide_sha1_output = 1 %] <div class="sha1_label">Parent</div></td>
51 <td>[% parent.sha1 %]</td>
52 <td class='action-list'>
53 <a href="[% c.uri_for_action('/ref/commit', [Repository.name, parent.sha1]) %]" title="Commit" class="button commit">commit</a>
54 <a href="[% c.uri_for_action('/ref/diff_fancy', [Repository.name, parent.sha1]) %]" title="Difference" class="button diff">diff</a>
55 </td>
56 </tr>
57[% END %]
58</table>
59
86692bbb 60
86692bbb 61
62 [%
63 # In the case of merge commits there will be no diff tree.
ee5cf0bf 64 IF diff_tree && diff_tree.size > 0;
86692bbb 65 INCLUDE '_diff_tree.tt2';
66 END;
84f49778 67 %]