Fix variable and blame bugs.
[catagits/Gitalist.git] / root / fragment / ref / blame.tt2
CommitLineData
5ac7ddcc 1[%- IF mangled; INCLUDE inc/syntax_highlight_css.tt2; END -%]
571348f6 2[% blame_lines = blob.split("\n") %]
592b68ef 3 [% FOR info IN blame %]
4 <tr class=''>
da29fb44 5 [%-
6 linecolour = info.commit.sha1.substr(0,6);
7 IF info.commit.sha1 != lastsha1;
8 styleinfo = " style='border-top: solid 3px #" _ linecolour _ ";'"; -%]
2cf1e781 9 <td nowrap class='author'[% styleinfo %]>[% info.commit.author %]</td>
10 <td nowrap class='date'[% styleinfo %]>[% info.commit.author_dt.ymd %]</td>
189f3b00 11 <td nowrap class='sha1 commit-info chroma-hash'[% styleinfo %]><a title="[% info.commit.author %] on [% info.commit.author_dt %]" href='[% c.uri_for_action('/ref/commit', [Repository.name, info.commit.sha1]) %]'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = info.commit.sha1.substr(0, 7) %]</a>
12[%# linecolour %]</td>
da29fb44 13 [%- ELSE -%]
2cf1e781 14 <td nowrap class='author'></td>
15 <td nowrap class='date'></td>
16 <td nowrap class='commit-info'></td>
da29fb44 17 [%- END -%]
2980657b 18 <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_action('/ref/blame', [Repository.name, info.commit.sha1], filename.to_path ) %]#l[% info.meta.orig_lineno %]'>[% info.meta.lineno %]</a></tt></td>
5ac7ddcc 19 <td nowrap class='data'><pre>[%-
20 IF mangled; blame_lines.${loop.index}; ELSE; blame_lines.${loop.index} | html; END
21 -%]</pre></td>
da29fb44 22 [% lastsha1 = info.commit.sha1 %]
592b68ef 23 </tr>
24 [% END %]