Fix pervasive repo_dir -> repos_dir typo
[catagits/Gitalist.git] / root / blame.tt2
1 [% PROCESS 'nav/actions.tt2' object = head %]
2 [% INCLUDE inc/syntax_highlight_css.tt2 %]
3
4 <div class='content'>
5
6 [% IF object.type == 'commit' %]
7 <div class='commit-message'>[% short_cmt(head.comment) %]</div>
8 [% END %]
9
10 [% INCLUDE 'nav/path.tt2' %]
11
12 <div id='blame'>
13 <table>
14  <thead>
15   <tr>
16    <th>author</th>
17    <th>date</th>
18    <th>sha1</th>
19    <th></th>
20    <th class='data'>data</th>
21   </tr>
22  </thead>
23
24  <tfoot>
25   <tr>
26    <td>author</td>
27    <td>date</td>
28    <td>sha1</td>
29    <td></td>
30    <td class='data'>data</td>
31   </tr>
32  </tfoot>
33
34  <tbody>
35  [% blame_lines = blob.split("\n") %]
36  [% FOR info IN blame %]
37  <tr class=''>
38    [%-
39      linecolour = info.commit.sha1.substr(0,6);
40      IF info.commit.sha1 != lastsha1;
41        styleinfo = " style='border-top: solid 3px #" _ linecolour _ ";'"; -%]
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>
45      [%- ELSE -%]
46      <td nowrap class='author'></td>
47      <td nowrap class='date'></td>
48      <td nowrap class='commit-info'></td>
49      [%- END -%]
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>
51    <td nowrap class='data'><pre>[% blame_lines.${loop.index} %]</pre></td>
52    [% lastsha1 = info.commit.sha1 %]
53  </tr>
54  [% END %]
55  </tbody>
56 </table>
57 </div>
58
59 </div>