0e5ee10f99849a21148576f71c0f9868f630892c
[catagits/Gitalist.git] / root / fragment / ref / history.tt2
1 [% BLOCK history_table_headfoot %]
2 [% SET cell = type == 'head' ? 'th' : 'td' %]
3 [%# FIXME: should  c.req.arguments.0 be path instead? %]
4 <tr>
5 <[% cell %] colspan="2"><a href="#" onclick="compareDiffs('[% Repository.name %]','[% c.req.arguments.0 %]');return false;">Compare</a></[% cell %]>
6  <[% cell %]>sha1</[% cell %]>
7  <[% cell %]>time</[% cell %]>
8  <[% cell %]>message</[% cell %]>
9  <[% cell %]>author</[% cell %]>
10  <[% cell %]>actions</[% cell %]>
11 </tr>
12 [% END %]
13 <form name="theform">
14  <table class='listing'>
15    <thead>[% PROCESS history_table_headfoot type = 'head' %]</thead
16
17    <tbody>
18    [% FOREACH line IN log_lines %]
19  <tr [% "class='invert'" IF loop.count % 2 %]>
20         <td><input type="radio" name="sha1_a" value="[% line.sha1 %]" [% "checked" IF loop.count == 2 %] /></td>
21         <td><input type="radio" name="sha1_b" value="[% line.sha1 %]" [% "checked" IF loop.count == 1 %]/></td>
22      <td class='sha1' title='[% line.sha1 %]'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = line.sha1.substr(0, 7) %]</td>
23      <td class='time-since' title='[% line.authored_time %]'>[% time_since(line.authored_time) %]</td>
24     
25      <td>
26        [% short_cmt(line.comment) | html %]
27        [% INCLUDE '_refs.tt2' object = line.0 %]
28      </td>
29           <td class='author'>[% line.author.name | html %]</td>
30      <td class='action-list'>
31      [% IF filetype == 'tree' %]
32        <a href="[% c.uri_for_action("/ref/tree", [Repository.name, line.sha1], filename) %]" title="Blob" class="button blob">blob</a>
33       [% ELSIF filetype == 'blob' %]
34        <a href="[% c.uri_for_action("/ref/blob", [Repository.name, line.sha1], filename) %]" title="Blob" class="button blob">blob</a>
35       [% END %]
36        <a href="[% c.uri_for_action("/ref/diff_fancy", [Repository.name, line.sha1]) %]" title="Commit diff" class="button diff">commitdiff</a>
37       [% IF filetype == 'blob' %]
38        <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>
39        [% END %]
40      </td>
41     </tr>
42    [% END %]
43   <tr>
44         <td colspan="2"><a href="#" onclick="compareDiffs('[% Repository.name %]');return false;">Compare</a></td>
45         <td colspan="5"></td>
46 </tr>
47    </tbody>
48   </table>
49 </form>
50 [%
51   INCLUDE 'inc/log_pager.tt2';
52 %]