Fixed the links in the history view.
[catagits/Gitalist.git] / root / _diff_tree.tt2
1 <table class='diff-tree listing'>
2  <thead>
3   <tr>
4    <th>file</th>
5    <th>status</th>
6    <th>actions</th>
7   </tr>
8  </thead>
9  <tfoot>
10   <tr>
11    <td>file</td>
12    <td>status</td>
13    <td>actions</td>
14   </tr>
15  </tfoot>
16  <tbody>
17   [% FOREACH line IN diff_tree -%]
18   <tr>
19    <td class='file-name'>
20     [% line.file %]
21    </td>
22    <td class='status'>
23     [%
24     SWITCH line.status;
25       CASE 'R';
26         '[moved from ' _ line.src _ ' with ' _ line.sim _ '% similarity]';
27       CASE 'A';
28         '[new file with mode: ' _ line.modedst _ ']';
29       CASE 'D';
30         '[deleted file]';
31     END;
32     %]
33    </td>
34    <td class='action-list'>
35      [% IF !line.is_new %]<a href="[% c.uri_for_action("/ref/diff_fancy", [Repository.name, Commit.sha1], line.file.to_path) %]">diff</a>[% END %]
36      <a href="[% c.uri_for_action("/ref/blob", [Repository.name, Commit.sha1], line.file.to_path) %]">blob</a>
37      [% IF !line.is_new %]<a href="[% c.uri_for("/ref/shortlog", [Repository.name, Commit.sha1], line.file.to_path) %]">history</a>[% END %]
38    </td>
39   </tr>
40   [% END %]
41  </tbody>
42 </table>