Provide option to disable gravatars.
[catagits/Gitalist.git] / root / fragment / ref / commit.tt2
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           <p class='commit-message'>[% Commit.comment | html %]</p>
17           [% INCLUDE '_refs.tt2' object = commit %]
18         </td>
19         <td class='author'><a href="mailto:[% Commit.author.email %]" title="Email">[% INCLUDE 'inc/gravatar.tt2' email = Commit.author.email %][% Commit.author.name | html %]</a></td>
20         <td class='action-list'>Author</td>
21 </tr>
22 <tr class="invert">
23         <td></td>
24         <td class='time-since'>[% time_since(Commit.committed_time) %]</td>
25         <!-- spanned -->
26         <td class='author'><a href="mailto:[% Commit.committer.email %]" title="Email">[% INCLUDE 'inc/gravatar.tt2' email = Commit.committer.email %][% Commit.committer.name %]</a></td>
27         <td class='action-list'>Committer</td>
28 </tr>
29 </tbody>
30 </table>
31   <!-- [% USE dumper; dumper.dump(commit.parents) %] -->
32  
33  
34  
35 <table class="listing summary">
36         <tr>
37                 <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>
38                 <td>[% Commit.sha1 %]</td>
39                 <td class='action-list'><a href="[% c.uri_for_action('/ref/diff_fancy', [Repository.name, Commit.sha1]) %]" title="Difference" class="button diff">diff</a></td>
40         </tr>
41         <tr>
42                 <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>
43                 <td>[% Commit.tree_sha1 %]</td>
44                 <td class='action-list'><a href="[% c.uri_for_action("/ref/tree", c.req.captures) %]" title="Tree" class="button tree">tree</a></td>
45         </tr>
46          [% FOREACH parent IN Commit.parents %]
47         <tr>
48                 <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>
49                 <td>[% parent.sha1 %]</td>
50                 <td class='action-list'>
51                         <a href="[% c.uri_for_action('/ref/commit', [Repository.name, parent.sha1]) %]" title="Commit" class="button commit">commit</a>
52                 <a href="[% c.uri_for_action('/ref/diff_fancy', [Repository.name, parent.sha1]) %]" title="Difference" class="button diff">diff</a>
53                 </td>
54         </tr>
55 [% END %]       
56 </table>
57
58
59
60   [%
61     # In the case of merge commits there will be no diff tree.
62     IF diff_tree && diff_tree.size > 0;
63       INCLUDE '_diff_tree.tt2';
64     END;
65   %]