Use appropriate prototype depending on perl version in test.
[catagits/Gitalist.git] / root / _diff_tree.tt2
CommitLineData
cbcd8397 1<h2>[% diff_tree.size %] file[% "s" IF diff_tree.size > 1 %] in this diff <span>([%- Commit.sha1 || HEAD -%])</span></h2>
08d8bb08 2
f78e75d8 3<table class='diff-tree listing'>
9dc3b9a5 4 <thead>
5 <tr>
08d8bb08 6 <th>File</th>
7 <th>Status</th>
8 <th>Actions</th>
7a88ffa4 9 </tr>
10 </thead>
9dc3b9a5 11 <tbody>
b4b4d0fd 12 [% FOREACH line IN diff_tree -%]
9dc3b9a5 13 <tr>
f78e75d8 14 <td class='file-name'>
cbcd8397 15 <a href="#diff[% loop.count %]">[% line.file %]</a>
b4b4d0fd 16 </td>
17 <td class='status'>
18 [%
19 SWITCH line.status;
20 CASE 'R';
21 '[moved from ' _ line.src _ ' with ' _ line.sim _ '% similarity]';
22 CASE 'A';
23 '[new file with mode: ' _ line.modedst _ ']';
24 CASE 'D';
25 '[deleted file]';
26 END;
27 %]
28 </td>
9dc3b9a5 29 <td class='action-list'>
cbcd8397 30 [% IF !line.is_new %]<a href="[% c.uri_for_action("/ref/diff_fancy", [Repository.name, Commit.sha1], line.file.to_path) %]" title="Difference" class="button diff">diff</a>[% END %]
31 [% IF !line.is_new %]<a href="[% c.uri_for_action("/ref/history", [Repository.name, Commit.sha1], line.file.to_path) %]" title="History (Short Log)" class="button history">history</a>[% END %]
08d8bb08 32 <a href="[% c.uri_for_action("/ref/blob", [Repository.name, Commit.sha1], line.file.to_path) %]" title="Blob" class="button blob">blob</a>
9dc3b9a5 33 </td>
34 </tr>
35 [% END %]
36 </tbody>
9dc3b9a5 37</table>