Add mech testing in from the branch I previously made. 5 of the URIs which we test...
[catagits/Gitalist.git] / root / fragment / commit / commit.tt2
index 70cb801..c23283a 100644 (file)
@@ -7,23 +7,23 @@
   <!-- [% USE dumper; dumper.dump(commit.parents) %] -->
   <dl class='commit-info'>
    <dt>author</dt>
-    <dd>[% Commit.author.name | html %] &lt;[% Commit.author.email %]&gt;<br/>
-       [% Commit.authored_time %]</dd>
-   <dt>committer</dt>
-    <dd>[% Commit.committer.name %] &lt;[% Commit.committer.email %]&gt;<br/>
-       [% Commit.committed_time %]</dd>
-   <dt>commit</dt>
+    <dd><img style="float: left; padding-right: 10px" src="[% uri_for_gravatar(Commit.committer.email, 40) %]">[% Commit.author.name | html %] &lt;[% Commit.author.email %]&gt;<br/>
+       [% time_since(Commit.authored_time) %]</dd>
+   <dt style="clear: left">committer</dt>
+    <dd><img style="float: left; padding-right: 10px" src="[% uri_for_gravatar(Commit.committer.email, 40) %]">[% Commit.committer.name %] &lt;[% Commit.committer.email %]&gt;<br/>
+       [% time_since(Commit.committed_time) %]</dd>
+   <dt style="clear: left">commit</dt>
     <dd>[% Commit.sha1 %]</dd>
    <dt>tree</dt>
     <dd>[% Commit.tree_sha1 %]
-       <span class='action-list'><a href="[% c.uri_for(c.controller.action_for("tree"), c.req.captureargs) %]">tree</a></span>
+       <span class='action-list'><a href="[% c.uri_for_action("/commit/tree", c.req.captures) %]">tree</a></span>
     </dd>
    [% FOREACH parent IN Commit.parents %]
    <dt>parent</dt>
     <dd>[% parent.sha1  %]
       <span class='action-list'>
-       <a href="[% c.uri_for(c.action, [Repository.name, parent.sha1]) %]">commit</a>
-       <a href="[% c.uri_for(c.controller.action_for('diff'), [Repository.name, parent.sha1]) %]">diff</a>
+       <a href="[% c.uri_for_action('/commit/commit', [Repository.name, parent.sha1]) %]">commit</a>
+       <a href="[% c.uri_for_action('/commit/diff_fancy', [Repository.name, parent.sha1]) %]">diff</a>
       </span>
      </dd>
    [% END %]
@@ -33,7 +33,7 @@
 
   [%
     # In the case of merge commits there will be no diff tree.
-    IF diff_tree.size > 0;
+    IF diff_tree && diff_tree.size > 0;
       INCLUDE '_diff_tree.tt2';
     END;
   %]