Template fixes - some links only make sense for commit objects.
Zachary Stevens [Sat, 14 Nov 2009 02:04:25 +0000 (02:04 +0000)]
root/blob.tt2
root/nav/actions.tt2

index 58d171f..4798ee1 100644 (file)
@@ -1,9 +1,11 @@
 <link rel="stylesheet" type="text/css" href="/static/css/syntax/[% language %].css"/>
 
 [% PROCESS 'nav/actions.tt2' object = head %]
+[% IF object.type == 'commit' %]
 <div class='commit-message'>
 [% head.comment.substr(0, 85) %] ...
 </div>
+[% END %]
 <div class='path'>
  <a href="[% c.uri_for("tree", {hb=head.sha1}) %]">[% project %]</a>
  [% # XXX The last part should link to blob_plain (or something) but doesn't ATM
index 63da65a..a5a5767 100644 (file)
@@ -4,6 +4,8 @@
     <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> •
+    [% IF object.type == 'commit' %]
     <a href="[% c.uri_for('tree', {h=object.tree_sha1, hb=object.sha1}) %]">tree</a>
+    [% END %]
     <div class='chroma-hash'>[% INCLUDE '_chroma_hash.tt2' sha1 = object.sha1 %]</div>
 </div>