Commit | Line | Data |
18a8059a |
1 | [% PROCESS 'nav/actions.tt2' object = head %] |
04a4961e |
2 | [% INCLUDE inc/syntax_highlight_css.tt2 %] |
2cf1e781 |
3 | |
4 | <div class='content'> |
5 | |
18a8059a |
6 | [% IF object.type == 'commit' %] |
6bd8b34b |
7 | <div class='commit-message'>[% short_cmt(head.comment) %]</div> |
18a8059a |
8 | [% END %] |
9 | |
fed9966b |
10 | [% INCLUDE 'nav/path.tt2' %] |
18a8059a |
11 | |
592b68ef |
12 | <div id='blame'> |
18a8059a |
13 | <table> |
592b68ef |
14 | <thead> |
15 | <tr> |
76eeff61 |
16 | <th>author</th> |
17 | <th>date</th> |
da29fb44 |
18 | <th>sha1</th> |
76eeff61 |
19 | <th></th> |
20 | <th class='data'>data</th> |
592b68ef |
21 | </tr> |
22 | </thead> |
23 | |
24 | <tfoot> |
25 | <tr> |
76eeff61 |
26 | <td>author</td> |
27 | <td>date</td> |
da29fb44 |
28 | <td>sha1</td> |
76eeff61 |
29 | <td></td> |
30 | <td class='data'>data</td> |
592b68ef |
31 | </tr> |
32 | </tfoot> |
33 | |
34 | <tbody> |
6bd8b34b |
35 | [% blame_lines = blob.split("\n") %] |
592b68ef |
36 | [% FOR info IN blame %] |
37 | <tr class=''> |
da29fb44 |
38 | [%- |
39 | linecolour = info.commit.sha1.substr(0,6); |
40 | IF info.commit.sha1 != lastsha1; |
41 | styleinfo = " style='border-top: solid 3px #" _ linecolour _ ";'"; -%] |
2cf1e781 |
42 | <td nowrap class='author'[% styleinfo %]>[% info.commit.author %]</td> |
43 | <td nowrap class='date'[% styleinfo %]>[% info.commit.author_dt.ymd %]</td> |
44 | <td nowrap class='commit-info chroma-hash'[% styleinfo %]><a title="[% info.commit.author %] on [% info.commit.author_dt %]" href='[% c.uri_for('commit', {h=info.commit.sha1}) %]'>[% linecolour %]</td> |
da29fb44 |
45 | [%- ELSE -%] |
2cf1e781 |
46 | <td nowrap class='author'></td> |
47 | <td nowrap class='date'></td> |
48 | <td nowrap class='commit-info'></td> |
da29fb44 |
49 | [%- END -%] |
61f14672 |
50 | <td nowrap class='lineno' id='l[% info.meta.lineno %]' style='border-right: solid 3px #[% linecolour %]; border-left: solid 3px #[% linecolour %];'><tt><a href='[% c.uri_for('blame', {h=info.commit.sha1,f=filename}) %]#l[% info.meta.orig_lineno %]'>[% info.meta.lineno %]</a></tt></td> |
2cf1e781 |
51 | <td nowrap class='data'><pre>[% blame_lines.${loop.index} %]</pre></td> |
da29fb44 |
52 | [% lastsha1 = info.commit.sha1 %] |
592b68ef |
53 | </tr> |
54 | [% END %] |
55 | </tbody> |
18a8059a |
56 | </table> |
57 | </div> |
2cf1e781 |
58 | |
59 | </div> |