X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FGitalist.git;a=blobdiff_plain;f=root%2Ffragment%2Fref%2Ftree.tt2;fp=root%2Ffragment%2Fref%2Ftree.tt2;h=f2d63a597fdaa2fdae3ab1f18fde6e6e5e69c623;hp=d83e35835f8e945fdb8d6892c1e6fd66169d10ee;hb=eb8ee28a1c14382122949c6dcc09bc3ee6a08310;hpb=b1c8b22c3db33682673723c1400f8b8c08bcc9a3 diff --git a/root/fragment/ref/tree.tt2 b/root/fragment/ref/tree.tt2 index d83e358..f2d63a5 100755 --- a/root/fragment/ref/tree.tt2 +++ b/root/fragment/ref/tree.tt2 @@ -13,8 +13,8 @@ # sort files and folders SET tree_files = []; SET tree_folders = []; - FOREACH item IN tree_list; - IF item.type == "blob"; + FOREACH item IN entries; + IF item.mode != "40000"; tree_files.push(item); ELSE; tree_folders.push(item); @@ -23,25 +23,25 @@ %] [% BLOCK output_tree %] - [% FOREACH item IN tree_type.sort('file') %] + [% FOREACH item IN tree_type.sort('filename') %] - [% item.modestr %] + [% c.stash.mode_string(item.mode) %] [%- - 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)) + action_type = item.mode == '40000' ? 'tree' : 'blob'; + action_for_link = item.mode == '40000' ? '/ref/tree' : '/ref/blob'; + blob_or_tree_link = c.uri_for_action(action_for_link, c.req.captures, c.req.args.to_path(item.filename)) -%] - [% item.file %] + [% item.filename %] [% theact %] - [% IF item.type == 'blob' %] - Blob - raw - blame + [% IF item.mode != '40000' %] + Blob + raw + blame [% END %] - Short log + Short log - [% c.req.args.to_path(item.file) %]Loading commit info ... + [% c.req.args.to_path(item.filename) %]Loading commit info ... [% counter = counter + 1 %] [% END %]