Showing 2 changed files with 8 additions and 4 deletions
+6 -4
templates/include/blob_diff_body.html.ep
... ...
@@ -1,4 +1,6 @@
1 1
 <%
2
+  my $rev = stash('id');
3
+  my $from_rev = stash('from_id');
2 4
   my $status = stash('status') || '';
3 5
   my $diff_tree = stash('diff_tree');
4 6
 %>
... ...
@@ -18,8 +20,8 @@
18 20
             View file @ <%= substr($from_id, 0, 7) %>
19 21
           </a>
20 22
         % } else {
21
-          <a class="btn" href="<%= url_for("/$user/$project/blob/$id/$file") %>">
22
-            View file @ <%= substr($id, 0, 7) %>
23
+          <a class="btn" href="<%= url_for("/$user/$project/blob/$rev/$file") %>">
24
+            View file @ <%= substr($rev, 0, 7) %>
23 25
           </a>
24 26
         % }
25 27
       </div>
... ...
@@ -37,8 +39,8 @@
37 39
             </a>
38 40
           % }
39 41
           % if ($status ne 'D') {
40
-            <a href="<%= url_for("/$user/$project/blob/$id/$file") %>">
41
-              <img src="<%= url_for("/$user/$project/raw/$id/$file") %>" style="border:1px solid green;padding:1px;margin-left:20px">
42
+            <a href="<%= url_for("/$user/$project/blob/$rev/$file") %>">
43
+              <img src="<%= url_for("/$user/$project/raw/$rev/$file") %>" style="border:1px solid green;padding:1px;margin-left:20px">
42 44
             </a>
43 45
           % }
44 46
         </div>
+2
templates/include/diff_tree.html.ep
... ...
@@ -1,4 +1,6 @@
1 1
 <%
2
+  my $rev = stash('id');
3
+  my $from_rev = stash('from_id');
2 4
   my $parents = stash('parents') || [];
3 5
 %>
4 6