Move all the templates back into the 'root' directory, otherwise make install will...
[catagits/Gitalist.git] / root / _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="[% c.uri_for("blobdiff", {hp=commit.parent_sha1, h=commit.sha1, f=line.file}) %]">diff</a>[% END %]
29      <a href="[% c.uri_for("blob", {h=line.sha1, hb=commit.sha1, f=line.file}) %]">blob</a>
30      [% IF !line.is_new %]<a href="[% c.uri_for("shortlog", {hb=commit.sha1, f=line.file}) %]">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>