[% BLOCK tree_table_headfoot %]
[% SET cell = type == 'head' ? 'th' : 'td' %]
<[% cell %]>Mode[% cell %]>
<[% cell %]>Folder / File[% cell %]>
<[% cell %]>Actions[% cell %]>
<[% cell %]>Message[% cell %]>
[% END %]
[%-
SET counter = 1;
# sort files and folders
SET tree_files = [];
SET tree_folders = [];
FOREACH item IN tree_list;
IF item.type == "blob";
tree_files.push(item);
ELSE;
tree_folders.push(item);
END;
END;
%]
[% BLOCK output_tree %]
[% FOREACH item IN tree_type.sort('file') %]
[% item.modestr %] |
[%-
action_type = item.type == 'tree' ? 'tree' : 'blob';
action_for_link = item.type == 'tree' ? '/ref/tree' : '/ref/blob';
blob_or_tree_link = c.uri_for_action(action_for_link, c.req.captures, c.req.args.to_path(item.file))
-%]
[% item.file %] |
[% theact %]
[% IF item.type == 'blob' %]
Blob
raw
blame
[% END %]
Short log
|
Loading commit info ... |
[% counter = counter + 1 %]
[% END %]
[% END %]
[% PROCESS tree_table_headfoot type = 'head' %]
[% INCLUDE output_tree tree_type => tree_folders %]
[% PROCESS output_tree tree_type => tree_files %]