1 [% BLOCK tree_table_headfoot %]
2 [% SET cell = type == 'head' ? 'th' : 'td' %]
4 <[% cell %]>mode</[% cell %]>
5 <[% cell %]>file</[% cell %]>
6 <[% cell %]>actions</[% cell %]>
9 <table class='tree listing'>
10 <thead>[% PROCESS tree_table_headfoot type = 'head' %]</thead>
11 <tfoot>[% PROCESS tree_table_headfoot type = 'foot' %]</tfoot>
14 [% FOREACH item IN tree_list %]
16 <td class='file-mode'>[% item.modestr %]</td>
18 action_type = item.type == 'tree' ? 'tree' : 'blob';
19 action_for_link = item.type == 'tree' ? '/ref/tree' : '/ref/blob';
20 blob_or_tree_link = c.uri_for_action(action_for_link, c.req.captures, c.req.args.to_path(item.file))
22 <td class='file-name'>
23 <a href="[% blob_or_tree_link %]">[% item.file %]</a>
25 <td class='action-list'>
26 <a href="[% blob_or_tree_link %]">[% theact %]</a>
27 [% IF item.type == 'blob' %]
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>
31 <a href="[% c.uri_for_action('/ref/history', c.req.captures, c.req.args.to_path(item.file)) %]">history</a>
32 [% IF item.type == 'blob' %]
33 <a href="[% c.uri_for_action('/ref/raw', c.req.captures, c.req.args.to_path(item.file)) %]">raw</a>