final design tidy up - handing over now
[catagits/Gitalist.git] / root / fragment / ref / history.tt2
1 [% BLOCK history_table_headfoot %]
2 [% SET cell = type == 'head' ? 'th' : 'td' %]
3 <tr>
4  <[% cell %]>sha1</[% cell %]>
5  <[% cell %]>time</[% cell %]>
6  <[% cell %]>message</[% cell %]>
7  <[% cell %]>author</[% cell %]>
8  <[% cell %]>actions</[% cell %]>
9 </tr>
10 [% END %]
11  <table class='listing'>
12    <thead>[% PROCESS history_table_headfoot type = 'head' %]</thead
13
14    <tbody>
15    [% FOREACH line IN log_lines %]
16  <tr [% "class='invert'" IF loop.count % 2 %]>
17      <td class='sha1' title='[% line.sha1 %]'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = line.sha1.substr(0, 7) %]</td>
18      <td class='time-since' title='[% line.authored_time %]'>[% time_since(line.authored_time) %]</td>
19     
20      <td>
21        [% short_cmt(line.comment) | html %]
22        [% INCLUDE '_refs.tt2' object = line.0 %]
23      </td>
24           <td class='author'>[% line.author.name | html %]</td>
25      <td class='action-list'>
26      [% IF filetype == 'tree' %]
27        <a href="[% c.uri_for_action("/ref/tree", [Repository.name, line.sha1], filename) %]" title="Blob" class="button blob">blob</a>
28       [% ELSIF filetype == 'blob' %]
29        <a href="[% c.uri_for_action("/ref/blob", [Repository.name, line.sha1], filename) %]" title="Blob" class="button blob">blob</a>
30       [% END %]
31        <a href="[% c.uri_for_action("/ref/diff_fancy", [Repository.name, line.sha1]) %]" title="Commit diff" class="button diff">commitdiff</a>
32       [% IF filetype == 'blob' %]
33        <a href="[% c.uri_for_action("/ref/diff_fancy", [Repository.name, line.sha1], 'HEAD', filename) %]" title="Diff to current" class="button diffcurrent">diff to current</a>
34        [% END %]
35      </td>
36     </tr>
37    [% END %]
38    </tbody>
39   </table>
40 [%
41   INCLUDE 'inc/log_pager.tt2';
42 %]