[%
IF path;
- INCLUDE 'nav/path.tt2' filename = path, head = commit;
+ INCLUDE 'nav/path.tt2' filename = path;
END;
subinclude('/fragment/commit/tree', c.req.captures);
<div class='path'>
- <a href="[% c.uri_for_action("/commit/tree", [Repository.name, head.sha1]) %]">[% Repository.name %]</a>
+ <a href="[% c.uri_for_action("/commit/tree", [Repository.name, Commit.sha1]) %]">[% Repository.name %]</a>
[% FOREACH part IN filename.split('/') %]
[% path = loop.first ? part : path _ '/' _ part %]
- / <a href="[% c.uri_for_action(loop.last ? '/commit/blob' : '/commit/tree', [Repository.name, head.sha1], path.to_path) %]">[% part %]</a>
+ / <a href="[% action_name = loop.last ? '/commit/blob' : '/commit/tree'; c.uri_for_action(action_name, [Repository.name,Commit.sha1], path.to_path ) %]">[% part %]</a>
[% END %]
</div>