Fix the path navigation. All the tests we have for the app now pass
Tomas Doran [Fri, 22 Jan 2010 21:02:56 +0000 (21:02 +0000)]
root/commit/tree.tt2
root/nav/path.tt2

index be27877..806fced 100644 (file)
@@ -7,7 +7,7 @@
 
   [%
     IF path;
-      INCLUDE 'nav/path.tt2' filename = path, head = commit;
+      INCLUDE 'nav/path.tt2' filename = path;
     END;
 
     subinclude('/fragment/commit/tree', c.req.captures);
index c588cf0..de01987 100644 (file)
@@ -1,7 +1,7 @@
 <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>