Provided support for blobdiff legacy URIs.
[catagits/Gitalist.git] / root / _tree.tt2
1 <table class='tree listing'>
2  <thead>
3   <tr>
4    <th>mode</th>
5    <th>file</th>
6    <th>actions</th>
7   </tr>
8  </thead>
9  <tfoot>
10   <tr>
11    <td>mode</td>
12    <td>file</td>
13    <td>actions</td>
14   </tr>
15  </tfoot>
16
17  <tbody>
18   [% FOREACH item IN tree_list %]
19   <tr>
20    <td class='file-mode'>[% item.modestr %]</td>
21    [% theact = item.type == 'tree' ? 'tree' : 'blob' -%]
22    [% fullpath = path ? path _ '/' _ item.file : item.file %]
23    <td class='file-name'>
24     <a href="[% c.uri_for(theact, {h=item.sha1, hb=commit.sha1, f=fullpath}) %]">[% item.file %]</a>
25    </td>
26    <td class='action-list'>
27      <a href="[% c.uri_for(theact, {h=item.sha1, hb=commit.sha1, f=fullpath}) %]">[% theact %]</a>
28           [% IF item.type == 'blob' %]
29           <a href="[% c.uri_for('blame', {h=commit.sha1, hb=commit.sha1, f=fullpath}) %]">blame</a>
30           [% END %]
31      <a href="[% c.uri_for('history', {h=item.sha1, hb=commit.sha1, f=fullpath}) %]">history</a>
32      [% IF item.type == 'blob' %]
33      <a href="[% c.uri_for('raw', {hb=commit.sha1, f=fullpath}) %]">raw</a>
34      [% END %]
35    </td>
36   </tr>
37   [% END %]
38  </tbody>
39 </table>