7544ab4a5cfb8ec46d64a710642d2da6fcb9d167
[catagits/Gitalist.git] / templates / _diff_tree.tt2
1 <table class='diff-tree'>
2  <thead>
3   <tr>
4    <td>file</td>
5    <td>status</td>
6    <td>actions</td>
7   </tr>
8  </thead>
9  <tbody>
10   [% FOREACH line IN diff_tree -%]
11   <tr>
12    <td class='filename'>
13     [% line.file %]
14    </td>
15    <td class='status'>
16     [%
17     SWITCH line.status;
18       CASE 'R';
19         '[moved from ' _ line.src _ ' with ' _ line.sim _ '% similarity]';
20       CASE 'A';
21         '[new file with mode: ' _ line.modedst _ ']';
22       CASE 'D';
23         '[deleted file]';
24     END;
25     %]
26    </td>
27    <td class='action-list'>
28      [% IF !line.is_new %]<a href="/blobdiff?p=[% project %];f=[% line.file %];h=[% commit.sha1 %];hp=[% commit.parent_sha1 %]">diff</a>[% END %]
29      <a href="/blob?p=[% project %];f=[% line.file %];h=[% line.sha1 %];hb=[% commit.sha1 %]">blob</a>
30      [% IF !line.is_new %]<a href="/shortlog?p=[% project %];f=[% line.file %];hb=[% commit.sha1 %]">history</a>[% END %]
31    </td>
32   </tr>
33   [% END %]
34  </tbody>
35  <tfoot>
36   <tr>
37    <td>file</td>
38    <td>status</td>
39    <td>actions</td>
40   </tr>
41  </tfoot>
42 </table>