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="listing">
10 <thead>[% PROCESS tree_table_headfoot type = 'head' %]</thead>
12 [% FOREACH item IN tree_list %]
13 <tr [% "class='invert'" IF loop.count % 2 %]>
14 <td class='file-mode'>[% item.modestr %]</td>
16 action_type = item.type == 'tree' ? 'tree' : 'blob';
17 action_for_link = item.type == 'tree' ? '/ref/tree' : '/ref/blob';
18 blob_or_tree_link = c.uri_for_action(action_for_link, c.req.captures, c.req.args.to_path(item.file))
20 <td class='file-name'>
21 <a href="[% blob_or_tree_link %]">[% item.file %]</a>
23 <td class='action-list'>
24 <a href="[% blob_or_tree_link %]">[% theact %]</a>
25 [% IF item.type == 'blob' %]
26 <a href="[% c.uri_for_action('/ref/blob', c.req.captures, c.req.args.to_path(item.file)) %]" title="Blob" class="button blob">Blob</a>
27 <a href="[% c.uri_for_action('/ref/raw', c.req.captures, c.req.args.to_path(item.file)) %]" title="Raw" class="button raw">raw</a>
28 <a href="[% c.uri_for_action('/ref/blame', c.req.captures, c.req.args.to_path(item.file)) %]" title="Blame" class="button blame">blame</a>
30 <a href="[% c.uri_for_action('/ref/history', c.req.captures, c.req.args.to_path(item.file)) %]" title="Short log" class="button shortlog">Short log</a>