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