Fixed history link in root/nav/actions.tt2.
[catagits/Gitalist.git] / root / nav / actions.tt2
index 63da65a..4ceab36 100644 (file)
@@ -1,9 +1,22 @@
 <div class='actions'>
-    <a href="[% c.uri_for('summary') %]">summary</a> •
-    <a href="[% c.uri_for('shortlog', {h=object.sha1}) %]">shortlog</a> •
-    <a href="[% c.uri_for('log', {h=object.sha1}) %]">log</a> •
-    <a href="[% c.uri_for('commit', {h=object.sha1}) %]">commit</a> •
-    <a href="[% c.uri_for('commitdiff', {h=object.sha1}) %]">commitdiff</a> •
-    <a href="[% c.uri_for('tree', {h=object.tree_sha1, hb=object.sha1}) %]">tree</a>
-    <div class='chroma-hash'>[% INCLUDE '_chroma_hash.tt2' sha1 = object.sha1 %]</div>
+  <!-- This should probably be a real LIst -->
+    <a href="[% c.uri_for_action('/repository/summary', [c.req.captures.0]) %]">summary</a> &bull;
+    [% IF c.req.captures.size == 1; SET path = 'repository'; ELSE; SET path = 'ref'; END %]
+    <a href="[% c.uri_for_action('/' _ path _ '/shortlog', c.req.captures) %]">shortlog</a> &bull;
+    <a href="[% c.uri_for_action('/' _ path _ '/longlog', c.req.captures) %]">log</a>
+    [% IF Commit %]
+        &sect;
+        <a href="[% c.uri_for_action('/ref/commit', [c.req.captures.0, Commit.sha1]) %]">commit</a> &bull;
+        <a href="[% c.uri_for_action('/ref/diff_fancy', [c.req.captures.0, Commit.sha1]) %]">commitdiff</a> &bull;
+        <a href="[% c.uri_for_action('/ref/tree', [c.req.captures.0, Commit.sha1]) %]">tree</a>
+    [% END %]
+    [% IF filename %]
+    &sect;
+    <a href="[% c.uri_for_action('/ref/blob', [c.req.captures.0, Commit.sha1], filename) %]">blob</a> &bull;
+    <a href="[% c.uri_for_action('/ref/raw', [c.req.captures.0, Commit.sha1], filename) %]">raw</a> &bull;
+    <a href="[% c.uri_for_action('/ref/blame', [c.req.captures.0, Commit.sha1], filename)  %]">blame</a> &bull;
+    <a href="[% c.uri_for_action('/ref/history', [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>
 </div>