Further win32 related hacks.
[catagits/Gitalist.git] / root / fragment / ref / tree.tt2
CommitLineData
1f9a47c2 1[% BLOCK tree_table_headfoot %]
0da7966e 2 <tr>
3 <th>mode</th>
4 <th>file</th>
5 <th>actions</th>
6 </tr>
1f9a47c2 7[% END %]
8<table class='tree listing'>
9 <thead>
10 [% PROCESS tree_table_headfoot %]
0da7966e 11 </thead>
12 <tfoot>
1f9a47c2 13 [% PROCESS tree_table_headfoot %]
0da7966e 14 </tfoot>
15
16 <tbody>
17 [% FOREACH item IN tree_list %]
18 <tr>
19 <td class='file-mode'>[% item.modestr %]</td>
1f9a47c2 20 [%-
21 action_type = item.type == 'tree' ? 'tree' : 'blob';
2980657b 22 action_for_link = item.type == 'tree' ? '/ref/tree' : '/ref/blob';
ca06a177 23 blob_or_tree_link = c.uri_for_action(action_for_link, c.req.captures, c.req.args.to_path(item.file))
1f9a47c2 24 -%]
0da7966e 25 <td class='file-name'>
1f9a47c2 26 <a href="[% blob_or_tree_link %]">[% item.file %]</a>
0da7966e 27 </td>
28 <td class='action-list'>
1f9a47c2 29 <a href="[% blob_or_tree_link %]">[% theact %]</a>
0da7966e 30 [% IF item.type == 'blob' %]
2980657b 31 <a href="[% c.uri_for_action('/ref/blob', c.req.captures, c.req.args.to_path(item.file)) %]">blob</a>
32 <a href="[% c.uri_for_action('/ref/blame', c.req.captures, c.req.args.to_path(item.file)) %]">blame</a>
0da7966e 33 [% END %]
2980657b 34 <a href="[% c.uri_for_action('/ref/history', c.req.captures, c.req.args.to_path(item.file)) %]">history</a>
0da7966e 35 [% IF item.type == 'blob' %]
2980657b 36 <a href="[% c.uri_for_action('/ref/raw', c.req.captures, c.req.args.to_path(item.file)) %]">raw</a>
0da7966e 37 [% END %]
38 </td>
39 </tr>
40 [% END %]
41 </tbody>
42</table>