Make filename handling a generic actionrole. Fix more nav uris
[catagits/Gitalist.git] / root / nav / actions.tt2
index 9945e70..4ed51ee 100644 (file)
@@ -2,19 +2,19 @@
   <!-- This should probably be a real LIst -->
     <a href="[% c.uri_for_action('/repository/summary', [c.req.captures.0]) %]">summary</a> &bull;
     <a href="[% c.uri_for_action('/repository/shortlog', [c.req.captures.0]) %]">shortlog</a> &bull;
-    <a href="[% c.uri_for_action('/repository/log', [c.req.captures.0]) %]">log</a> &bull;
+    <a href="[% c.uri_for_action('/repository/log', [c.req.captures.0]) %]">log</a>
     [% IF Commit %]
+        &sect;
         <a href="[% c.uri_for_action('/commit/commit', [c.req.captures.0, Commit.sha1]) %]">commit</a> &bull;
         <a href="[% c.uri_for_action('/commit/diff_fancy', [c.req.captures.0, Commit.sha1]) %]">commitdiff</a> &bull;
         <a href="[% c.uri_for_action('/commit/tree', [c.req.captures.0, Commit.sha1]) %]">tree</a>
     [% END %]
-    [% IF filename && Commit %]&bull;[% END %]
     [% IF filename %]
     &sect;
-    <a href="[% c.uri_for('blob', {h=object.sha1,f=filename}) %]">blob</a> &bull;
-    <a href="[% c.uri_for('blob_plain', {h=object.sha1,f=filename}) %]">raw</a> &bull;
-    <a href="[% c.uri_for('blame', {h=object.sha1,f=filename}) %]">blame</a> &bull;
-    <a href="[% c.uri_for('shortlog', {h=object.sha1,f=filename}) %]">history</a> &bull;
+    <a href="[% c.uri_for_action('/commit/blob', [c.req.captures.0, Commit.sha1], filename) %]">blob</a> &bull;
+    <a href="[% c.uri_for_action('/commit/blob_plain', [c.req.captures.0, Commit.sha1], filename) %]">raw</a> &bull;
+    <a href="[% c.uri_for_action('/commit/blame', [c.req.captures.0, Commit.sha1], filename)  %]">blame</a> &bull;
+    <a href="[% c.uri_for_action('/commit/shortlog', [c.req.captures.0, Commit.sha1], filename)  %]">history</a> &bull;
     <a href="[% c.uri_for(c.controller.action_for('commit'), [c.req.captures.0, Repository.head_hash]) %]">HEAD</a>
     [% END %]
     <div class='chroma-hash'>[% INCLUDE 'inc/chroma_hash.tt2' sha1 = object.sha1 %]</div>